Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 splitting generate scripts by object

Author  Topic 

bobslayer
Starting Member

3 Posts

Posted - 2006-10-11 : 10:34:24
I am running 'generate scripts' to maintain the database schema. Is there any easy way that the generated SQL file can be split into several files by object to simplify version control?

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-10-11 : 10:46:19
That's an option you set BEFORE you create the scripts.


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

bobslayer
Starting Member

3 Posts

Posted - 2006-10-11 : 10:52:00
Yes, you can run generate scripts for each individual object at a time. However, i want to run the whole thing in one go to generate a script for each object in its own file.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-10-11 : 13:23:09
So even if you select the option for individual files, and then select ALL tables, what happens?


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

bobslayer
Starting Member

3 Posts

Posted - 2006-10-11 : 13:39:42
You get one large file
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2006-10-11 : 14:01:52
Are you using SQL 2005 or 2000? EM 2000 definitely will script one object per file.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-10-11 : 14:32:31
I too have successfully used the EM option to script each object into a separate file. They get weird File Extensions, but ...

Kristen
Go to Top of Page
   

- Advertisement -