views:

22

answers:

1

I use the Database Publishing Wizard in Visual Studio to create a script of a test database (schema and data): The wizard creates a file that I store in my source control system. When I make a few changes to the database I want to publish again in order to save the changes in the source control system.

The problem for me is that the wizard creates a line like the following for every object:

/****** Object:  Schema [dbo]    Script Date: 06/18/2010 15:47:19 ******/

Since these lines contain a date I have thousands of lines that are changed even if just added one record to the database and thus comparing to the previous version is virtually impossible.

Anyone know how to suppress these lines?

+1  A: 

The database publishing wizard options seem really limited to me too. If you script the database using SQL Server Management Studio Generate Script option you can opt to remove the "Script Descriptive Headers Option" which takes these headers out. In 2008 this can do the data too.

If that breaks your workflow you could just strip the lines out with search / replace.

u07ch
Can you script schema and date when you use the Management Studio? I did not see that this is possible...
Stefan Egli
IN SQL Server 2008 you can do the data yes; go to the database right click - choose tasks - generate scripts. On teh second tab remove hte script descriptive headers to lose the date scripted block and check the Script Data option.
u07ch
thanks for your help
Stefan Egli