Schema Compare for Oracle 5

Command line switches

/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 Schema Compare for Oracle from the command line.

For information about how to activate manually without an internet connection, see Activating.

Attempts to activate Schema Compare for Oracle.

You can specify a Schema Compare for Oracle serial number, or a serial number for bundle such as the Deployment Suite for Oracle:

sco /activateSerial:123-456-789012-ABCD

If you run the switch without specifying a serial number, the Activate Schema Compare for Oracle dialog box opens:

If you're using the Schema 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 the comparison and deployment behavior. For more information, see Setting project options.

The defaults are /b:hdrg (scriptheader, defineoff, detectcolumnrenames, and crossschemapermissions)

ValueOption
scriptheaderh
forcecolumnorderf
forwardslashs
defineoffd
blanklinesonb
excludetargetschemae
detectcolumnrenamesr
purgedroptablep
suppressaltercompilec
systempermissionsa
rolepermissionsi
progunitpermissionsj
crossschemapermissionsg
Behavior options can be bundled (eg /b:de) or used in long format (eg /behavior:defineoff /behavior:excludetargetschema).

Specifying a value for /behavior/ignore, or /storage clears the defaults for /behavior and /ignore.

 For example, if you specify /b:f, the defaults /i:sdwqgva and /b:hdrg no longer apply.

/deactivateserial

Attempts to deactivate the application. An internet connection is required to deactivate the product.

/deploy

Alias: /d

Deploys the source schema to the target schema. The target is modified. The source isn't modified.

Example

sco /project:"C:\Schema Compare for Oracle\Projects\WidgetDatabases.ocp" /deploy

If you're using /source and /target, all object differences are deployed.

If you're using a project file, only the selected object differences are deployed. To deploy all objects in a project file, use /deployallobjects.

/deployallobjects

Alias: /dao

This switch only works if you specify a value for /project.

Specifies that all object differences will be included in the deployment script, whether or not you selected them in the project.

Example

sco /project:"C:\Schema Compare for Oracle\Projects\WidgetDatabases.ocp" /deploy /deployallobjects

/deployscriptencoding:<encoding>

Alias: /depenc

Specifies the character encoding to use when writing the deployment script file. The default is UTF8.

Values

UTF8UTF-8 encoding, without preamble
UTF8WithPreambleUTF-8 encoding, with 3-byte preamble
UnicodeUTF-16 encoding
ASCIIASCII encoding

Example

sco /project:"C:\Schema Compare for Oracle\Projects\WidgetDatabases.ocp"
/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.


To force /direct to use service name on Oracle 12c and above specify /forceservicename (/fsn).

/excludedependencies

Alias: /exd

Excludes dependent (referenced) objects from deployment.

/exclude:<behavior>

Alias: /exc

Excludes objects that are only in the source, only in the target, or that exist in both but are different.

Arguments

Missingexclude any object only in the source that would generate a CREATE statement
Differentexclude any object in the source and target that is not equal, do not generate ALTER statements for these objects
Additionalexclude any object only in the target that would otherwise cause a DROP statement

/filter:<filterfile.scpf>

Alias: /f

Excludes objects from deployment based on the filter file generated by Source Control for Oracle. If the file Filter.scpf exists in the scripts source directory, it will be used by default, unless you specify /deployallobjects.

If you're using a filter file to exclude a dependent (referenced) object, you also need to specify /excludedependencies. Otherwise, the default behavior to include dependencies overrides the filter, and the dependent object is included.

Note that you can't choose to include or exclude specific dependencies  you can only include or exclude all of them.

/help

Alias: /?

Displays 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.

/ignore:<value>

This switch only works if you specify values for /source and /target.

Alias: /i

Ignores specified items when comparing data sources. For more information, see Setting project options.

The defaults are /i:sdwqgva (slowdependencies, dependentobjects, whitespace, doublequotes, storage, sequencevalue, and mviewvalue)

ValueAlias
slowdependenciess
dependentobjectsd
whitespacew
casedifferencesc
doublequotesq
sqlcommentsm
objectcommentso
constraintnamesn
indexnamesx
storageg
parallelp
sequencevaluev
permissionsr
loggroupsl
mviewvaluea
externaltablelocatione
lengthsemanticst
Ignore options can be bundled (eg /i:qp) or used in long format (eg /ignore:doublequotes /ignore:parallel)

Specifying a value for /behavior, /ignore, or /storage clears the defaults for /behavior and /ignore.

For example, if you specify /i:x, the defaults /i:sdwqgva and /b:hdrg no longer apply.

/ignorerules:<IgnoreRulesFile.scpf>

Alias: /igr

Excludes/includes objects (per object-type) from comparison based on the Ignore Rules file: Using ignore rules

/includeidentical

Alias: /ii

Specifies that identical objects are also included in the report. For example:

sco /project:"C:\Schema Compare for Oracle\Projects\WidgetDatabases.ocp" /report:"C:\Reports\WidgetReport.html" /reporttype:Simple /includeidentical

/indirect

Forces the connection to use the installed Oracle client (eg Oracle Instant Client), so you can connect using a service name.

Specifying this option has the same effect as clearing the Prefer direct connection option in the Schema Compare Application Options.

/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

sco ... /loglevel:verbose
You must use /loglevel each time you want a log file to be created.

/project:<project file>

Alias: /p

Specifies a saved Schema Compare for Oracle project file (.ocp) to compare. For example:

sco /project:"C:\Schema Compare for Oracle\Projects\WidgetDatabases.ocp"

The include in deployment checkbox selections made in the comparison results screen are honored when using /project from the command line. If all detected changes need to be deployed, ensure that the selection checkbox is checked when the project file is saved.

/quiet

Alias: /q

Quiet mode - displays no output.

/report:<file name>

Alias: /r

Generates a report and writes it to the specified file. You can use the /includeidentical and /reportselectedobjects switches to customize the report. 

The type of report generated is defined by the /reporttype switch. For example:

sco /project:"C:\Schema Compare for Oracle\Projects\WidgetDatabases.ocp" /report:"C:\Reports\WidgetReport.xml" /reporttype:XML

If a file with the same name already exists in the location you specify, it will be overwritten.

/reportselectedobjects

Alias: /rso

This switch only works if you specify a value for /project.

Specifies that only objects selected in the project file in the graphical interface will be included in the report.

Example

sco /project:"C:\Schema Compare for Oracle\Projects\WidgetDatabases.ocp" /report:"C:\Reports\WidgetReport.html" /reporttype:Simple /reportselectedobjects

/reporttype:<report type>

Alias: /rt

Specifies the file format of the report produced by the /report switch. The default is XML.

Arguments

XMLSimple .xml report
SimpleSimple .html report
InteractiveInteractive .html report
ExcelMicrosoft Excel .xls spreadsheet

For example, to create a simple HTML report:

sco /project:"C:\Schema Compare for Oracle\Projects\WidgetDatabases.ocp" /report:"C:\Reports\WidgetReport.html" /reporttype:Simple

/resolve:<issue>:<resolution>

Resolves script generation issues. For example:

/resolve:TargetUserDoesNotExist:Ignore

/scriptfile:<file name>

Alias: /sf

Generates a SQL deployment script which can be executed at a later time. For example: 

sco /project:"C:\Schema Compare for Oracle\Projects\WidgetDatabases.ocp"
/scriptfile:"C:\Deployment Scripts\WidgetDeployment.sql"

/scriptsfolder:<folder name>

This switch only works if you specify values for /source and /target.

Alias: /sfo

Creates a scripts folder to a specified location from the /source data source.

/snapshot:<snapshot file name>

This switch only works if you specify values for /source. The /Filter switch will have no affect when creating a snapshot.

Alias: /snp

Creates a snapshot of the /source data source, with the specified filename.

/snapshot1:<snapshot file name>

Alias: /snp1

This switch only works if you specify a value for /project.

Saves a snapshot of the source schema to the specified file. For example

sco /project:"C:\Schema Compare for Oracle\Projects\WidgetDatabases.ocp" /snapshot1:"C:\Snapshots\SourceSnapshot.onp"

If a file with the same name already exists in the location you specify, it will be overwritten.

/snapshot2:<snapshot file name>

Alias: /snp2

This switch only works if you specify a value for /project.

Saves a snapshot of the target schema to the specified file. For example

sco /project:"C:\Schema Compare for Oracle\Projects\WidgetDatabases.ocp" /snapshot2:"C:\Snapshots\TargetSnapshot.onp"

If a file with the same name already exists in the location you specify, it will be overwritten.

/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)
  • Manual connection with /forceservicename:
user/pass@host[:port]/service{SchemaA, SchemaB} [AS (Normal|SYSDBA|SYSOPER)] /forceservicename
  • LDAP
 (user/pass|/)@ldap{SchemaA, SchemaB} [AS ...]

Snapshot:

c:\snapshot.onp{SchemaA}

Scripts folder:

c:\ScriptsFolder{SchemaA}

/storage:<value>

Alias: /g

Includes storage options when comparing and scripting data sources. The default is none.

ValueAlias
alla
lobsb
compressionc
extentse
initransi
loggingl
pctfreep
tablespacet
informationlifecyclemanagementm

 

Specifying a value for /behavior, /ignore, or /storage clears the defaults for /behavior and /ignore.

For example, if you specify /i:x, the defaults /i:sdwqgva and /b:hdrg no longer apply.

/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)] (/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 ...]

Snapshot:

c:\snapshot.onp{SchemaA}

Scripts folder:

c:\ScriptsFolder{SchemaA}

/verbose

Alias: /v

Verbose mode - displays detailed output.

Contents


Didn't find what you were looking for?