Trying to set up a batch file that handles running replication on our development server. Replication is FILE based. Running version 12.0.1 Build 3152. Everything looks correct in what I'm looking at here, but I'm sure I've missed something. My batch file is scheduled to fire every hour at the top of the hour. It contains this line of script to run dbremote.
C:\Program Files\SQL Anywhere 12\Bin32\dbremote.exe -l 100000 -t -m 128M -qc -v -o "C:\repfiles\repdb\dbremote_log.dat" -c "eng=testdb;dbn=dev;uid=***;pwd=***;links=tcpip;con=replmsgagent;" C:\Database\TestDB
For the record. I have extracted two databases from the consolidated database, so the subscriptions have started for those users.
All directories are in place for the corresponding databases. Publisher user is in place.
The problem I'm having, is when I run the batch file, the command window briefly shows for a probably a tenth of a second. Then nothing happens. There is no indication that replication has fired. Nothing. I'm convinced that dbremote isn't even firing. If I open up a manual command window and just manually run dbremote.exe, it fires off and gives me an error about not having a database. So I know it will open.
A similar batch file to this one works without a problem on our production server which is running ASA6.
Can somebody possibly point me to something that I might be missing in the script I have here. For the record, I commented out my userid and password.
Any suggestions would be greatly appreciated!!
asked 16 May '11, 19:40
I guess the command path should be enclosed in double quotes as it contains spaces:)
As given, the command shell is going to start the "C:Program" file, which won't be successful. And therefore SQL Remote won't even get a chance to log something...
If you enter your command directly in a CMD window, the error should show up.
Furthermore, to make SQL Remote run in batch mode, you should add the -b option.
So your command might look like:
"C:\Program Files\SQL Anywhere 12\Bin32\dbremote.exe" -b -l 100000 -t -m 128M -qc -v -o "C:\repfiles\repdb\dbremote_log.dat" -c "eng=testdb;dbn=dev;uid=***;pwd=***;links=tcpip;con=replmsgagent;" C:\Database\TestDB
or using the SQLANY12 environment variable:
"%SQLANY12%\Bin32\dbremote.exe" -b -l 100000 -t -m 128M -qc -v -o "C:\repfiles\repdb\dbremote_log.dat" -c "eng=testdb;dbn=dev;uid=***;pwd=***;links=tcpip;con=replmsgagent;" C:\Database\TestDB
answered 17 May '11, 04:06