partha mandayam


In SQL Server 2005, how do we script multiple stored procedures at a time and automatically create a new file for each one


Re: SQL Server 2005 scripting

Satya SKJ


BOL states:

Generate SQL Server Scripts Wizard

The Generate Scripts Wizard walks you through the process of creating scripts, and allows you to select a variety of objects to be scripted at once. The wizard has a variety of options for your scripts, including, such as whether to include permissions, collation, constraints, etc. Use the Wizard when creating scripts for a large number of objects. For information on the Generate SQL Server Scripts Wizard, see Generate SQL Server Scripts Wizard F1 Help.

Use Object Explore to quickly create scripts of an entire database, or a single database object using the default options. You can create the script in a Query Editor window, to a file, or to the clipboard.

You can create scripts to create or delete the objects. Some object types have additional scripting options, such as ALTER, SELECT, INSERT, UPDATE, DELETE, and EXECUTE.

Sometimes you want a script with multiple options, such as drop a procedure and then create a procedure, or create a table then alter a table. To create combined scripts, save the first script to a Query Editor window and the second to the clipboard so you can paste it into the window after the first script.

To script an object, expand Object Explorer and locate the object. Right-click the object and then click Script <object type> as.







Re: SQL Server 2005 scripting

partha mandayam

I know all this stuff but I don't see an option to select multiple objects and create a separate file for each like SQL Server 2000 generate sql script wizard. IN sql 2000, there was an option "create separate file for each object"

Where is that in SQL Server 2005

Did MS forget about this useful feature






Re: SQL Server 2005 scripting

Satya SKJ

Yes that has been excluded in SQL 2005 since RTM, don't know if Dev.team are willing to keep it back. You might update your wish on Microsoft Connect site. At the moment you can either script individual SP at a time or script multiple to one file.




Re: SQL Server 2005 scripting

partha mandayam

Can somebody from Microsoft give me a definite answer



Re: SQL Server 2005 scripting

lkh

This feature return to SQL Server 2005 in Service Pack 2

http://www.microsoft.com/sql/ctp.mspx






Re: SQL Server 2005 scripting

Paul Mestemaker - MSFT

Correct, the feature is present in SQL Server 2005 SP2 which will be shipping by Q1 2007.

Paul A. Mestemaker II
Program Manager
Microsoft SQL Server Manageability
http://blogs.msdn.com/sqlrem/






Re: SQL Server 2005 scripting

partha mandayam

Thanks Paul