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

 

4 Comments

Comments have been disabled for this content.