Schema Compare snapshots from commandline

Discussion of open issues, suggestions and bugs regarding database management and development tools for Oracle
Post Reply
rprastein
Posts: 5
Joined: Fri 02 Nov 2012 00:12

Schema Compare snapshots from commandline

Post by rprastein » Fri 02 Nov 2012 02:05

Is it possible to compare schema snapshots using the commandline interface? I was hoping to use the commandline to integrate Schema Compare as an outside diff tool in our revision control system. So far, all of the commandline switches that I see for identifying source and target for comparison indicate ways to specify a DB connection.

I want to check the snapshots into the revision control system, and use the commandline Schema Compare to compare them. is there any way to do this?

Thanks,

Rebeccah

alexa

Re: Schema Compare snapshots from commandline

Post by alexa » Fri 02 Nov 2012 17:12

You can compare snapshots with the command line interface of the product.

For example:

C:\Program Files\Devart\dbForge Schema Compare for Oracle>
schemacompare.com /schemacompare /source snapshot:"d:\test\source.snap" /target snapshot:"d:\test\target.snap"

You can find more examples in Help documentation of the product.

rprastein
Posts: 5
Joined: Fri 02 Nov 2012 00:12

Re: Schema Compare snapshots from commandline

Post by rprastein » Fri 02 Nov 2012 19:09

Thank you, I'll try that. I'd been looking in the Help file and in the commandline help, and hadn't found an example with the snapshot: parameter.

I have also just found that the program behavior of these two commands is different:

schemacompare.exe /schemacompare /compfile:"C:\Documents and Settings\me\My Documents\dbForge Schema Compare for Oracle\StarTeam_Schema_Compare3.scomp"

schemacompare /schemacompare /compfile:"C:\Documents and Settings\me\My Documents\dbForge Schema Compare for Oracle\StarTeam_Schema_Compare3.scomp"

When I call schemacompare.exe, I get the GUI main page (without doing any comparison), and when I leave off the .exe file extension, I get text output from the comparison (which is very useful in some situations, but isn't quite what I'm looking for, either).

Now you are saying to use a .com extension. I am going to guess that omitting the file extension runs the .com file, rather than the .exe.

Can I launch the GUI compare with the source and target prepopulated?

Thanks again,

Rebeccah

alexa

Re: Schema Compare snapshots from commandline

Post by alexa » Mon 05 Nov 2012 12:37

Thank you for bringing it to our attention. We will add the according information to the product's Help documentation in one of the next builds of the product.

You probably specified the 'schemacompare.exe' in the command line whereas the 'schemacompare.com' must be used. As you noticed on the forum, the .com extension can be omitted in the command line. Please see an example:

C:\Program Files\Devart\dbForge Schema Compare for Oracle>
schemacompare.com /schemacompare /source snapshot:"d:\test\source.snap" /target snapshot:"d:\test\target.snap" /sync

Also, you can obtain information on switches by typing the following in the command line:

C:\Program Files\Devart\dbForge Schema Compare for Oracle>
schemacompare

More examples can be obtained by typing the following:

C:\Program Files\Devart\dbForge Schema Compare for Oracle>
schemacompare /schemacompare /?

> Feature request: A simple commandline option to open the GUI in the New Comparison window, with two input snapshot filenames prepopulating the source and target of the comparison. For all I know, you may already have this - but I haven't figured out how, yet.

Please note that the command line interface is not intended to invoke the GUI of dbForge Schema Compare for Oracle. However, you may be interested in creating a .scomp schema comparison document with the help of the New Schema Comparison wizard in the GUI. This file contains prespecified comparison connection details and options and can be used in the command line interface for comparison and synchronization as follows:

C:\Program Files\Devart\dbForge Schema Compare for Oracle>
schemacompare /schemacompare /compfile:"D:\DB\file_name.scomp"

You can also open and modify the previously generated .scomp file in the GUI.

We also recommend you to see the 'How To: Compare and Synchronize Schemas through Command Line' topic in Help documentation.

Post Reply