Comparison document is not loaded
Comparison document is not loaded
I am getting this error when I attempt to run at the command line, using an .scomp for the comparison.
================================================================================
Devart dbForge Schema Compare for SQL Server v4.0.32
================================================================================
Started at: 12/22/2015 1:05:08 PM.
/schemacompare /compfile:"C:\Comparisons\operations.scomp" /sync log:"C:\Comparisons\Logs\operations.log"
Comparison document is not loaded.
I have verified the .scomp document exists and it loads just fine through the GUI.
================================================================================
Devart dbForge Schema Compare for SQL Server v4.0.32
================================================================================
Started at: 12/22/2015 1:05:08 PM.
/schemacompare /compfile:"C:\Comparisons\operations.scomp" /sync log:"C:\Comparisons\Logs\operations.log"
Comparison document is not loaded.
I have verified the .scomp document exists and it loads just fine through the GUI.
Re: Comparison document is not loaded
I've found a little more information on this. It seems to be permissions related. The OS is MS Server 2012. The user attempting access to the .scomp was not the user that created the .scomp file. I opened Schema Compare with the credentials of the user that required access, was able to open the .scomp in the UI, delete the old .scomp and save the new .scomp. I suddenly was able to access the .scomp file through the command line again. Weird
Re: Comparison document is not loaded
Hello.
Thanks for the post!
There are two ways available.
1. You can specify a user name and password in *.scomp as the following:
- open *.scomp using any text editor
- find <ConnectionString>
- specify User ID = sa; Password = sa
- save *.scomp
2. You can use the following command:
/schemacompare /source server:SqlServer1 user:sa password:sa database:db1 /target server:SqlServer2 user:sa password:sa database:db2 /sync:"D:\compare_result.sql"
Best Regards.
Thanks for the post!
There are two ways available.
1. You can specify a user name and password in *.scomp as the following:
- open *.scomp using any text editor
- find <ConnectionString>
- specify User ID = sa; Password = sa
- save *.scomp
2. You can use the following command:
/schemacompare /source server:SqlServer1 user:sa password:sa database:db1 /target server:SqlServer2 user:sa password:sa database:db2 /sync:"D:\compare_result.sql"
Best Regards.
Re: Comparison document is not loaded
Thanks jp, but it's not the connection strings. It seems related to the ownership of the .scomp file. Once I changed ownership to the intended user, everything seems to work OK. I can't tell if this is an application issue or Windows Server 2012 permissions "feature".
Re: Comparison document is not loaded
I think I have it figured out.
The error appears to only be generated when the domain account the command line is executed under is logged off the machine. This doesn't make sense to me.
Sounds like I may need to put in a support ticket to get this resolved. Thoughts
The error appears to only be generated when the domain account the command line is executed under is logged off the machine. This doesn't make sense to me.
Sounds like I may need to put in a support ticket to get this resolved. Thoughts
Re: Comparison document is not loaded
Could you please provide us the following information:
1. User permissions on loading the *.scomp file when you get the error.
2. User permissions on correct loading the *.scomp file.
3. Screenshot of the error.
Also, please check that, if the user permissions are equal, the error happens only when "Authentication = <SQL Server authentication>" or, in case "Authentication = <Windows authentication>", the error also happens?
1. User permissions on loading the *.scomp file when you get the error.
2. User permissions on correct loading the *.scomp file.
3. Screenshot of the error.
Also, please check that, if the user permissions are equal, the error happens only when "Authentication = <SQL Server authentication>" or, in case "Authentication = <Windows authentication>", the error also happens?
Re: Comparison document is not loaded
A screenshot, or rather, a modified copy\paste of the output is at the top of this thread. The error simply states, "The comparison document could not be loaded". Not very helpful.
The .scomp file uses Integrated Security. The only difference is that the domain account is not logged onto the machine when it errors. If the user is logged in, the comparison loads just fine.
The .scomp file uses Integrated Security. The only difference is that the domain account is not logged onto the machine when it errors. If the user is logged in, the comparison loads just fine.
Re: Comparison document is not loaded
I've inspected the .scomp xml, the registry connection values, the server and database permissions. I don't see anything that would generate the error, which seems to point to the xml "document" not being loaded, or an inability to load it.
SQL Agent, via proxy, calls a batch file containing the command line call to the schema compare tool, using the .scomp. Proxy account has sysadmin permissions on the server; both OS and SQL. If there was a kerberos issue or some other permissions issue, I would expect to see an unauthorized or authentication error. Instead we see a failure to load an xml document.
SQL Agent, via proxy, calls a batch file containing the command line call to the schema compare tool, using the .scomp. Proxy account has sysadmin permissions on the server; both OS and SQL. If there was a kerberos issue or some other permissions issue, I would expect to see an unauthorized or authentication error. Instead we see a failure to load an xml document.
Re: Comparison document is not loaded
Please note that the Windows authentication can work only if the user has logged in. So, you have to either log in or specify an SQL Server user in the *.scomp schema comparison document.
Re: Comparison document is not loaded
I understand Windows authentication, which is why a proxy account exists on the SQL instance calling the command. The proxy is set up with the credentials of the intended Windows user. The issue isn't authentication; it has something to do with the way Schema Compare is handling the .scomp file when the user isn't physically logged into a machine.
Re: Comparison document is not loaded
dbForge handles the .scomp file on behalf of the user that is used to run dbForge.
Re: Comparison document is not loaded
That's what I was assuming based on what I was seeing in the xml and registry. I was trying to refresh a build environment with an automated schema-only refresh from production, using an .scomp file to handle the connections, compare, and sync options. Worked great so long as the account used for the process was actually logged into the machine. As soon as the user logged out and someone else logged in, the process broke.
That stinks
I've moved on and am handling the process with an argument file and embedding the connections, still using Integrated Security, and it's working. But I don't have any control over the sync options with this method. Is there any way to dictate sync options with an argument file, similar to what an .scomp does?
That stinks

I've moved on and am handling the process with an argument file and embedding the connections, still using Integrated Security, and it's working. But I don't have any control over the sync options with this method. Is there any way to dictate sync options with an argument file, similar to what an .scomp does?
Re: Comparison document is not loaded
Sorry for the delay on this.
Please make sure you are using the latest version 4.1 https://www.devart.com/dbforge/sql/sche ... nload.html
Please make sure you are using the latest version 4.1 https://www.devart.com/dbforge/sql/sche ... nload.html
Re: Comparison document is not loaded
Also, we recommend you to create a connection with the comp\autoAcct user.
Re: Comparison document is not loaded
Please see https://www.devart.com/dbforge/sql/sche ... ration.htmIs there any way to dictate sync options with an argument file, similar to what an .scomp does?