Command Line Script file Only
abaker97
Posts: 2
I am trying to compare a scripts folder to live database via the command line and generate a script file using the /scriptfile parameter without actually syncing the database. But, the only way I can get the script file created is to use the /sync option. Is it possible to generated the script file without syncing?
Comments
This sounds unusual. I've just tried it here, with a commandline of:
sqlcompare /db1:<db> /db2:<db> /scriptfile:c:\somefolder\somescript.sql
This worked fine, and the file was generated. Are you working with any other switches that may somehow be conflicting? The full command may help. Also, what version are you using? If your scriptfile already exists, you may need to add on the /force option to overwrite it; but I think the same would be true with the /sync option set.
Redgate Software
If I specify /scriptfile without /sync I don't get my scriptfile ex:
sqlcompare /s1:<server1> /db1:<db> /s2:<server2> /db2:<db> /scriptfile:c:\somefolder\somescript.sql
Including the /sync switch will generate the scriptfile ex:
sqlcompare /s1:<server1> /db1:<db> /s2:<server2> /db2:<db> /scriptfile:c:\somefolder\somescript.sql /sync
I'm using SqlCompare8! Is this a bug which has been fixed in SqlCompare9?
Is it because I'm comparing across servers?
Redgate Software
I found a patch that fixed the problem:
http://www.red-gate.com/messageboard/vi ... hp?t=11077
SC-4896 /ScriptFile:"<path\name.sql>" does not appear to generate script file (regression from 8.2)