Error on command line sync but no error returned
thom.bolin
Posts: 12
I am using an SSIS package and a table that holds target and source database information. This information is read and the command line of SQLcompare 8 is called and passed in a some parameters. ie:
sqlcompare /snapshot1:c:\temp\%1_%2.snp /s2:%3 /db2:%4 /exclude:user /exclude:role /options:d,ist,iq,nt /sf:c:\temp\%1_%2.sql /synchronize /out:c:\temp\%1_%2.txt
I compare to a snapshot so that I have a backup of the database and am not going against my production directly.
My issues is that the compare if failing with a missing domain user but the return code is 0. I check the return code to verify the sync was successful and then only mail back issues for resolution.
Is there an option or something I'm missing that is allowing this to error off and return a 0. if I misspell a instance or db I get and error code.
Thanks
sqlcompare /snapshot1:c:\temp\%1_%2.snp /s2:%3 /db2:%4 /exclude:user /exclude:role /options:d,ist,iq,nt /sf:c:\temp\%1_%2.sql /synchronize /out:c:\temp\%1_%2.txt
I compare to a snapshot so that I have a backup of the database and am not going against my production directly.
My issues is that the compare if failing with a missing domain user but the return code is 0. I check the return code to verify the sync was successful and then only mail back issues for resolution.
Is there an option or something I'm missing that is allowing this to error off and return a 0. if I misspell a instance or db I get and error code.
Thanks
Comments
When the sync fails, you should get error 126 returned. It's a bit strange you're getting 0.
What happens when you run the command through the command prompt rather than an SSIS package?
What does it say in the redirected console output? (c:\temp\%1_%2.txt)
C:\Temp>type mkdb2_pmf.txt
Serial Number: 507-005-******-****
Registering data sources
Creating mappings
Comparing
Applying Command Line Items
Creating SQL
Synchronizing databases (from DB1 to DB2)
Error: Synchronization of 'mkdb2.PMF' and 'mcktorcdev09\rgdb2.PMF' failed: Windows NT user or group
'TORCHMARKCORP\KDUPREE' not found. Check the name again.
C:\Temp>
If you would like to could send you snaps of both databases.
I edited your last post to remove your serial number.
It looks like the windows account you're using for the comparison can't be authenticated. Are you able to log into both servers with SSMS using that account?
You could try using a SQL Account for each database, e.g. /username1:sa /Password1:mypassword /username2:sa /username2:mypassword
i'm running the compares using my id tpbolin.