Red Gate forums :: View topic - Running bat file
Return to RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
SQL Compare 10
SQL Compare 10 forum

Running bat file

Search in SQL Compare 10 forum
Post new topic   Reply to topic
Jump to:  
Author Message

Joined: 26 Feb 2014
Posts: 1

PostPosted: Wed Feb 26, 2014 5:47 am    Post subject: Running bat file Reply with quote


I have assumed management of 2 servers and SQL Compare is installed and used to sync instances that are replicated on both servers. Our nightly job runs a bat file that initiates the program. Other than that, I really don't know what it does and furthermore I don't know if there are reports produced in case if the nightly compare has discrepancies.

Can someone please decipher this for me and explain what SQL Compare is asked to do? Here is a sample of the code. Thank you

sqldatacompare /server1:... /database1:abc /username1:... /Password1:... /server2:... /database2:abc /username2:... /Password2:... /sync
Back to top
View user's profile Send private message
Anu Deshpande

Joined: 20 Apr 2009
Posts: 692
Location: Cambridge

PostPosted: Fri Feb 28, 2014 12:48 pm    Post subject: Reply with quote

Thanks for your post.

First thing is your's is a SQL Data compare command line command and not SQL Compare.

SQL Compare compares the schema of the two databases where as SQL Data Compare compares the data.

More about them here: SQL Compareand SQL Data Compare

Now looking at your SQL Data Compare command line: It is comparing 2 databases and synchronizing with the default option set.

More information on command line for SQL Compare and SQL Data Compare.

You also asked about any output file/email notification: You can use MAPI to send you email notification. The batch file will look something like this:

cd c:\program files\Red Gate\SQL Compare 10

SQLCompare /server1:(local) /server2:(local) /database1:WidgetDev /database2:WidgetProd /v /out:"C:\output.txt" /force



MAPISend -i -r -s "SQL Compare Error" -m "Failed job! Error Code:%Errorlevel%"


Hope this answers all your questions.
Anuradha Deshpande
Product Support
Redgate Software Ltd.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group