Hello all,
What is an easy way of scripting all the database tables and sprocs automatically to a separate file each one? I can't find this option in SQL Server Management Studio.
Or is any other way of uploading all objects to a Visual Source Safe project that does not require to copy and paste each script into a VSS sql script?
Thanks!
David
Using SQL Server 2005, right click the database, choose Tasks-> Generate Scripts. You should see a new window open with an info screen. Click Next. Now you should be at the 'Select Database' screen. Select the database you want to generate scripts for, then check the "Script all objects in the selected database" checkbox. Click Next.
Now make sure your script options are correct. If you use the default properties for SQL Server setup, then default should be fine for this as well. Click Next after making any necessary changes.
Now you are at the "Output Option" screen. Select the "Script to file" radio button, and under "Files to generate", select the "File per object" option. Make sure you set your save location and encoding, if necessary.
At this point, you can either click Next to view a summary of what you just selected, or you can click Finish to start scripting. (There is also a "Finish" button on the summary screen.)
|||That "File per Object" option does not appear in my SQL Server Manager 2005.
I think I have installed the latest service pack.
|||
neutrino:
That "File per Object" option does not appear in my SQL Server Manager 2005.
I think I have installed the latest service pack.
I'm not sure if it has to do with the service pack. I have two computers that should both be updated to the latest SP. However, I was able to reproduce this problem with a machine running XP Pro, and the SQL Server Management Studio version was 9.00.1399.x.
The version this works on is 9.00.3042.x, and it is running on Server 2003.
Both computers only have the Development version installed, so maybe it has to do with being on a server OS?
No comments:
Post a Comment