What are the challenges you face when working across database platforms? Take the survey

Error on command line sync but no error returned

thom.bolinthom.bolin Posts: 12
edited February 21, 2011 4:04PM in SQL Compare Previous Versions
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.



  • Options
    Thanks for your post.

    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)
  • Options
    Below are the contents of the file:
    C:\Temp>type mkdb2_pmf.txt
    Serial Number: 507-005-******-****

    Registering data sources
    Creating mappings
    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.


    If you would like to could send you snaps of both databases.
  • Options
    Thanks for your reply.

    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
  • Options
    Thanks for the edit. kdupree is an user in the db1 database that does not exist in db2 database. She has been granted permissions but I don't sync ids. The permissions could be ignored to make the issue go away but if an error occurs I need the failure recorded.

    i'm running the compares using my id tpbolin.
Sign In or Register to comment.