sqlplus scott/tiger@ttorcl<<SQL insert into scott.avi_objects select * from dba_objects where rownum <= 2000; commit; exit
SQL
On the Dbvisit Replicate console the replication can be monitored:
Progress of replication: total/this execution
------------------------------------------------------------------------------------
SCOTT.AVI_OBJECTS/scott.avi_objects:100% Mine:2000/2000 Applied:2000/2000
------------------------------------------------------------------------------------
1 tables listed.
dbvrep>
(not all columns are displayed above)
If the replication shows 100%, then it is fully replicated. If the progress is not shown on the command console then LIST PROGRESS can be used to display the progress.
The insert script can be repeatedly run to insert more records which are then automatically replicated to the
MySQL database.
The Mine and Apply processes are run in the background and can be viewed with ps
$ ps -ef | grep dbvrep oracle 4098 1 6 14:27 ? 00:01:17 dbvrep APPLY or –daemon --ddcfile
/home/oracle/orcl/orcl-APPLY.ddc start APPLY oracle 4107 1 6 14:27 ? 00:01:16 dbvrep MINE orc –daemon --ddcfile
/home/oracle/orcl/orcl-MINE.ddc start MINE
MS SQL Server replication
In all replications, the source database must be an Oracle database. Therefore, two-way replication with MS
SQL Server is not supported.
ODBC connection is used to connect to MS SQL, thus a DSN (Data Source Name) must be set up by the system administrator first (e.g. by the ODBC Data Source Administrator tool included in MS Windows).
Currently, no DDL replication is supported for MS SQL.
Example DDC file settings
DDC file 1-way replication example:
The following DDC file settings shows an example of a 1-way replication process.
The source server is on Linux server:
The target is on Linux server:
The TNS names for the source database is: orcl
The TNS names for the target database is: test11202
There is no fetcher process.
rac11202node1 dbvisit400
DDC DB
The DDC DB is as follows (orcl-onetime.ddc):
####################################################################################
# This file is used only during the setup, then it's contents is loaded as DDC DB into mine database
####################################################################################
Dbvisit Replicate Installation Guide and User Manual © Dbvisit Software Limited.
Except as specifically set out the Dbvisit license agreement, nothing in this Documentation constitutes a warranty as to the operation of the Dbvisit software.
page 41
@/home/oracle/orcl/orcl-MINE.ddc
set DDC_NAME orcl
#please update SETUP_SCRIPT_PATH if you move the setup scripts somewhere else - this will help SUPPORT command to find them when creating Dbvisit Support packages
SET MINE.DDC_BACKUP_DIR /home/oracle/orcl/ddc_backup
SET MINE.FETCHER_ENABLED NO
SET MINE.LOG_FILE /home/oracle/orcl/log/dbvrep_%N_%D.%E
SET MINE.LOG_FILE_TRACE /home/oracle/orcl/log/trace/dbvrep_%N_%D_%I_%U.%E
SET MINE.MINE_ASM AUTO
SET MINE.MINE_DATABASE orcl
SET MINE.MINE_LISTEN_INTERFACE rac11202node1:7901
SET MINE.MINE_PASSWORD
53616c7465645f5f092f0f33aeb4be0371675629612d7ce61e4c4b006a1089e9
SET MINE.MINE_PLOG /home/oracle/orcl/mine/%S.%E
SET MINE.MINE_REMOTE_INTERFACE rac11202node1:7901
SET MINE.MINE_USER dbvrep
SET MINE.ORACLE_HOME /u01/app/11.2.0/grid
SET MINE.SETUP_SCRIPT_PATH /home/oracle/orcl
SET APPLY.APPLY_DATABASE test11202
SET APPLY.APPLY_LISTEN_INTERFACE dbvisit400:7902
SET APPLY.APPLY_PASSWORD
53616c7465645f5f3fa67e0ac06f36a653f0905a9e0b2f18c275c4a5e8ace4da
SET APPLY.APPLY_RDBMS Oracle
SET APPLY.APPLY_REMOTE_INTERFACE dbvisit400:7902
SET APPLY.APPLY_STAGING_DIR /home/oracle/orcl/apply
SET APPLY.APPLY_USER dbvrep
SET APPLY.DDC_BACKUP_DIR /home/oracle/orcl/ddc_backup
SET APPLY.LOG_FILE /home/oracle/orcl/log/dbvrep_%N_%D.%E
SET APPLY.LOG_FILE_TRACE /home/oracle/orcl/log/trace/dbvrep_%N_%D_%I_%U.%E
SET APPLY.SETUP_SCRIPT_PATH /home/oracle/orcl set NETWORK_TRAFFIC_KEY 951f6ca180f83de089e4dd6935d6c58f set STATUS_BAR STATUS+LIST
orcl-MINE.ddc
memory_set CHECKVARS ON memory_set ON_WARNING SKIP memory_set ON_ERROR EXIT memory_set DDC_ID 1 memory_set DDC_DATABASE orcl memory_set DDC_PASSWORD
53616c7465645f5f846088cc178d8bb44f9f0cb27201747399b628865de6c084 memory_set DDC_USER dbvrep memory_set TNS_ADMIN /u01/app/oracle/product/11.2.0/dbhome_1/network/admin
#load rest of the settings from database load ddcdb memory_set ON_WARNING SKIP memory_set ON_ERROR SKIP
orcl-APPLY.ddc
The apply DDC file is as follows: memory_set CHECKVARS ON memory_set ON_WARNING SKIP memory_set ON_ERROR EXIT memory_set DDC_ID 1 memory_set DDC_DATABASE orcl memory_set DDC_PASSWORD
53616c7465645f5f846088cc178d8bb44f9f0cb27201747399b628865de6c084 memory_set DDC_USER dbvrep memory_set TNS_ADMIN /u01/app/oracle/product/11.2.0/dbhome_1/network/admin
#load rest of the settings from database load ddcdb memory_set ON_WARNING SKIP
Dbvisit Replicate Installation Guide and User Manual © Dbvisit Software Limited.
Except as specifically set out the Dbvisit license agreement, nothing in this Documentation constitutes a warranty as to the operation of the Dbvisit software.
page 42
memory_set ON_ERROR SKIP
DDC file 2-way replication example:
The following DDC file settings shows an example of a 2-way replication process.
The source/target database is on Linux server:
The target/source database is on Windows server:
The TNS names for the source/target database is:
The TNS names for the target/target database is:
There is no fetcher process.
dbvisit51 win2008-01 dbvisit51_w112a win_w112b
set CHECKVARS ON set ON_WARNING SKIP set ON_ERROR EXIT set DDC_ID 1 set DDC_NAME w112a2 set SIMPLE_CONFIG NO set FETCHER.FETCHER_ENABLED NO set MINE.FETCHER_ENABLED NO set MINE.MINE_LISTEN_INTERFACE dbvisit51:7892 set MINE.MINE_REMOTE_INTERFACE dbvisit51:7892 set APPLY.MINE_REMOTE_INTERFACE dbvisit51:7892 set APPLY.APPLY_LISTEN_INTERFACE win2008-01:7893 set MINE.APPLY_REMOTE_INTERFACE win2008-01:7893 set APPLY.APPLY_REMOTE_INTERFACE win2008-01:7893 set MINE.MINE_DATABASE dbvisit51_w112a set MINE.MINE_USER dbvrep2 set MINE.MINE_PASSWORD 53616c7465645f5f28844935a7ca6429892664945779edf04bccc10797 set MINE.MINE_ASM +ASM set APPLY.APPLY_DATABASE win_w112b set APPLY.APPLY_USER dbvrep2 set APPLY.APPLY_PASSWORD 53616c7465645f5fe821fbba607902c8077910024a2b2e22d390386ced set MINE.MINE_PLOG /home/oracle/dbvrep/mine/%S.%E set APPLY.APPLY_STAGING_DIR C:\app\oracle\dbvrep set DEBUG_LEVEL 0 set MINE.LOG_FILE dbvrep_%P_%D.%E set APPLY.LOG_FILE dbvrep_%P_%D.%E set APPLY.APPLY_TRACE OFF set MINE.MINE_TRACE OFF
#2nd direction set FETCHER2.FETCHER_ENABLED NO set MINE2.FETCHER_ENABLED NO set MINE2.MINE_LISTEN_INTERFACE win2008-01:7894 set MINE2.MINE_REMOTE_INTERFACE win2008-01:7894 set APPLY2.MINE_REMOTE_INTERFACE win2008-01:7894 set APPLY2.APPLY_LISTEN_INTERFACE dbvisit51:7895 set MINE2.APPLY_REMOTE_INTERFACE dbvisit51:7895 set APPLY2.APPLY_REMOTE_INTERFACE dbvisit51:7895 set MINE2.MINE_DATABASE win_w112b set MINE2.MINE_USER dbvrep2 set MINE2.MINE_PASSWORD 53616c7465645f5fe821fbba607902c8077910024a2b2e22d390386ced9 set MINE2.MINE_ASM +ASM set APPLY2.APPLY_DATABASE dbvisit51_w112a set APPLY2.APPLY_USER dbvrep2 set APPLY2.APPLY_PASSWORD 53616c7465645f5f28844935a7ca6429892664945779edf04bccc10797
Dbvisit Replicate Installation Guide and User Manual © Dbvisit Software Limited.
Except as specifically set out the Dbvisit license agreement, nothing in this Documentation constitutes a warranty as to the operation of the Dbvisit software.
page 43