Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The following list of commands is meant to be an overview of basic and most used Dbvisit Replicate commands. For details (and the full list of commands) see Full Command-Line Reference.

Managing the processes

START process_name

Starts process. 
This command cannot be run from the dbvrep console. Start the process from the command line using the --daemon option instead.

Panel
bgColorCCC
[oracle@src ~]$ dbvrep --daemon --ddcfile /home/oracle/TESTSUITE1/TESTSUITE1-MINE.ddc start MINE
Initializing......done
DDC loaded from database (230 variables).
Dbvisit Replicate version 2.4.05.2287
Copyright (C) Dbvisit Software Limited. All rights reserved.
DDC file /home/oracle/TESTSUITE1/TESTSUITE1-MINE.ddc loaded.
Starting process MINE...started

SHUTDOWN process_name

Connect to mine/apply/fetcher and request it to shut down.
SHUTDOWN ALL means requesting all processes defined in DDC to shut down.

Panel
bgColorCCC
dbvrep> shutdown all
Dbvisit Replicate APPLY process shutting down.
Dbvisit Replicate FETCHER process shutting down.
Dbvisit Replicate MINE process shutting down.

Managing conflicts

LIST CONFLICT

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

...

Note that in 2-way replication if there is a conflict with APPLY1, then the CHOOSE REPLICATION command first has to be issued before the list conflict command will list the actual conflict of the APPLY1 process. See the CHOOSE REPLICATION command. 

RESOLVE

Contacts apply and resolves current conflict.

Panel
bgColorCCC
dbvrep> resolve conflict 8576010038761 as ignore
Conflict resolution set.

Managing the replication

LIST PROGRESS

Anchor
LIST_PROGRESS
LIST_PROGRESS

...

Panel
bgColorCCC
dbvrep> list progress
Progress of replication TESTSUITE1: total/this execution
--------------------------------------------------------------------------------------------------------------------------------------------
SCOTT.CONF: 100% Mine:4/4 Unrecov:0/0 Applied:4/4 Conflicts:0/0 Last:15/12/2012 03:02:53/OK
SCOTT.CONF2: 100% Mine:6/6 Unrecov:0/0 Applied:6/6 Conflicts:0/0 Last:15/12/2012 03:02:53/OK
--------------------------------------------------------------------------------------------------------------------------------------------
2 tables listed.

LIST STATS

Anchor
LIST_STATS
LIST_STATS

...

Panel
bgColorCCC
dbvrep> list stats total
APPLY: Cumulative totals for all tables:
*** Total statistics since 15.12.2012 02:26:15 (last 24 hours) ***
Total inserts/minute: 659.20
Total updates/minute: 5.99
Total deletes/minute: 0.00
Total operations/minute: 665.19
Total commits/minute: 18.64
Total rollbacks/minute: 18.64
*** Total statistics since 15.12.2012 03:57:13 (last 1 hour) ***
Total inserts/minute: 0.08
Total updates/minute: 0.08
Total deletes/minute: 0.00
Total operations/minute: 0.16
Total commits/minute: 22.13
Total rollbacks/minute: 22.13
*** Total statistics since 15.12.2012 04:53:15 (last 5 minutes) ***
Total inserts/minute: 0.00
Total updates/minute: 0.00
Total deletes/minute: 0.00
Total operations/minute: 0.00
Total commits/minute: 24.50
Total rollbacks/minute: 24.50
*** Total statistics since 15.12.2012 02:26:15 (since last started) ***
Total inserts/minute: 659.20
Total updates/minute: 5.99
Total deletes/minute: 0.00
Total operations/minute: 665.19
Total commits/minute: 18.64
Total rollbacks/minute: 18.64
*** Total statistics since 15.12.2012 02:26:15 (whole history) ***
Total inserts/minute: 659.20
Total updates/minute: 5.99
Total deletes/minute: 0.00
Total operations/minute: 665.19
Total commits/minute: 18.64
Total rollbacks/minute: 18.64

PREPARE

Anchor
PREPARE
PREPARE

This adds 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.

...

Panel
bgColorCCC
dbvrep> list progress
Progress of replication TESTSUITE1: total/this execution
--------------------------------------------------------------------------------------------------------------------------------------------
OE.PROMOTIONS: 100% Mine:1/1 Unrecov:0/0 Applied:1/1 Conflicts:0/0 Last:21/12/2012 02:57:51/OK
--------------------------------------------------------------------------------------------------------------------------------------------
1 tables listed.

UNPREPARE

Anchor
UNPREPARE
UNPREPARE

Removes tables or schemas from the replication. Unprepares a schema/table for replication and declares that this object should no longer be replicated. 

Panel
bgColorCCC
dbvrep> unprepare table oe.promotions
dbvrep> unprepare schema new_schema
dbvrep>

Managing the settings

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.

Panel
bgColorCCC
dbvrep> set MINE.MINE_PLOG = /home/oracle/TESTSUITE1/mine/%S.%E
Variable MINE_PLOG set to /home/oracle/TESTSUITE1/mine/%S.%E for process MINE.

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

Panel
bgColorCCC
dbvrep> show setup_script_path
MINE.SETUP_SCRIPT_PATH = /home/oracle/TESTSUITE1
FETCHER.SETUP_SCRIPT_PATH = /home/oracle/TESTSUITE1
*.SETUP_SCRIPT_PATH =
APPLY.SETUP_SCRIPT_PATH = /home/oracle/TESTSUITE1

HELP

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

Panel
bgColorCCC
dbvrep> help list
LIST: Reports.
LIST MINE|APPLY REDOLOGS|PLOGS: Display status of plogs and redologs on mine/apply.
LIST PROGRESS [schema | PLSQL]: show table of current progress of mine/apply. This can be shown on-line in the status bar by setting DDC variable STATUS_BAR to 'LIST' or 'STATUS+LIST'; full list of PL/SQL replication is stored in DBRSAPPLY_DDL_HISTORY.
LIST PREPARE: show tables prepared for replication.
LIST OBSOLETE REDO [THREAD thread]: show which redo logs are no longer needed by mine.
LIST CONFLICT { id|CURRENT|LAST }: show information about conflict (current one, last one or by specified id).
LIST STATUS: show status bar text.
LIST STATS {ALL|TIME|SCN|TOTAL|TOTAL mine/apply | schema.table }: list statistics for all tables or specified table - number of operations per minute and/or process lags in seconds or SCNs.

2-way or One-to-many replication

CHOOSE REPLICATION

Anchor
CHOOSE_REPLICATION
CHOOSE_REPLICATION

...