Data Compare for Oracle - 2.1
Examples: Using the command line - Data Compare for Oracle
This topic provides some simple examples of how you can use the Data Compare for Oracle command line interface.
The command line interface for Data Compare for Oracle is a separate program called DCO.exe. It is installed in the same location as the graphical tool, typically:
C:\Program Files\Red Gate\Data Compare for Oracle 1
Note that you cannot use the command line to set data sources to compare, you must first create and save a project using the Data Compare for Oracle user interface.
Example 1: Getting a comparison summary
To get a comparison summary from a project saved as Example.dco using the command line:
dco /project:"C:\Data Compare for Oracle\Projects\Example.ocp"
The project option settings saved in the project are used for the comparison.
Example 2: Deploying data changes
To deploy data changes from a project saved as Example.dco using the command line:
dco /project:"C:\Data Compare for Oracle\Projects\Example.dco" /deploy
The following are used for the comparison and deployment:
- tables 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 Data Compare for Oracle user interface.
- project option settings saved in the project
Example 3: Creating a deployment script to run later
To create a deployment script from a project saved as Example.dco using the command line:
sco /project:"C:\Data Compare for Oracle\Projects\Exampe.dco" /scriptfile:"C:\Deployment Scripts\Script.sql"
Note that if there is already a file of the same name in the location you specify, it will be overwritten.
Example 4: Creating a report of comparison results
To create a CSV report of the differences between the tables in the Example.dco project using the command line:
sco /project:"C:\Schema Compare for Oracle\Projects\WidgetDatabases.ocp" /report:"C:\Reports"
Example 5: 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 tables selected in the Example.dco project, and outputs the results as the filelog_file.txt:
- Create the script:
dco /project:"C:\Data Compare for Oracle\Projects\Example.dco" >> 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?
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
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 Data Compare for Oracle