SQLCompare Command line - how to exclude PRINT comments
jogyp
Posts: 2
Is there a way to avoid the comment lines from the SQL Compare generated script.
I am trying to create 1 db script per database for version control (I know about the Script folder and it's integration with VSS/perforce, but want versioing at the db script level not object level)
When I run the following:
"C:\Program Files\Red Gate\SQL Compare 8\SQLCompare.exe" /database1:Db1 /Server1:DB011 /exclude:user /exclude:role /options:np,ip,nc,icm /scriptfile:"C:\scripts\PipelineSchema.sql" /force
I want to get pure DB script, without lines like the one below:
PRINT N'Creating [dbo].[Catalog]'
I am trying to create 1 db script per database for version control (I know about the Script folder and it's integration with VSS/perforce, but want versioing at the db script level not object level)
When I run the following:
"C:\Program Files\Red Gate\SQL Compare 8\SQLCompare.exe" /database1:Db1 /Server1:DB011 /exclude:user /exclude:role /options:np,ip,nc,icm /scriptfile:"C:\scripts\PipelineSchema.sql" /force
I want to get pure DB script, without lines like the one below:
PRINT N'Creating [dbo].[Catalog]'
Comments
There is no option in the command line version of SQL Compare that will eliminate all of the print statements from the script output, but you could "cook" the script by using a batch file to, first, run SQL Compare, then remove the print statements: