Red Gate forums :: View topic - Command Line - compare and do not include identical
Return to www.red-gate.com RSS Feed Available

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

Command Line - compare and do not include identical

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



Joined: 07 Jul 2011
Posts: 30

PostPosted: Tue Mar 11, 2014 12:04 pm    Post subject: Command Line - compare and do not include identical Reply with quote

Hello,
we are using the command line tool of SQL Compare and I want to archive to get a comparison report in conjunction with the script file and not including the identical objects into the comparison report.

Currently I have to specify all the time the switch include:identical to avoid the exit code 63. So far so good. In the relase notes for 10.4 I read that with the ticket SC-6165 it is fixed.
For me it's still the case. I doing something wrong?
Basically SQL Compare should exit without an error and show me only the differences in the comparison report? Identical objects should be excluded from the report.

May be the switch /assertidentical could help me. But unfortunately it tells me that I can't used it together with the scriptfile parameter.

For doing so I am using the XML file feature.

Code:

<?xml version="1.0" encoding="utf-8"?>
<commandline>
    <scripts1>snapshot</scripts1>
    <server2>.</server2>
    <database2>MyDatabase</database2>
   
    <exclude>Role</exclude>
    <exclude>User</exclude>

    <!-- avoid getting error number 63 (Databases identical) -->
   <include>identical</include>

    <options>IgnoreWhiteSpace,IgnoreDatabaseAndServerName,IgnoreWithElementOrder,IgnoreUserProperties</options>   

    <scriptfile>C:\solutions\logs\MyDatabase\UpdateDbStructure.sql</scriptfile>
    <report>C:\solutions\logs\MyDatabase\UpdateDbStructure.html</report>
    <reporttype>Interactive</reporttype>
</commandline>
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6678

PostPosted: Fri Mar 14, 2014 12:47 pm    Post subject: Reply with quote

I've had a look at SC-6165 and it says this is about getting identical results in the report when you use the /exclude:identical argument. This is now fixed. However you have a peripheral issue where you need to include identical to rid yourself of error code 63. Unfortunately you cannot both exclude identical records and avoid error code 63.

What I typically recommend is to wrap the command into a batch file where you can trap error code 63 and return 0 instead using EXIT /B like this:
http://www.red-gate.com/messageboard/viewtopic.php?t=14969
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6678

PostPosted: Fri Mar 14, 2014 12:47 pm    Post subject: Reply with quote

I've had a look at SC-6165 and it says this is about getting identical results in the report when you use the /exclude:identical argument. This is now fixed. However you have a peripheral issue where you need to include identical to rid yourself of error code 63. Unfortunately you cannot both exclude identical records and avoid error code 63.

What I typically recommend is to wrap the command into a batch file where you can trap error code 63 and return 0 instead using EXIT /B like this:
http://www.red-gate.com/messageboard/viewtopic.php?t=14969
Back to top
View user's profile Send private message
rre



Joined: 07 Jul 2011
Posts: 30

PostPosted: Mon Mar 17, 2014 3:28 pm    Post subject: Reply with quote

Thanks, for sharing this forum post. This helps me a lot, because it's sounds like that I am not the only one having this problem.

Do you think there will be a feature coming to avoid executing SQL Compare twice? Or do I have to do a feature request on the uservoice?
Back to top
View user's profile Send private message
Brian Donahue



Joined: 23 Aug 2004
Posts: 6678

PostPosted: Mon Mar 17, 2014 5:36 pm    Post subject: Reply with quote

Uservoice may be the best option - I think we considered the matter closed when SQL Compare was changed so error code 63 was negated when you included identical. In the case where you don't want identical or error code 63 it's not the best solution.
Back to top
View user's profile Send private message
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