| Author |
Message |
SeaSharp
Joined: 21 Sep 2011 Posts: 9
|
Posted: Wed Sep 21, 2011 9:23 pm Post subject: Cmd Line: objects are identical or no objects selected |
|
|
I'm trying to execute a sqlcompare from the command line, like so...
| Code: |
| sqlcompare /Project:"C:\Whatever.scp" |
It returns the error message, "The selected objects are identical or no objects have been selected in the comparison." The DB's are not identical & the compare successfuly shows this when using the SQL Compare desktop. Yes, I did see this post which states that "you'll need to run a comparison, check the boxes, and save the project." That isn't working for me. I've tried...
1. Creating the project, executing the compare then saving the SCP.
2. Creating the project, saving the SCP then executing the compare.
I'm not having any luck. I'm using SQL Compare 9.0.0.79 Professional Edition from the Sql Developer Bundle.
Thanks
Last edited by SeaSharp on Tue Sep 27, 2011 6:10 pm; edited 1 time in total |
|
| Back to top |
|
 |
SeaSharp
Joined: 21 Sep 2011 Posts: 9
|
Posted: Thu Sep 22, 2011 3:31 pm Post subject: |
|
|
Ahh...figured it out. The "no objects have been selected" refers to the things you want to synchronize after the compare is complete. It is not the things you want to compare.
 |
|
| Back to top |
|
 |
Chris Auckland
Joined: 24 Oct 2006 Posts: 710 Location: Red Gate Software Ltd.
|
Posted: Mon Sep 26, 2011 12:35 pm Post subject: |
|
|
Thanks for posting your solution.
Let us know if you have any other problems. _________________ Chris |
|
| Back to top |
|
 |
SeaSharp
Joined: 21 Sep 2011 Posts: 9
|
Posted: Mon Sep 26, 2011 2:31 pm Post subject: |
|
|
Thanks Chris. So, is there a way to execute JUST the compare from the command line using a SCP? I'm trying to integrate with CruiseControl.Net. I don't want to sync, just compare.
Last edited by SeaSharp on Mon Sep 26, 2011 2:41 pm; edited 1 time in total |
|
| Back to top |
|
 |
Chris Auckland
Joined: 24 Oct 2006 Posts: 710 Location: Red Gate Software Ltd.
|
Posted: Mon Sep 26, 2011 2:33 pm Post subject: |
|
|
Yes, if you don't use the /synchronize(/sync) switch, then only the compare operation will be performed.
To synchronize, you have to specify the /sync switch. _________________ Chris |
|
| Back to top |
|
 |
SeaSharp
Joined: 21 Sep 2011 Posts: 9
|
Posted: Mon Sep 26, 2011 2:40 pm Post subject: |
|
|
I'm not using that switch. Yet, I get the error message that there are no objects to compare. This is all I'm doing...
| Code: |
| sqlcompare /Project:"C:\Whatever.scp" |
|
|
| Back to top |
|
 |
Chris Auckland
Joined: 24 Oct 2006 Posts: 710 Location: Red Gate Software Ltd.
|
Posted: Mon Sep 26, 2011 2:55 pm Post subject: |
|
|
This is a bit strange. The command line comparison should be exactly the same as the GUI comparison.
What differences are being reported in the GUI? Are the objects listed in any of the 'objects with differences' groups in the top of the results grid, or are the differences only noticed in the SQL Differences pane at the bottom of the screen? _________________ Chris |
|
| Back to top |
|
 |
SeaSharp
Joined: 21 Sep 2011 Posts: 9
|
Posted: Mon Sep 26, 2011 3:18 pm Post subject: |
|
|
In the GUI, at the top grid, I have:
+ 102 objects that exist in both but are different
+ 2 objects that exist only in <ServerName>.<DatabaseName>
+ 808 identical objects
All of the 102 differences are found in stored procedures. When I click the stored procedure name it brings up the SQL pane and highlights the difference in green. They are definitely different.
This is what the compare looks like when executed from the command line:
| Code: |
C:\Program Files (x86)\Red Gate\SQL Compare 9>sqlcompare /Project:"C:\Whatever.scp"
SQL Compare Command Line V9.0.0.79
==============================================================================
Copyright c Red Gate Software Ltd 1999-2011
Serial Number: <My Serial Number>
Registering data sources
Creating mappings
Comparing
Applying project settings
Error: The selected objects are identical or no objects have been selected in
the comparison. |
|
|
| Back to top |
|
 |
Chris Auckland
Joined: 24 Oct 2006 Posts: 710 Location: Red Gate Software Ltd.
|
Posted: Mon Sep 26, 2011 5:10 pm Post subject: |
|
|
What happens if you use the command line switches rather than referencing a project file? e.g.
C:\Program Files (x86)\Red Gate\SQL Compare 9>sqlcompare /s1:MySourceServer /db1:MyDB /s2:MyTargetServer /db2:MyDB /options:default _________________ Chris |
|
| Back to top |
|
 |
SeaSharp
Joined: 21 Sep 2011 Posts: 9
|
Posted: Tue Sep 27, 2011 4:42 pm Post subject: |
|
|
| It did work with the command line. But, it also defeats the purpose of having all my settings wrapped up in the project file. |
|
| Back to top |
|
 |
Chris Auckland
Joined: 24 Oct 2006 Posts: 710 Location: Red Gate Software Ltd.
|
Posted: Fri Sep 30, 2011 9:18 am Post subject: |
|
|
I haven't been able to reproduce this yet.
Does the problem remain if you create a brand new project file?
Also, could you try using the /Include:Indentical switch with the project file?
If neither of these make a difference, would you be able to send me a SQL Compare snapshot of the source and target schemas, and also the project file?
I should then be able to recreate the project here. _________________ Chris |
|
| Back to top |
|
 |
SeaSharp
Joined: 21 Sep 2011 Posts: 9
|
Posted: Fri Sep 30, 2011 4:38 pm Post subject: |
|
|
I tried using the /Include:Indentical switch. I got an error message stating the switch is not allowed when specifying a project file.
I created a new project file from scratch. It still had the same problem
Unfortunately, I cannot send the schema because it is a sensitive problem domain related to safety & security. I realize that limits your ability to help me. Perhaps I can try to reproduce the problem with a new mock database. I'll see what I can do. |
|
| Back to top |
|
 |
Chris Auckland
Joined: 24 Oct 2006 Posts: 710 Location: Red Gate Software Ltd.
|
Posted: Tue Oct 04, 2011 3:33 pm Post subject: |
|
|
That would be great if you could.
You also might like to try using an XML arg file instead of the project file as a workaround. You reference the arg file like you reference the project file, but it's not as easy to create as there isn't a UI for it. _________________ Chris |
|
| Back to top |
|
 |
bcpreece
Joined: 26 Mar 2007 Posts: 32
|
Posted: Wed Nov 02, 2011 5:23 pm Post subject: |
|
|
I am also having this problem. I have 7 differences in my project but I get the same error. I am also using a project file.
Error: The selected objects are identical or no objects have been selected in
the comparison.
I tried adding the include statement to my xml document but I want to use 3 types in my include statement so I get differences, missing and add but when I put that in my xml file I get this error.
Error: The /include and /project or /filter switches cannot be specified
together with anything other than /include:identical |
|
| Back to top |
|
 |
Grimbear13
Joined: 02 Nov 2011 Posts: 1
|
Posted: Wed Nov 02, 2011 7:57 pm Post subject: |
|
|
| Was having this problem and you guys cleared it up. On your second post you mentioned selecting the "Items for synchronization". So in my project I selected what I needed saved the project and now it displays the results. |
|
| Back to top |
|
 |
|