Comments
9 comments
-
This sounds similar to an issue that some other users have reported recently, and we have logged as a bug.
I'll try to replicate your steps here and see if I can get the same thing - you should be able to use the exclude switch as far as I know, so it may be worth sending over your full command - if you want to mail support directly, we have a ticket open for this, so please quote F0046838 in the subject line. -
Hello,
My .bat file is:
C:
cd "C:\Program Files (x86)\Red Gate\SQL Data Compare 9"
sqldatacompare /Project:"C:\DataSynch\Testing.sdc" /Exclude:"table:extratable" /Verbose /Synch >> C:\DataSynch\log.txt
which still gives me the Error: Object reference not set to an instance of an object message.
extratable is the name of the additional table that is only present in the target db. -
OK, I've just tested this here, and it looks like you are right. The exclude switch indeed appears to ignore the instruction to skip that table. We have a bug logged (SDC-1190) which may be related to this; so I'll update it with this thread. Hopefully it can get sorted out easily.
-
Thanks for the quick replies! For now I can just use the GUI (this was more of a test than a critical application), please let me know when the release is in place (my goal is to have this run as a scheduled Windows task).
-
No problem - I'll update this post when I get notified of a fix!
-
I just spotted this thread - the problem was also reported here: http://www.red-gate.com/supportcenter/Content?c=knowledgebase%5cSQL_Backup%5cKB200903000369.htm&p=SQL%20Backup and that details a patch that should fix the problem.
-
I can try that registry fix, but I'm a little skeptical that authentication is cuasing this issue, as it can see the table that exists in both databases perfectly fine and works fine if the extra table is removed...
-
Registry fix? Ah - wrong link.
Ignore that.
Clipboard fail! That's actually a SQL Backup article.
You need to refer to this: http://www.red-gate.com/messageboard/viewtopic.php?t=13265 -
That one makes more sense. I'll try out the patch and post back if it's successfull. Thanks!
Add comment
Please sign in to leave a comment.
Registering databases
Mapping
Comparing databases
Error: Object reference not set to an instance of an object.
If I physically remove the extra table from the target this error does not occur through the command line. I've been unable to find a way to remove the extra table from appearing in the "Tables and Views" section in the GUI (it shows up in the target db with blank fields for the source db, it also appears in the unmapped section on the mapping tab) - I feel like this is causing the error to be thrown. So far no combination of /Include or /Exclude switches has solved this problem.