Did anyone even bother to test the Generate Scripts option for a database
I changed the following options from their default setting:
"Include Descriptive Headers" = True
"Include if NOT EXISTS" = True
"Script for Server Version" = SQL Server 2000
"Script Indexes" = True
and scripted all Stored Procedures, Tables, User-defined functions, and Views
Problems:
1. Generates
IF NOT EXISTS (SELECT * FROM sys.objects ...
should be ...SELECT * FROM dbo.sysobjects ...
2. Generates
WITH (IGNORE_DUP_KEY = OFF) ...
on the indexes. That portion is incompatible with SQL 2000
3.Generates
EXEC sys.sp_addextendedproperty ...
should be EXEC dbo.sp_addextendedproperty ...
Is there a hotfix or patch to deal with these issues
Additionally, the wizard only has options to generate Create statements or Drop statements. Where is the option to do both like the previous version had
I hope patches and hotfixes are on their way soon.
Thanx,

Generate Scripts option in SQL 2005 Management Studio
hulswood
I just stumbled across this post. Thanks Max for the description of how to get at the Script Wizard.
I would also like to add my voice to the requests that the backwards compatibility issues with scripting to SQL Server 2000 be patched soon.
PoulK
Any update on this
Also, the ability to drop and create in one step is missing even though the option descirption implies it should be avialable.
Can you provide a time frame for a solution
Glenn
dhaval vyas
Angry Azul
Mike_1
I'm not sure if I'm missing anything in the wizard, but is there an option to script all object to a seperate file as in 2000 That was phenomally useful.
KevinC
Is there a patch for this problem yet
g_hall
I just wanted to add few more suggestions/annoyances in addition to those already mentioned regarding script generation that I have come across:
1. There could be a way to persist settings that one has chosen in the Generate Scripts dialog. IDEs are meant to boost productivity but how can this be achieved if one has to find each and every option whenever new script needs to be generated.
My suggestion: Make it possible to save script generation options. Better yet, save multiple sets of options as profiles - one to generate certain style of SQL 2000-compatible scripts, another for SQL 2005, etc. These profiles could then theoretically even be used for scripting using SMO :)
2. Is there any way to do the Generate Scripts type of thing on object level as it used to be in SQL 2000 While there are "Create To" and "Drop To" options on object level, these do not give any way to tune the scripts generation options. Its nonsence to be forced to go to the database level and start searching for the same object that I already had selected, in the wizard again!
My suggestion: Add ability to generate scripts in the same manner as the Generate Scripts task provides for single and/or multiple selected objects. The simple "Create To", "Drop To" are not enough. In my opinion SQL 2000 Enterprise Manager was much more streamlined in this sense.
I hope that fixes and additions will be available soon. Otherwise search for the tools that can create compatible scripts must begin...
Thanks
kmpradeepkumar
Robert
Microsoft is aware of this problem and we are working on a fix.
Thanks
Grigory
Jaydip_Bagchi
Grigoriy,
Any chance the fixes for the topics in this thread will make it into SP1
I'm interested in the DROP/CREATE being generated together (which the GUI says is an option) and I'd like to see the one stored-procedure-per-file output come back.
Thanks.
HongmeiWang
Fabio Schorn
wjvii1437
szl
Hi Mark
If you're using SS Enterprise Manager:
Right click on a database > All Tasks > Generate SQL script... (this will open the "Generate SQL scripts" box). On the Options tab you'll find an option under Table Scripting Options called Script indexes.
For SS Management Studio:
Right click on a database > Tasks > Generate Scripts... (this will open the "Script Wizard"). Select a database > click Next > In "Choose Script Options", scroll down to the bottom where you will find the option to "Script Indexes".
Max
Ian L