Full Command-Line Reference

All keywords are case-insensitive.

If a command works directly with MINE/APPLY/FETCHER (not by process name), you have to choose your process by "CHOOSE" command. (This is not needed in simple configurations with only one MINE/APPLY as this happens automatically).
The syntax diagrams in this document use a variation of Backus-Nauer Form (BNF), a convention familiar to any reader of Oracle documentation and many other documents. Emphasis and symbols have the following meaning in this version of BNF syntax.

  • Keywords are shown in UPPERCASE.
  • Placeholders for which you must substitute an actual value are shown in lowercase. These can include clauses and other expressions.xxxdatafile249
  • Vertical (|) bars separate multiple choices. They indicate "or".
  • Square brackets ( [] ) are not typed. They indicate that the enclosed syntax is optional.
  • Curly braces ( {} ) usually are not typed. They indicate that you must specify one of the enclosed choices. (The choices are separated by vertical bars.)
  • Loops or repetitions are indicated by a second, bracketed appearance of the term, set of terms, or expression, followed by ellipsis points. The brackets indicate that the repetition is optional (all repetitions are optional). The ellipsis points indicate that multiple repetitions are allowed. The bracketed appearance of the term begins with a comma if the repetitions are comma delimited.
  • All other punctuation (quotation marks, commas, semicolons, and so on) must be typed as shown.
  • Some commands require a restart of the MINE or APPLY processes.

APPLY

APPLY COMMIT TRANSACTION. Force commit of the specified transaction on APPLY. Use List transactions first to see what transactions are currently pending on APPLY.

Ensure you fully understand the implication before running this command. 

APPLY ROLLBACK TRANSACTION. Force rollback of the specified transaction on APPLY. Use List transactions first to see what transactions are currently pending on APPLY.

Ensure you fully understand the implication before running this command.

COMMENT

Ignored. Just a comment, useful in scripts.

If the # character is used, it must be preceded by a space (" #"). If there is no space, it is considered part of the command, thus tables with # in their name can be used (e.g. "PREPARE TABLE SCOTT.TEST#").

EXCLUDE COLUMN

Set a column to be excluded in mining. Use this if you don't want to replicate a specific column(s) in a table. Use the % character as a wildcard. Underscore (_) is not treated as a special character.
Note that PREPARE automatically includes all columns and EXCLUDE thus must follow the prepare. The table must already be PREPARED for the column to be excluded.

The EXCLUDE COLUMN commands can be placed in the *.dbvrep script after the last PREPARE OFFLINE command, before the *-all.sh or *-all.bat script is run.

This command requires a restart of the MINE process.

EXCLUDE CREATE TABLE

Maintain the list of tables/table name patters that should not be automatically prepared when created on source, although DDL is enabled and whole schema is prepared. The main use case for this feature is to skip various temporary tables that should not be replicated. Use the % character as a wildcard. Underscore (_) is not treated as a special character.

The commands add a new rule; if an existing rule of opposite meaning already exists, it is deleted instead. The matching starts with the oldest one and goes on till the newest rule added; if a reordering is needed, clear the list and start again. The SHOW option lists the existing rules using the very same syntax, so the list can be easily edited and then executed to APPLY the changes.

This command requires a restart of the MINE process.

EXEC

Execute command in a new shell.

EXIT, QUIT

Exits dbvrep.

FILTER

Set filtering rules for an already prepared table/schema. The usual way how to configure filtering is using Setup wizard (which in turn uses this very command). 

If OFFLINE is used, APPLY/MINE will pick the change on the next start. Use OFFLINE if the APPLY and MINE are not running, as some network configurations may cause long timeouts while PREPARE tries to connect to the APPLY/MINE.

HEALTHCHECK

Connects to MINE and APPLY (and FETCHER if configured). Checks that they see each other.

HELP

 

Shows general help, help for specific command or help for a variable.

LIST

Displays the current status of MINE, APPLY and FETCHER processes. 

Connects to database and lists registered REDOLOGS / PLOGS.


LIST PROGRESS. Show tabular overview of MINE/APPLY records processed and conflicts. You can optionally specify a schema to filter the results to a particular database schema (this is source schema if renaming is used). Use ALL to see everything including Dbvisit Replicate internal tables.


LIST PREPARE. Show list of prepared tables. You can optionally specify a schema to filter the results to a particular database schema (this is source schema if renaming is used). Use ALL to see everything including internal tables.

LIST OBSOLETE REDO. Obtains a list of obsolete archived redo log files that are not needed by Dbvisit Replicate anymore and therefore maybe deleted. For example when using RMAN to manage the archive logs, this information can be fed into the RMAN backup script.

LIST CONFLICT. List the current conflict(s). This information is obtained from Dbvisit Replicate internal table DBRSAPPLY_CONFLICT_LOG on the APPLY side. 

LIST STATS. Display statistics for number of rows processed/minute and/or lag between MINE and APPLY. The lag can be displayed in terms of time or SCN difference; the number of rows per minute can be shown globally or for specified table.

By default, the number of rows processed/minute represents APPLY performance; use LIST STATS TOTAL MINE to see MINE statistics.

LIST TRANSACTIONS. This command lists opened uncommitted transactions on APPLY. The Transaction ID is the hex value of the combined columns XIDUSN, XIDSLOT, XIDSQN from v$transaction on the target database. The Transaction ID is also set in columns MODULE and ACTION from V$SESSION on the target database.

The transaction list may also include internal non committed transaction not related to the replication. Please see List transactions for more information.

Use APPLY COMMIT TRANSACTION to force commit of the specified transactions on APPLY, or APPLY ROLLBACK TRANSACTION to force rollback of the transaction on APPLY. Ensure you fully understand the implication before running the COMMIT or ROLLBACK commands. 

MEMORY_SET

Sets configuration variable in memory only. Use for variables that cannot be set in the DDC DB or if you want the value to be valid for short time only. After restart of the process the setting will no longer APPLY  (unless MEMORY_SET is specified in the DDC file).

MEMORY_RESET

Unsets variable, in memory only.

READ

Reads the designated file like it would be entered at command prompt. As with SQL*Plus, both "@file" and "@ file" work.

READDDC

Read the specified DDC file. Same as command line option "--ddcfile file", which is preferred, as READDDC is from interactive prompt sets some variables too late to be effective (e.g. STATUSBAR).

RESET

Unsets variable for a specified process, falling back to general non-process-specific setting.

To clear the counters, see clear.

SET

Sets configuration variable in memory and DDC DB. This setting will be permanent. See memory_set for setting in memory only and which are not permanent.

SETUP WIZARD

Starts the setup wizard.

SHOW

With no parameter or with ALL, shows all configuration variables, as they are seen by current process. It does not reread DDC file nor DDC DB to update the settings.
With variable, shows variable value. (For * and also for all processes.)

WAIT

Waits until killed.

QUERYMODE


FILE: Parses given online/archive redo, generates PLOG and parses the PLOG. (Note that to generate traces etc. during query mode, you still have to set the corresponding configuration variables.)
In query mode, incomplete PLOG will generate only an error, not a fatal error.
Note that this is a local API command, so you have to see the redo log on local filesystem.
No changes are actually applied to APPLY database.
PLOG: Parses selected PLOG (usually a conflict error PLOG) – either by specifying a filename, or by conflict id.
In query mode, incomplete PLOG will generate only an error, not a fatal error.
Note that this is a local API command, so you have to see the error-log on local filesystem, and have to be able to connect to APPLY database to query metadata if using conflict id.
No changes are actually applied to APPLY database.
CONFLICT: If error PLOGS are enabled (disabled by default), tries to get error PLOG for given conflict id and run QUERYMODE PLOG on that file.

VERSION

Shows Dbvisit Replicate version. Can be also invoked by --V switch.

PREPARE

Used for adding tables or schemas to the replication.

Prepares a schema/table for replication and declares that their content is in sync as of now. If a schema is prepared and DDL replication is enabled, new tables created in this schema in future will be also prepared and replicated. By default, this command connects to running APPLY and MINE and instructs them to replicate the schema/table. If OFFLINE is used, APPLY/MINE will pick the new tables on the next start. Use OFFLINE if the APPLY and MINE are not running, as some network configurations may cause long timeouts while PREPARE tries to connect to the APPLY/MINE.

By default, DDL replication is enabled. Use NODDL to disable it (mandatory for non-Oracle databases). 

RENAME clause makes the replication to APPLY the changes to the given schema/table at APPLY. Note that the RENAME TO clause requires the NODDL option.

PREPARE will lock the table to ensure no inflight transactions are missed.

During initial setup in the *.dbvrep script, the PREPARE command is often preceded with the ENGINE LOCK TABLES, or ENGINE LOCK SCHEMAS command (followed by the RELEASE LOCK).

Prepare recognizes that the ENGINE LOCK command has run and use the SCN from the lock. So when multiple tables are prepared, only a single SCN is used for all tables. When an ENGINE LOCK command has been issued in the same session, then the PREPARE command will no longer lock the tables. To clear the session, restart the console.

UNPREPARE

Used for removing tables or schemas from the replication.

Unprepares a schema/table for replication and declares that this object should no longer be replicated.

If OFFLINE is used, APPLY/MINE will pick the change on the next start. Use OFFLINE if the APPLY and MINE are not running, as some network configurations may cause long timeouts while PREPARE tries to connect to the APPLY/MINE.

REPREPARE

Used for adding tables or schemas to the replication.

Reprepare does UNPREPARE and PREPARE in a single step to save typing. It also understands that there is no need to drop supplemental logging in the unprepare phase as prepare would create it again.

INCLUDE COLUMN

This command relates to the EXCLUDE COLUMN command and can be used to:

  1. Remove and already existing EXCLUDE COLUMN rule 

This command requires a restart of the MINE process.

INCLUDE CREATE TABLE

This command relates to the EXCLUDE CREATE TABLE command and can be used in two ways:

  1. Remove and already existing EXCLUDE CREATE TABLE rule 
  2. Add an exception to the EXCLUDE CREATE TABLE rule. For example, EXCLUDE CREATE TABLE SCOTT.TEMP%, but INCLUDE CREATE TABLE SCOTT.TEMP_REPL

This command requires a restart of the MINE process.

CDCAUDIT

Configure CDC/Aduit for an already prepared table/schema. The usual way how to configure this is using Setup wizard (which in turn uses this very command). 
This command sets this feature for insert/update/delete operations, sets the prefix for new/old value columns and configures additionall added columns (operation type, transaction, session audit information).

LICENSE

Shows current license, as set by LICENSE_KEY variable.
The optional FULL keyword specifies the verbosity of the command:

dbvrep> license show
Licensed for , 30-day license (trial license). dbvrep> *license show full
Product: Dbvisit Replicate
Allowed versions:1.0-2.63
Key-version: 1
License type: RS1S
Customer id: 1.0 (trial license)
Production: yes
License-type: server
Name: *
Expiry: 30 days
CPU count mine: 0
CPU count apply: 0
Row-count limit: unlimited
Enabled options: rac, fetcher, partitions, onetomany, cascade, 2way, ddl, asm, mysql, mssql, oracle, snmp, mail_notify
Licensed for *, 30-day license (trial license).

 

CHOOSE

Choose process to work with when issuing commands or displaying settings. This can be done by specifying the process name or by means of source and target databases.

By default all commands work with the default processes MINE and APPLY. This command is useful when working with 2-way replication where there are multiple processes such as MINE, APPLY, MINE1 and APPLY1.

Note that the CHOOSE REPLICATON command selects all processes for the indicated replication. 

 

Example:

CHOOSE REPLICATION MINE1

The above command will choose the replication pair that is associated with MINE1. Typically this is MINE1->APPLY1

In contrast, CHOOSE PROCESS selects only the selected process (not the pair) and is generally not recommended. It can be used in special cases such as one to many replications to specify a specific process. 

PAUSE

Asks the given process to pause.

RESUME process_name

Asks the given process to resume.

START process_name

Starts process.

SHUTDOWN process_name

Connect to MINE/APPLY/FETCHER and request it to shut down.
ALL means requesting all processes defined in DDC to shut down.

DUMP

Request MINE/APPLY to dump debug information to log.
DUMP ALL is invoked automatically when exiting due to a untrapped fatal error.
DUMP ALL can be also invoked by sending SIGUSR2 (kill -12) to the process (not available on Windows).

CLEAR


PROGRESS: Asks MINE and APPLY to reset progress counters.
CONFLICT: Asks APPLY to reset conflict counters.

SET_CONFLICT_HANDLERS

Gets object id as of current MINE progress and sets conflict handlers for this table (schema.name refers to current table name at MINE).

The DEFAULT conflict handler will not be applied to existing prepared (replicated) tables. The DEFAULT conflict handler will only be applied to tables that are prepared after the DEFAULT conflict handler is set. To change the conflict handler for existing prepared tables, each table has to be individually set using FOR TABLE conflict handler.

SHOW_CONFLICT_HANDLERS

Shows current setting of conflict handlers for given table (schema.name refers to table at MINE).

RESOLVE


Contacts APPLY and resolves current conflict.

CLEAR SCREEN, CLS

Clear console screen.

DDL

Create DDL for create or drop given table or all tables in a given schema. The output can be to screen (print), to file (spool) or directly executed (replicate). This is used if ddl_run is used as instantiation type in setup wizard.

NOTIFY

Sends sample email/SNMP trap – use to test your SMTP/SNMP configuration.

CREATE SERVICE process

Create Windows service for given process.

DELETE SERVICE process

Delete Windows service for given process.

START_SERVICE process

Start Windows service for given process. Same as Windows command NET START.

CREATE WINDOWS SHORTCUT

Create a shortcut to start-console.bat and place it on the Desktop. (Windows only.)

CREATE DDCDB/DDCFILE

Load DDC from file to database or vice versa. This is done automatically during *-all.sh/.bat (from file to database) and then on every process start (from database to ddc_backup directory).

ENCRYPT password

Encrypts the password, so the value can be used in the DDC file, where all passwords are stored encrypted.

UPGRADE REPOSITORY

 

Upgrade the Dbvisit Replicate repository to a newer version.

DOWNGRADE REPOSITORY

 

Downgrade the Dbvisit Replicate repository to an older version.