[In addition to blogging, I am also now using Twitter for quick updates and to share links. Follow me at: twitter.com/pabloperalta] To make SQL to generate the scripts according to the version we want.. - Pablo Peralta's Blog
Tuesday, December 23, 2008 11:29 AM pablop

To make SQL to generate the scripts according to the version we want..

I came across the following problem:·         I generated a script for a SQL 2005 job from SQL Server Management Studio 2008·         When running that script on another SQL 2005 I got the following error:@schedule_uid is not a parameter for procedure sp_add_jobschedule. Getting through this, I found out that the error is due to SSMS 2008 generates scripts for 2008 by default, hence, not taking into account the engine version. So, even though we are using a DB in 2005, the scripts will be targeted for 2008. More info here.In order to change this behavior we have to go to Tools -> Options -> SQL Server Object Explorer -> Scripting and change the "Script for Server version" option. There we can select the specific version we want the scripts to be generated for.After changing this, it perfectly worked on 2005.Hope it is useful, thanksPP

 

Comments

# re: To make SQL to generate the scripts according to the version we want..

Tuesday, February 02, 2010 5:48 PM by Satya

It really helped thanks

# re: To make SQL to generate the scripts according to the version we want..

Wednesday, January 12, 2011 9:34 AM by Sal

Thanks for the helpful information, solved my issue.

# re: To make SQL to generate the scripts according to the version we want..

Friday, October 21, 2011 10:29 AM by Kaleem Ullah Khan

Thanks Buddy it solved my problem

Big Thank You

Leave a Comment

(required) 
(required) 
(optional)
(required)