using the command line to script a database
gsuttie
Posts: 80
using the command line to script a database:-
sqldatacompare /db1:WidgetStaging /db2:WidgetProduction
/ScriptFile: "C:\Scripts Folder\WidgetSyncScript.sql"
how do i specify the server where the database is, i.e. somthing like this?
sqldatacompare /db1:SERVERNAME\WidgetStaging /db2:SERVERNAME\WidgetProduction
/ScriptFile: "C:\Scripts Folder\WidgetSyncScript.sql"
sqldatacompare /db1:WidgetStaging /db2:WidgetProduction
/ScriptFile: "C:\Scripts Folder\WidgetSyncScript.sql"
how do i specify the server where the database is, i.e. somthing like this?
sqldatacompare /db1:SERVERNAME\WidgetStaging /db2:SERVERNAME\WidgetProduction
/ScriptFile: "C:\Scripts Folder\WidgetSyncScript.sql"
Comments
sqldatacompare /server1:SERVERNAME /db1:WidgetStaging /server2:SERVERNAME /db2:WidgetProduction /ScriptFile:"C:\Scripts Folder\WidgetSyncScript.sql"
Redgate Software
sqldatacompare /project:"C:\Documents and Settings\user\My Documents\SQL Data Compare\SharedProjects\LocalServercRemoteServer.sdc" /ScriptFile:"C:\Data\scripts\OutputSql.sql"
cd "c:\program files\Red gate\SQL Data Compare 8"
sqldatacompare.exe /server1:INVERNESS\SQL2005 /db1:GREGSTEST_DEV /scr2:"C:\Documents and Settings\gsuttie\Desktop\SQL continuos\ScriptsFolder\GREGSTESTSCRIPTS"
/synchronize
pause
I have also tried /sync both erroring - where am i going wrong?
Thanks
Gregor
Your syntax there looks fine to me - what is the error message you get when this fails?
Technical author
Red Gate Software Ltd