Schema Compare for Oracle - 2.0
Examples: Using the command line - Schema Compare for Oracle
This topic provides some simple examples of how you can use the Schema Compare for Oracle command line interface.
Note that you cannot use the command line to set data sources to compare, you must first create and save a project using the Schema Compare for Oracle user interface.
For more information on the switches you can use with the Schema Compare for Oracle command line see: Switches used in the command line.
Example 1: Deploying schema changes
To deploy schema changes from a project saved as WidgetDatabases using the command line:
sco /project:"C:\Schema Compare for Oracle\Projects\WidgetDatabases.ocp" /deploy
The following are used for the comparison and deployment:
- objects that were selected for comparison when you saved the project
If you want to include or exclude objects from an existing project, you must modify your selection using the Schema Compare for Oracle user interface.
- project option settings saved in the project
Example 2: Creating a deployment script to run later
To create a deployment script from a project saved as WidgetDatabases:
sco /project:"C:\Schema Compare for Oracle\Projects\WidgetDatabases.ocp" /scriptfile:"C:\Deployment Scripts\WidgetSyncScript.sql"
Note that if there is already a file of the same name in the location you specify, an error will ocur.
Example 3: Creating a HTML report of comparison results
To create a simple HTML report of the differences between schemas in the WidgetDatabases project using the command line:
sco /project:"C:\Schema Compare for Oracle\Projects\WidgetDatabases.ocp" /report:"C:\Reports\WidgetReport.html" /reporttype:Simple
Example 4: Scheduling a comparison
You can use the Microsoft Windows® Scheduled Task wizard to schedule a comparison by creating a script to run the comparison.
The following example compares schemas selected in the WidgetDatabases project, and outputs the results as the file log_file.txt:
- Create the script:
sco /project:"C:\Schema Compare for Oracle\Projects\WidgetDatabases.ocp" >> C:\log_file.txt - Save the script as a .bat file.
You specify the .bat file as the program to run from within the Scheduled Task wizard by browsing to it.
MS-DOS batch scripting is used in this example, a basic scripting language that is supported on all versions of Windows. If preferred, you could use VBScript, JScript, PHP, Perl, Python or any other scripting language of your choice.
Was this article helpful?
Schema Compare for Oracle
all SQL products
- Compatibility of Red Gate tools in 64-bit environments
- Application has encountered an error and needs to close
- Error message after installing SQL Toolbelt - The description for Event ID ( 1 ) in Source ( nview_info ) cannot be found.
- Changing the temporary directory used by the installer
- Toolbelt Installer "hanging" while "scanning volumes"
- Login failing with "trusted SQL Server connection" error when using RunAs
all products
- Some Red Gate products identified as containing a trojan by Anti-Virus software
- Activation may fail with Unknown Error -1
- Product uses web help although a CHM file is available locally
- Argument exception resulting from missing environment variable
- Check for updates may fail when used through proxies
- 'Unidentified Publisher' error when repairing or uninstalling
- Licensing activates product as standard edition
- Moving Red Gate software products to another machine
- Red Gate tools log locations
- The application UI opening slowly when there is no internet access
Schema Compare for Oracle
all SQL products
all products
- Red Gate product acknowledgements
- Activating your products
- Activating your products
- Red Gate bundle history
- Check for updates
- Troubleshooting Check for Updates errors
- Current versions
- Deactivating your products
- Installing Red Gate products from the .msi file
- Requesting additional activations
- Serial numbers for bundles
- Reactivating using a different serial number
- Extending your trial
- Finding your serial numbers
- Moving a serial number from one computer to another
- No response received for manual activation
- Licensing and activation resources
- Licensing and activation resources
- Troubleshooting licensing and activation errors
- Licensing and activation FAQs
- Red Gate tools log file locations
- Download old versions of products
- Download product prerequisites & utilities
- Support & upgrades
- Upgrading your software
- Upgrading FAQs

Using Schema Compare for Oracle