Command line switches
Published 24 February 2022
/abortonwarnings:<warning level>
Alias: /aow
Aborts the deployment if there are any deployment warnings at or above the warning level specified. You can specify medium or high. This will exit with code 63.
/activateserial:<serial number>
An internet connection is required to activate Data Compare for Oracle from the command line.
For information about how to activate manually without an internet connection, see Activating.
Attempts to activate Data Compare for Oracle.
You can specify a Data Compare for Oracle serial number, or a serial number for bundle such as the Deployment Suite for Oracle:
dco /activateSerial:123-456-789012-ABCD
If you run the switch without specifying a serial number, the Activate Data Compare for Oracle dialog box opens:
If you're using the Data Compare for Oracle command line on a server, you need a Deployment Suite for Oracle license.
/behavior:<value>
This switch only works if you specify values for /source and /target.
Alias: /b
Specifies options that affect deployment behavior.
The default is scriptheader.
Value | Alias | Description |
---|---|---|
deferconstraints | f | Alters the session to defer deferrable constraints. |
disableconstraints | c | Disables constraints and works around potential violations. |
disabletriggers | t | Disables all triggers on each table before changing the data. |
scriptheader | h | Includes a comment header at the top of deployment scripts. The header includes the date and time the script was created, and the Data Compare for Oracle version number. |
defineoff | d | Adds SET DEFINE OFF to the top of the script file so substitution variables are not used when running the script. |
removecontrolcharacters | r | Excludes control characters from the deployment script. |
useunistrinstringliterals | u | If the database character set is not Unicode, Unicode characters in scripts will be translated into the database character set and changed to fit the database character set with unknown characters removed. This option encodes Unicode characters using the UNISTR function so they are not changed. |
alwaysusecolumnnames | a | Includes column names in insert statements in the deployment script. You only need this option if the database you want to run the script on isn't one of the databases you're comparing, and if the column order might be different. |
Specifying a value for either /behavior or /comparison clears the defaults for both switches.
For example, if you specify /b:f, the defaults /c:wc and /b:h no longer apply.
/comparison:<value>
This switch only works if you specify values for /source and /target.
Alias: /c
Specifies options that affect comparison.
The defaults are ignorewhitespace and ignorecontrolcharacters.
Value | Alias | Description |
---|---|---|
trimtrailingspaces | s | If the data in two columns differs only by the number of spaces at the end of the string, Data compare for Oracle considers the data to be identical. If this option is selected, trailing spaces are ignored during deployment. |
ignorewhitespace | w | Ignores white space differences (newlines, tabs, spaces, etc) in text data (clobs, varchars, nvarchars etc). |
ignorecontrolcharacters | c | Ignores control character differences in text data (eg clobs, varchars, nvarchars etc). |
ignoredatetypedifferences | t | Ignores data differences in date type (timestamp, date etc) columns. |
checkfordata | d | Checks each table for data. If either table is empty, no comparison key is required. |
includeviews | v | Includes views in the comparison. Care must be taken when deploying changes to views due to potential issues modifying the underlying table. |
includesourcetables | o | When deploying data to a target that differs structurally from the source, or has no tables at all (eg, an empty folder), selecting this option uses the table structure from the source for both the source and the target. Use this option when generating a static data deployment script against a target on which the static data tables have yet to be created. |
includenewcolumns | n | When comparing using a project file, this option includes columns that were created since the project file was last updated. |
Specifying a value for either /behavior or /comparison clears the defaults for both switches.
For example, if you specify /c:s, the defaults /c:wc and /b:h no longer apply.
/comparisonkeys:<regular expression>:<index name or comma-separated columns>
This switch only works if you specify values for /source and /target.
Alias: /ck
Specifies which index or column(s) to use as the comparison key for specific tables or views (case-insensitive). If a column and an index have the same name, the index will be used.
For example, to use PK_WidgetPrices as the comparison key in the table WidgetPrices:
dco ... /comparisonkeys:"WidgetPrices":PK_WidgetPrices dco ... /comparisonkeys:"WidgetPrices":WidgetID,Active
Specify the name of the table or view using a regular expression. We recommend you use a regular expression that matches only one table or view, by surrounding the name in double quotes.
More information on how to specify table and view names using regular expressions
/deactivateserial
Attempts to deactivate Data Compare for Oracle. An internet connection is required to deactivate the product.
/deploy
Alias: /d
Deploys the schemas after comparison. Changes are migrated from <schema1> to <schema2>.
/deployscriptencoding:<encoding>
Alias: /depenc
Specifies the character encoding to use when writing the deployment script file. The default is UTF8.
Arguments
UTF8 | UTF-8 encoding, without preamble |
UTF8withpreamble | UTF-8 encoding, with 3-byte preamble |
Unicode | UTF-16 encoding |
ASCII | ASCII encoding |
Example
dco /project:"C:\Data Compare for Oracle\Projects\WidgetDatabases.dco" /scriptfile:"C:\Deployment Scripts\WidgetDeployment.sql" /deployscriptencoding:ASCII
/direct
Forces the connection to use the internal Oracle client where possible. You can't connect via TNS name or service name using this option, but no Oracle client (eg Oracle Instant Client) is required.
/exclude:<regular expression>
This switch only works if you specify values for /source and /target.
Specifies objects to exclude (case-insensitive).
Use /exclude for each object you want to exclude. Alternatively, use /exclude only once, and specify table or view names using regular expressions. Use double quotes (") for an exact match.
For example, to include the table Contacts:
dco ... /exclude:"Contacts"
More information on how to specify table and view names using regular expressions
/exclude takes precedence over /include.
/excludecolumns:<regular expression>:<comma-separated column names>
This switch only works if you specify values for /source and /target.
Alias: /ec
Specifies columns to exclude for specific tables or views. Specify table or view names using regular expressions.
For example, to exclude the column WidgetName in the table WidgetReferences:
dco ... /excludecolumns:"WidgetReferences":WidgetName
/excludecolumns takes precedence over /includecolumns.
More information on how to specify table and view names using regular expressions
/help
Alias: /?
Display help, with a list of all commands. Use in conjunction with /verbose for more detailed information. If this switch is used with any switches other than /verbose, those switches will be ignored.
/include:<regular expression>
This switch only works if you specify values for /source and /target.
Specifies objects to include (case-insensitive).
Use /include for each object you want to include. Alternatively, use /include only once, and specify table or view names using regular expressions. Use double quotes (") for an exact match.
If you specify /include, all other tables and views are excluded by default. For example, to include only the table Products:
dco ... /include:"Products"
/exclude takes precedence over /include.
More information on how to specify table and view names using regular expressions
/includecolumns:<regular expression>:<comma-separated column names>
This switch only works if you specify values for /source and /target.
Alias: /ic
Specifies columns to include for specific tables or views. Specify table or view names using regular expressions.
If you specify /includecolumns, all other columns are excluded by default.
For example, to include only the columns ID, Price, and Date in the table WidgetPrices:
dco ... /includecolumns:"WidgetPrices":ID,Price,Date
More information on how to specify table and view names using regular expressions
/includerows:<value>
This switch only works if you specify /deploy, /report, or /scriptfile.
You can't specify /deploy or /scriptfile with /includerows:identical.
Alias: /ir
Specifies types of rows to include in reports, scripts, or deployments. Specify multiple values as a comma-separated list. The defaults are source, target, and different.
Example
dco ... /includerows:source,different
identical | Rows that are in both source and target, where all columns are equal. Unaffected by deployment. |
source | Rows that are only in the source. Generates INSERT statements. |
target | Rows that are only in the target. Generates DELETE statements. |
different | Rows that are in both source and target as matched by the comparison key but other columns are modified. Generates UPDATE statements. |
/indirect
Forces the connection to use the installed Oracle client (eg Oracle Instant Client), so you can connect using a service name (default).
/loglevel:<level>
Alias: /log
Creates a log file with a specified minimum log level. The default is none.
Log files collect information about the application while you're using it. These files are useful to us if you've encountered a problem. For more information, see Logging and log files.
Arguments
None | Disables logging |
Error | Reports serious and fatal errors |
Warning | Reports warning and error messages |
Verbose | Reports all messages in the log file |
Example
dco ... /loglevel:verbose
/onlyfirst1000rows
Alias: /1000
Shows only the first 1000 rows in the report.
/overwritereports
Alias: /f
Forces the overwriting of any report files that already exist. If this switch isn't used and a file of the same name already exists, the program will exit with the exit code indicating an IO error.
/project:<project file>
Alias: /p
Specifies a saved Data Compare for Oracle project file (.dco) to compare.
dco /project:"C:\Data Compare for Oracle\Projects\WidgetDatabases.dco"
/quiet
Alias: /q
Quiet mode - displays no output.
/report:<file name or directory>
Alias: /r
Exports results as .csv files to the specified directory, or as an HTML report to the specified file name. If the /reporttype is CSV, this specifies a directory to export the .csv files to. If the /reporttype is HTML, this specifies a file name to write the HTML report to.
To overwrite an existing report file, use /overwritereports. If you try to export a report file with the same name as an existing report file without using /overwritereports, the program will exit with the exit code indicating an IO error.
/reportrows:<reportrows1>:<reportrows2>:...<reportrowsN>
This switch is deprecated. Instead use /includerows.
/reporttype:<report type>
Alias: /rt
Values: CSV (default), HTML
Specifies the type of report produced by the /report switch.
/scriptfile:<file name>
Alias: /sf
Generates a SQL deployment script which can be executed at a later time.
/source:<value>
Alias: /s
The data source and schema(s) to use as the comparison source. The schemas are compared in the order they appear.
Live without Oracle client:
user/pass@host[:port]/sid{SchemaA} [AS (Normal|SYSDBA|SYSOPER)] (/direct)
Live with Oracle client:
- TNS name:
(user/pass|/)@tns{SchemaA, SchemaB} [AS (Normal|SYSDBA|SYSOPER)]
- Manual connection:
(user/pass|/)@host[:port]/service{SchemaA, SchemaB} [AS ...] (/indirect)
- LDAP
(user/pass|/)@ldap{SchemaA, SchemaB} [AS ...]
Scripts folder:
"path to scripts folder"{SchemaA, SchemaB}
/target:<value>
Alias: /t
The data source and schema(s) to use as the comparison target. The schemas are compared in the order they appear.
Live without Oracle client:
user/pass@host[:port]/sid{SchemaA} [AS (Normal|SYSDBA|SYSOPER)]
Live with Oracle client:
- TNS name:
(user/pass|/)@tns{SchemaA, SchemaB} [AS (Normal|SYSDBA|SYSOPER)]
- Manual connection:
(user/pass|/)@host[:port]/service{SchemaA, SchemaB} [AS ...] (/indirect)
- LDAP
(user/pass|/)@ldap{SchemaA, SchemaB} [AS ...]
Scripts folder:
"path to scripts folder"{SchemaA, SchemaB}
/verbose
Alias: /v
Verbose mode - displays detailed output.