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 and in help and man page 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.
  • 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.
  • Where applicable, these symbols are replaced by graphics in this document.
  • Some commands require a restart of the FETCHER, MINE or APPLY processes.

COMMENT

Ignored. Just a comment, useful in scripts. See also COMMENT.

This command can be added to end of other commands, too.

If the # character is used after another command, 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#").

EXEC

Execute command in a new shell. See also EXEC.

dbvrep> !pwd
/home/oracle/demo                                                                                                                                                  

READ

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

dbvrep> @/home/oracle/my_file_name.txt                                                                                                                                                     

APPLY

APPLY COMMIT TRANSACTION. Force commit of the specified transaction on APPLY. 

Example:

dbvrep> APPLY COMMIT TRANSACTION 0002.01a.00010cec                                                                                                                                      
Commit added to applier and applier ran.                                                                                                                                                dbvrep>   

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 these commands. 

Example:

dbvrep> APPLY ROLLBACK TRANSACTION 0002.01a.00010cec                                                                                                                                    
Rollback added to applier and applier ran.                                                                                                                                              dbvrep>                                                                                                                                                     


APPLY FLUSH FILES. When the output is into files (CSV/Hadoop), force flush of committed data in memory to disk, even if the files would be below configured size thresholds.

Example:

dbvrep> apply flush files                                                                                                                                                       
1 file flushed.
dbvrep>                                                                                                                                                                                                                                                                                             

APPLY REGISTER PLOG. In certain circumstances you may copy plogs manually to the target server.  Use this command to tell apply about these new files.  Make sure that the files do exist on the target.  This command must be run the target server.  This may mean that you must run the dbvrep console from the target server.

Example:

dbvrep> apply register plog 2865                                                                                                                                                        
Manually registering plogs 2865 to 2865:
OK: Plog information updated (seq 2865).
dbvrep>       
dbvrep> apply register plog 2864 to 2865                                                                                                                                                
Manually registering plogs 2864 to 2865:
OK: Plog information updated (seq 2864).
OK: Plog information updated (seq 2865).   
dbvrep>                                                                                                                                                       

CDCAUDIT

Configure CDC/Audit 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 additional added columns (operation type, transaction, session audit information, etc).

CHOOSE

CHOOSE REPLICATION process  will allow you to choose which processes will be specified 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. The CHOOSE REPLICATION 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 REPLICATION command selects all processes for the indicated replication. 

Example:

dbvrep> choose replication MINE                                                                                                                                                         
Process type MINE set to: MINE.
Process type APPLY set to: APPLY.

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

CHOOSE PROCESS 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. 

Example:

dbvrep> CHOOSE PROCESS MINE                                                                                                                                                             
Process type MINE set to: MINE.
dbvrep>    

CHOOSE SHOW will show which processes are currently selected. 

Example:

dbvrep> choose show                                                                                                                                                                     
Process MINE chosen, it is a MINE.
Process APPLY chosen, it is a APPLY.
dbvrep>       

CLEAR

CLEAR PROGRESS COUNTERS.  Asks MINE and APPLY to reset progress counters.

Example:

dbvrep> clear progress counters                                                                                                                                                         
Progress counters reset (apply). Progress counters reset (mine).                                                                                                                        dbvrep>                                                                                                                                                        


CLEAR CONFLICT COUNTERS. Reset the conflict counters.

Example:

dbvrep> clear conflict counters                                   
Conflict counters reset (APPLY).                                                                                                                                                        dbvrep>                                                                                                                                                           


CLEAR APPLY COUNTERS. Reset conflict counters.

Example:

dbvrep> clear apply counters      
Conflict counters reset (APPLY).                                                                                                                                                        dbvrep>                                                                                                                                                      


CLEAR SCREEN: Clear console screen. Same as CLS.

Example:

dbvrep> CLEAR SCREEN                                                                                                                                             dbvrep>                                                                                                                                                     


CLEAR SCREEN, CLS

CLS. Same as CLEAR SCREEN.

Example:

dbvrep> CLS
dbvrep>                                                                                                                                                                                                                                                                  

COMMENT

Ignored. Just a comment, useful in scripts. See also COMMENT_HASH.

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

Example:

dbvrep> create ddcdb from ddcfile                                                                                                                                                       
DDC loaded into database (363 variables).
dbvrep>    
dbvrep> create ddcfile testddc from ddcdb                                                                                                                                              
DDC file testddc created with (355 variables).
dbvrep>         

CREATE SERVICE

CREATE SERVICE. Creates a Windows service for given process. (Windows only)

Example:

dbvrep> CREATE SERVICE MINE     
Service DbvisitReplicateorcldb_MINE successfully created.                                                                                                                                                       dbvrep>                                                                                                                                                      

CREATE WINDOWS SHORTCUT

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

Example:

dbvrep> CREATE WINDOWS SHORTCUT    
Shortcut file C:\Users\oracle\orcl Dbvisit Replication console.lnk created.                                                                                                                                                       dbvrep>                                                                                                                                                      

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 or ddl_file is used as instantiation type in setup wizard.

Example:

dbvrep> DDL CREATE PRINT scott.dept                                                                                                                                                
CREATE TABLE "SCOTT"."DEPT" (
  "DEPTNO" NUMBER(2),
  "DNAME" VARCHAR2(14),
  "LOC" VARCHAR2(13));
dbvrep>   
dbvrep> DDL DROP PRINT scott.dept                                                                                                                                                       
DROP TABLE "SCOTT"."DEPT" cascade constraints;
dbvrep>  
dbvrep> DDL CREATE SPOOL SCOTT.dept to test.txt                                                                                                                 
File test.txt has been written successfully.



DELETE SERVICE

Example:

Delete Windows service for given process. (Windows only)

dbvrep> DELETE SERVICE MINE     
Service DbvisitReplicateorcldb_MINE deleted.                                                                                                                                                       dbvrep>                                                                                                                                                      


DOWNGRADE REPOSITORY

Downgrade the Dbvisit Replicate repository to an older version.  This should only be done if an error message suggests this with the advice and consent of Dbvisit Support.  Use the format 2.6.00.  The version must include 4 digits.

Example:

dbvrep> DOWNGRADE REPOSITORY APPLY 2.6.00                                                                                                                       
Downgrade to 2.6.00 done.
APPLY: Downgrade done.
dbvrep>   
                                                                                                                                                    

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

Example:

dbvrep> DUMP MINE ALL                                                                                                                                           
Dump complete.                                                                                                                                                  dbvrep>
dbvrep> DUMP MINE MESSAGES
Trace messages dump complete.                                                                                                                                   dbvrep>    
dbvrep> DUMP MINE MEMORY_ACCOUNTING                                                                                                                             
Memory accounting dump complete. 
dbvrep> 

ENCRYPT

Encrypts the password, so the value can be used in the DDC file, where all passwords are stored encrypted.  The value would be used in the parameter DDC_PASSWORD.  This is the password for the DDC_USER, that defaults to dbvrep.  You would use this if you change the password for the dbvrep user.

Example:

dbvrep> encrypt my_pwd                                                                                                                                                                  
53616c7465645f5f7fcfb4c7746094088bfb512b79af23bf
dbvrep>

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.

Example:

dbvrep>EXCLUDE COLUMN SCOTT.DEPT.LOC                                                                                                                                           
Connecting to running mine [SCOTT.DEPT.LOC] 2: [Column excluded (1 internal records).]
Exclude Column [SCOTT.DEPT.LOC] set. 
dbvrep>

EXCLUDE CREATE TABLE

Maintain the list of tables/table name patterns 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.

Additional example found @ https://support.dbvisit.com/hc/en-us/articles/115000220613-Exclude-CREATE-TABLE-for-a-specific-schema

This command requires a restart of the MINE process.

Example:

dbvrep> EXCLUDE CREATE TABLE scott2%.%                                                                                                                          
Exclude rule created.
dbvrep>
dbvrep> EXCLUDE CREATE TABLE SHOW                                                                                                                              
List of excluded (included) tables:
EXCLUDE CREATE TABLE CLEAR
EXCLUDE CREATE TABLE scott2%.%
1 rule(s) listed.
dbvrep> 
dbvrep> EXCLUDE CREATE TABLE CLEAR                                                                                                                              
1 rule(s) deleted.
dbvrep>     

EXEC

Execute command in a new shell. See also EXCLAMATION MARK.


Example:

dbvrep> EXEC pwd                                                                                                                                                
/home/oracle/v2714_4933
dbvrep>   

EXIT

Exits dbvrep. See also QUIT.

Example:

dbvrep> EXIT

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

It is strongly advised NOT to put a semicolon after the command or/and enclose the condition into quotes in the console or upon restart of APPLY process it will not start & create support package.

Following are examples of how NOT to define filters:

Semicolon at the end of the command
FILTER TABLE SCOTT.DEPT ON INSERT SET TO deptno > 50;
Condition enclosed into quotes
FILTER TABLE SCOTT.DEPT ON INSERT SET TO "deptno > 50"


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.

Example:

dbvrep> FILTER TABLE SCOTT.DEPT ON INSERT SET TO deptno > 50                                                                                                   
Connecting to running apply: [Apply table removed (1 metadata record(s)). Apply table added (1 metadata record(s)).]
Filter condition on table SCOTT.DEPT set.
dbvrep> 
dbvrep> FILTER SCHEMA SCOTT ON INSERT SET TO where id >20                                                                                  
Connecting to running apply: [Apply table removed (0 metadata record(s)). Apply table added (0 metadata record(s)).]
Filter condition on table SCOTT.BONUS set.
Connecting to running apply: [Apply table removed (0 metadata record(s)). Apply table added (0 metadata record(s)).]
Filter condition on table SCOTT.DEPT 
Connecting to running apply: [Apply table removed (0 metadata record(s)). Apply table added (0 metadata record(s)).]
Filter condition on table SCOTT.EMP set.
Connecting to running apply: [Apply table removed (0 metadata record(s)). Apply table added (0 metadata record(s)).]
Filter condition on table SCOTT.SALES set.
Connecting to running apply: [Apply table removed (0 metadata record(s)). Apply table added (0 metadata record(s)).]
Filter condition on table SCOTT.SALGRADE set.
Connecting to running apply: [Apply table removed (0 metadata record(s)). Apply table added (0 metadata record(s)).]
dbvrep> 
dbvrep> filter show table scott.sales                                                                                                      
Filter conditions on table SCOTT.SALES are set as follows:
insert     : deptno>50
pre-update : (no filter)
post-update: (no filter)
delete     : (no filter)
dbvrep>    
dbvrep> filter show schema scott                                                                                                           
Filter conditions on schema SCOTT are set as follows:
insert     : (no filter)
pre-update : (no filter)
post-update: (no filter)
delete     : (no filter)
dbvrep>   

HEALTHCHECK

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

Example:

dbvrep> HEALTHCHECK                                                                                                                                             
Connectivity test for APPLY: OK
Connectivity test for MINE: OK
2 processes checked.
dbvrep>  

HELP


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

Example:

dbvrep> HELP FILTER                                                                                                                                             
Command FILTER: Set filtering condition
-- Command syntax --
FILTER [OFFLINE] (TABLE schema.table | SCHEMA schema) ON (INSERT|PRE-UPDATE|POST-UPDATE|DELETE) SET TO sql condition: Set filtering condition for specified table/schema for specified operation.
dbvrep>  
dbvrep> HELP SET MAILCFG_SMTP_SERVER                                                                                                                            
MAILCFG_SMTP_SERVER - Sets SMTP mail server to be used for sending emails.
dbvrep>   


INCLUDE COLUMN

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

  1. INCLUDE any already EXCLUDED column as part of replication, to be mined and sent to APPLY.


Note:  See  "EXCLUDE COLUMN" command reference above.

This command does not require a restart of the MINE process.

Example:

dbvrep> INCLUDE COLUMN SCOTT.DEPT4.loc

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.

Example:

dbvrep> INCLUDE CREATE TABLE SCOTT2.%                                                                                                                           
Include rule created.
dbvrep>   
dbvrep> INCLUDE CREATE TABLE SHOW                                                                                                                               
List of excluded (included) tables:
EXCLUDE CREATE TABLE CLEAR
EXCLUDE CREATE TABLE scott2%.%
INCLUDE CREATE TABLE SCOTT2.%
2 rule(s) listed.
dbvrep>   dbvrep> INCLUDE CREATE TABLE CLEAR2 rule(s) deleted.
dbvrep>

LICENSE

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

Example:

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


Additionally to set the license key use the following command in the console:
dbvrep> set license_key XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX

LIST

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

Example:

dbvrep> LIST STATUS              
MINE IS running. Currently at plog 3274 and SCN 79668707 (03/30/2015 05:09:34).
APPLY IS running. Currently at plog 3274 and SCN 79668685 (03/30/2015 05:09:29).
dbvrep>    


Connects to database and lists registered REDOLOGS / PLOGS.

Example:

dbvrep> LIST MINE REDOLOGS                                                                                                                                      

O Seq#   FirstSCN    NextSCN    ReadCount  StartDate              EndDate              FileName
-----------------------------------------------------------------------------------------------
N 3267   79626512   79634437            1   30.03.2015 03:23:40   30.03.2015 03:23:53 
/u01/app/oracle/fast_recovery_area/SDB11/archivelog/2015_03_30/o1_mf_1_3267_bkkyb3jm_.arc
N 3268   79634437   79635588            1   30.03.2015 03:23:54   30.03.2015 03:24:06 
/u01/app/oracle/fast_recovery_area/SDB11/archivelog/2015_03_30/o1_mf_1_3268_bkkyb7gq_.arc
N 3269   79635588   79635595            1   30.03.2015 03:24:06   30.03.2015 03:24:06 
/u01/app/oracle/fast_recovery_area/SDB11/archivelog/2015_03_30/o1_mf_1_3269_bkkybcsz_.arc
N 3270   79635595   79635664            1   30.03.2015 03:24:06   30.03.2015 03:24:06 
/u01/app/oracle/fast_recovery_area/SDB11/archivelog/2015_03_30/o1_mf_1_3270_bkkybkz1_.arc
N 3271   79635664   79635727            1   30.03.2015 03:24:06   30.03.2015 03:25:57  
dbvrep> 
dbvrep> LIST APPLY PLOGS                                                                                                                                        
O Seq#   FirstSCN    NextSCN    LastSCN ProcessDate         FileName
--------------------------------------------------------------------
N 3267   79626512   79634434   79632380 30.03.2015 03:24:03 /home/oracle/review/apply/3267.plog
N 3268   79634437   79635583   79635587 30.03.2015 03:24:19 /home/oracle/review/apply/3268.plog
N 3269   79635588   79635589   79635594 30.03.2015 03:24:49 /home/oracle/review/apply/3269.plog
N 3270   79635595   79635659   79635663 30.03.2015 03:24:50 /home/oracle/review/apply/3270.plog


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

Example:

dbvrep> LIST PROGRESS SCOTT
 Progress of replication review: total/this execution
    --------------------------------------------------------------------------------------------------------------------------------------------

    SCOTT.T2:                     100%  Mine:23/23           Unrecov:0/0         Applied:23/23       Conflicts:0/0       Last:30/03/2015 03:27:19/OK

    SCOTT.DEPT:                   100%  Mine:27/27           Unrecov:0/0         Applied:27/27       Conflicts:0/0       Last:30/03/2015 03:26:16/OK

    SCOTT.EMP:                    100%  Mine:14/14           Unrecov:0/0         Applied:14/14       Conflicts:0/0       Last:30/03/2015 03:26:16/OK
--------------------------------------------------------------------------------------------------------------------------------------------

    3 tables listed.


LIST PREPARE. Shows 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.

Example:

dbvrep> LIST PREPARE SCOTT
List of prepared schemas:
    SCOTT (DDL)
    List of prepared tables:
    SCOTT. space here (DDL)
    SCOTT.BIG_TABLE2 (DDL)
    SCOTT.BONUS (DDL)
    SCOTT.CHRIS (DDL)
    SCOTT.CHRRIS2 (DDL)
    SCOTT.DEPT (DDL)
    SCOTT.DEPT3 (DDL)
    SCOTT.DEPT4 (DDL)
    SCOTT.DEPT5 (DDL)
    SCOTT.DEPTTEST (DDL)
    SCOTT.DUMMYTEST (DDL)
    SCOTT.EMP (DDL)
    SCOTT.KATHY (DDL)
    SCOTT.NEWTABEMP (DDL)
    SCOTT.NEWTABLE (DDL)
    SCOTT.RQ1525 (DDL)
    SCOTT.RQ1589TEST (DDL)
    SCOTT.SALGRADE (DDL)
    SCOTT.SCOR (DDL)
    SCOTT.T2 (DDL)
    SCOTT.TEST1 (DDL)
    SCOTT.TEST_TRUN (DDL)
    SCOTT.TIMESAMPLE (DDL)
    SCOTT.lower (DDL)             
 

LIST OBSOLETE REDO. Shows the last obsolete archived redo log files that are no longer 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.

Example:

dbvrep> LIST OBSOLETE REDO                                                                                                                                      
Thread 1 last obsolete sequence#: 3273 at 30.03.2015 03:27:25 (5 hours ago)
dbvrep>    

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

Example:

dbvrep> LIST CONFLICT                                                                                                                                          
Information for conflict 3275010057249 (current conflict):
Table: SCOTT.DEPT3 at transaction 0006.012.00016c9b at SCN 79726068
SQL text (with replaced bind values): delete from "SCOTT"."DEPT3"
where (1=1)
and "DEPTNO" = 16
and "DNAME" = 'a'
and "LOC" = 'a'
Error: Command affected 2 row(s).
Handled as: RETRY
Conflict repeated 7 times.

dbvrep> 

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.

Example:

dbvrep>LIST STATS
*** Total statistics since 30.03.2015 03:24:09 (whole history) ***

    Total inserts/minute: 1046.10

    Total updates/minute: 2.95

    Total deletes/minute: 0.00

    Total operations/minute: 1049.05

    Total commits/minute: 103.91

    Total rollbacks/minute: 0.00

    *** Lag statistics since 30.03.2015 03:29:26 (last 24 hours) ***

    Min SCN: MINE: 19 APPLY: 33

    Max SCN: MINE: 34 APPLY: 109

    Avg SCN: MINE: 21 APPLY: 44

    *** Lag statistics since 30.03.2015 04:33:40 (last 1 hour) *** 

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. 

Example:

dbvrep> LIST TRANSACTIONS                                                                                                                                       
Apply has following transactions open and not yet committed:

Transaction ID           start SCN        last SCN                 last date
0002.01d.0001433f         79674808        79674808       03/30/2015 05:31:02
1 transactions total.
dbvrep>     

MEMORY_RESET

Unsets variable, in memory only.

Example:

dbvrep> MEMORY_RESET mine.mailcfg_from                                                                                                                          
Variable MAILCFG_FROM reset for process mine.  

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

Example:

dbvrep> MEMORY_SET mine.mailcfg_from = info@example.com                                                                                                         
Variable MAILCFG_FROM set to info@example.com for process mine.
dbvrep>  

NOTIFY

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

Example:

dbvrep> notify send heartbeat


PAUSE

Asks the given process to pause.

Example:

dbvrep> PAUSE MINE                                                                                                                                              
Mine requested to pause.                                                                                                                                        dbvrep>    

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.

Please read the following page before using AS OF <scn> clause: Adding new object from a given SCN

PREPARE_AND_LOAD

Prepares the new table to be added into the replication stream.  Also LOADs the table at the same time.  With this one command the table is prepared for all future changes and then loads the target table with all of the historical rows in the source table.  The target table will have to be created before running this command.  The dbvrep user on the SOURCE database will need to have SELECT and FLASHBACK privileges on the table that is being prepared and loaded.

Please read the following page before using AS OF <scn> clause: Adding new object from a given SCN

Example:

dbvrep> PREPARE_AND_LOAD TABLE SCOTT.REPTEST4  
Connecting to running apply [SCOTT.REPTEST4]: [Apply table removed (0 metadata record(s)). Apply table added (1 metadata record(s)).]
Connecting to running mine [SCOTT.REPTEST4]: [Table prepared (1 internal records).]
Table OLLIE.REPTEST4 instantiated at SCN 31096663
Table OLLIE.REPTEST4 will be loaded using SCN 31096663.
Connecting to running mine [SCOTT.REPTEST4]: [1 records processed.]
dbvrep>

PROCESS LOAD_REQUEST

Calls upon the MINE process to use the LOAD feature to populate the given table at the given SCN.


Example:

dbvrep>PROCESS LOAD_REQUEST TABLE SCOTT.sample_table AT INSTANTIATE SCN

QUERYMODE

Querymode is used by support personnel to debug issues. This is run in the linux (unix) console or windows cmd windows. 

Example:

dbvrep --ddcfile DDCFILE querymode plog PLOGFILE > OUTPUTFILE.TXT


QUIT

Exits dbvrep. See also EXIT.

Example:

dbvrep> QUIT

READ

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

Example:

dbvrep> READ filename.txt
dbvrep>


REPREPARE

Used for adding tables or schemas to the replication.

Reprepare runs the UNPREPARE and PREPARE commands 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.

Please read the following page before using AS OF <scn> clause: Adding new object from a given SCN

Example:

dbvrep> REPREPARE TABLE SCOTT.DEPT3                                                                                                                             
Connecting to running mine [SCOTT.DEPT3]: [Table unprepared (1 internal records).]
Connecting to running apply:[Apply table removed (1 metadata record(s)). Apply table added (0 metadata record(s)).]
Table SCOTT.DEPT3 processed.
Connecting to running apply [SCOTT.DEPT3]: [Apply table removed (0 metadata record(s)). Apply table added (1 metadata record(s)).]
Connecting to running mine [SCOTT.DEPT3]: [Table prepared (1 internal records).]
Table SCOTT.DEPT3 instantiated at SCN 79653884
dbvrep>

dbvrep> REPREPARE AS OF 79653884 TABLE SCOTT.DEPT3                                                                                                              
Connecting to running mine [SCOTT.DEPT3]: [Table unprepared (1 internal records).]
Connecting to running apply:[Apply table removed (1 metadata record(s)). Apply table added (0 metadata record(s)).]
Table SCOTT.DEPT3 processed.
Connecting to running apply [SCOTT.DEPT3]: [Apply table removed (0 metadata record(s)). Apply table added (1 metadata record(s)).]
Connecting to running mine [SCOTT.DEPT3]: [Table prepared (1 internal records).]
Table SCOTT.DEPT3 instantiated at SCN 79653884
dbvrep>

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

Example:

dbvrep> READDDC ORCL-MINE.ddc                                                                                                                                 
DDC loaded from database (365 variables).
dbvrep>  

RESET

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

A restart of the process is generally required.

To clear the counters, see clear.

Example:

dbvrep> reset MINE.MAILCFG_FROM                                                                                                                                 
Variable MAILCFG_FROM reset for process MINE.
dbvrep>   

RESOLVE


Contacts APPLY and resolves current conflict. The conflict id is obtained from the console.

Example:

dbvrep> Resolve conflict 3275010057249 as ignore                                                                                                                
Conflict resolution set.
 
OR
dbvrep> Resolve conflict 0 as ignore                                                                                                                
Conflict resolution set.         

RESUME

Asks the given process to resume.

Example:

dbvrep> RESUME MINE      
Mine requested to resume.                                                                                                                                       dbvrep>   

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.

Example:

dbvrep> SET MINE.MAILCFG_FROM= info@example.com                                                                                                                
Variable MAILCFG_FROM set to info@example.com for process MINE.
dbvrep>   

SET_CONFLICT_HANDLERS



Setting logging option for conflict handlers to value of FAST_NOLOG or LOG_TRANSACTION is no longer supported. Use NOLOG or LOG instead.

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.

The column(s) specified in the by columns clause in newer/older handlers

must not be a LOB or LONG data type.

Example:

 

dbvrep> SET_CONFLICT_HANDLERS FOR TABLE SCOTT.DEPT FOR UPDATE on NO_DATA TO OVERWRITE                                                                           
Connecting to running apply: [The table called SCOTT.DEPT on source is handled on apply (APPLY) as follows:
UPDATE (error): handler: RETRY logging: LOG
UPDATE (no_data): handler: OVERWRITE logging: LOG
UPDATE (too_many): handler: RETRY logging: LOG
DELETE (error): handler: RETRY logging: LOG
DELETE (no_data): handler: RETRY logging: LOG
DELETE (too_many): handler: RETRY logging: LOG
INSERT (error): handler: RETRY logging: LOG
TRANSACTION (error): handler: RETRY logging: LOG]
dbvrep>  


SETUP WIZARD

SETUP WIZARD. Starts the setup wizard.

Example:

dbvrep> setup wizard                                                                                                                                                                    
This wizard configures Dbvisit Replicate.
The setup wizard creates configuration scripts, which need to be run after the wizard ends. No changes to the databases are made before that.
The progress is saved every time a list of databases, replications, etc. is shown. It will be re-read if wizard is restarted and the same DDC name and script path is selected.
Run the wizard now? [yes]                                                                                                                                                        

SHOW

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 obtain the settings.
With variable, shows variable value. (For * and also for all processes.)

Example:

dbvrep> SHOW notify                                                                                                                                                                     
*.NOTIFY_ALERT_EMAIL = OFF
*.NOTIFY_ALL_EMAIL = chris.lawless@dbvisit.com
*.NOTIFY_CONFLICT_CURRENT_PAUSE = YES
*.NOTIFY_CONFLICT_CURRENT_RETRY = 2
*.NOTIFY_CONFLICT_THRESHOLD = 100
*.NOTIFY_DAILY_LIST_PROGRESS_TIME24 = 0700
*.NOTIFY_EXCEEDED_CYCLE_NUM = 2
*.NOTIFY_INCIDENT_LIMIT = 10
*.NOTIFY_INTERVAL_BETWEEN_CHECK = 5m
*.NOTIFY_ON_DDL = YES
*.NOTIFY_PEER_DOWN = ALL
*.NOTIFY_PROGRESS_DIFFERENCE_PERC = 10
*.NOTIFY_SCN_DIFFERENCE = 1000
*.NOTIFY_SEND_HEARTBEAT_TIME24 = 0800:1300
*.NOTIFY_SEQUENCE_DIFFERENCE = 10
*.NOTIFY_SUCCESS_EMAIL = OFF
*.NOTIFY_TIME_DIFFERENCE = 300                                                                                                                                                         

SHOW_CONFLICT_HANDLERS

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

Example:

dbvrep> show_conflict_handlers for table scott.dept                                                                                                                                     
The table called SCOTT.DEPT on source is handled on apply (APPLY) as follows:
UPDATE (error): handler: RETRY logging: LOG
UPDATE (no_data): handler: RETRY logging: LOG
UPDATE (too_many): handler: RETRY logging: LOG
DELETE (error): handler: RETRY logging: LOG
DELETE (no_data): handler: RETRY logging: LOG
DELETE (too_many): handler: RETRY logging: LOG
INSERT (error): handler: RETRY logging: LOG
TRANSACTION (error): handler: RETRY logging: LOG
dbvrep>  
dbvrep> show_conflict_handlers for default                                                                                                                                              
The default handling on APPLY is set as follows:
No handler of type UPDATE (error) defined.
No handler of type UPDATE (no_data) defined.
No handler of type UPDATE (too_many) defined.
No handler of type DELETE (error) defined.
No handler of type DELETE (no_data) defined.
No handler of type DELETE (too_many) defined.
No handler of type INSERT (error) defined.
No handler of type TRANSACTION (error) defined.

SHUTDOWN 

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

Example:

dbvrep> shutdown all                                                                                                                      
Upon restart MINE will go back to redolog 4873 (thread 1), going back 1 log.
Upon restart APPLY will go back to plog 4873, going back 1 plog.
Are you sure you want to shutdown? (Yes/No) [No]  
dbvrep> shutdown mine                                                                                                                     
Upon restart MINE will go back to redolog 4873 (thread 1), going back 1 log.
Are you sure you want to shutdown? (Yes/No) [No]  

dbvrep> shutdown immediate all                                                                                                            
Dbvisit Replicate MINE process shutting down.
Dbvisit Replicate APPLY process shutting down.

START_SERVICE

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

Example:

dbvrep> start_service MINE

SUPPORT PACKAGE

SUPPORT PACKAGE. Package information for support. This file contains useful information to help debug issues.  Support will often ask for this file.  The file contains the process name and a unique identifier when naming the zip file.

options::=  ( Do not specify any, unless instructed by support or by SUPPORT PACKAGE command itself.)

  • NOASM - do not read redo from ASM
  • NOASMDIRECT - do not use asmcmd to read redo from ASM
  • NOORADEBUG - do not create 'alter system dump logfile' script along the zip file.
  • NODB - do not connnect to the database to get information stored there (our dictionary, v$views, ...)
  • TIMER - print time measurements after each step of the support package creation.
  • TRACE - by default, we print much less information to screen than to packaging_trace.txt stored int the zip file. This options prints everything on screen, too.


    Example:
dbvrep> SUPPORT PACKAGE MINE                                                                                                                                                            
Packaging into ZIP file: ./dbvisit_support_dbvrep_RQ1180_MINE.UHSX.zip for process MINE, addinfo []
Packaging data from database. If this fails, restart SUPPORT PACKAGE with NODB option.
Zip file created: ./dbvisit_support_dbvrep_RQ1180_MINE.UHSX.zip (status: 1) 


For APPLY, ensure the command console is run from the APPLY server so that the APPLY logs and PLOGs can be found.  If you run the support package from the SOURCE server (where most people typically run dbvrep) it will NOT include the log file.  Please get the log file as well from the target server. If you do not have the command console on the target run the following command from the TARGET server.

Example:

$ dbvrep --ddcfile ORCL-APPLY.ddc support package APPLY 

UNPREPARE

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.


Example:

dbvrep> unprepare table scott.big_table2                                                                                                                                                
Connecting to running mine [SCOTT.BIG_TABLE2]: [Table unprepared (1 internal records).]
Connecting to running apply:[Apply table removed (1 metadata record(s)). Apply table added (0 metadata record(s)).]
Table SCOTT.BIG_TABLE2 processed. (no counter resync)
dbvrep>   

UNSET_CONFLICT_HANDLERS

UNSET_CONFLICT_HANDLERS. Sets the conflict handlers to the default values as defined by _DEFAULT_HANDLER_*_* variables. User can unset conflict handlers for a given table, for all tables prepared  or for default conflict handlers.

UPGRADE REPOSITORY

 

UPGRADE REPOSITORY. Upgrade the Dbvisit Replicate repository to a newer version. Version number would be supplied as the following: Major.minor ie 2.6, 2.7. Note you would never upgrade the FETCHER process.  In most cases UPGRADE REPOSITORY is all that is required.

Example:

dbvrep> upgrade repository mine                                                                                                                                                         
OK-9255: [MINE] Requested version is same as the current one. No operation needed.
MINE: Upgrade skipped.
dbvrep>  

VERSION

VERSION.Shows the Dbvisit Replicate version. Version can also be called from with the --V option from the command line.

Example:

dbvrep> Version 
Dbvisit Replicate version 2.7.10.
dbvrep>                                                                                                                                                     
[/home/oracle/v27/replicate]: ./dbvrep --V
Initializing......done
Dbvisit Replicate version 2.7.10.
[/home/oracle/v27/replicate]: