Target Database: Tibero

In all replications, source must be an Oracle database. Thus, two-way replication with Tibero is not supported.

(info) For datatype mapping between Oracle and Tibero, please see Supported Datatypes.

(info) For supported operating systems between Oracle and Tibero, please see Supported Platforms.

 A Tibero client installation is required for the server that runs the setup wizard.

Server that runs MINE, APPLY and Replicate command console uses ODBC connection.


Operating System Setup


ODBC driver used on Linux platforms is unixODBC.


/etc/odbc.ini

[ODBC Data Source]
tibero          = Tibero6 ODBC driver

[ODBC]
Trace           = 1
Tracefile       = /home/tibero/odbc.trace

[tibero]
Description     = Tibero6 ODBC Datasource
DSN             = tibero
DRIVER          = /u01/app/tibero/client/lib/libtbodbc.so
HOST            = dbvlin217
USER            = sys
PASSWORD        = tibero
DB_NAME         = tibero
PORT            = 8629



Threads must be disabled for ODBC connection.

/etc/odbcinst.ini
[ODBC]
Threading = 0



Oracle Database Home is located at /u01/app/oracle/product/12.1.0/db_1 installed under oracle account
oracle@dbvlin217[/u01/app/tibero]: id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba),503(oper),504(asmadmin),505(asmdba),507(backupdba),508(dgdba),509(kmdba)



TNS entry in tnsnames.ora is following

Tibero database is located at /u01/app/tibero under tibero account


SRCDB =   
(DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = dbvlin217.dbvisit.co.nz)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = SRCDB)
    )
  )
oracle@dbvlin217[/u01/app/tibero]: id tibero
uid=503(tibero) gid=501(oinstall) groups=501(oinstall),502(dba)

Connection test

Oracle

oracle@dbvlin217[/u01/app/tibero]: . oraenv
ORACLE_SID = [SRCDB] ?
The Oracle base remains unchanged with value /u01/app/oracle
oracle@dbvlin217[/u01/app/tibero]: sqlplus system/manager


SQL*Plus: Release 12.1.0.2.0 Production on Wed Feb 22 01:57:24 2017


Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Last Successful login time: Thu Jan 26 2017 20:56:48 +13:00
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL>

Tibero

tibero@dbvlin217[/home/tibero]: cat .bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
export PATH
export ORACLE_HOME=/u01/app/oracle/product/12.1.0/db_1/
export TB_HOME=/u01/app/tibero
export TB_SID=tibero
export PATH=/usr/xpg4/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/tibero/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/u01/app/tibero/bin:/u01/app/tibero/client/bin:/u01/app/oracle/product/12.1.0/db_1/bin
export LD_LIBRARY_PATH=:/u01/app/tibero/lib:/u01/app/tibero/client/lib


tibero@dbvlin217[/home/tibero]: tbsql sys/tibero
tbSQL 6  
TmaxData Corporation Copyright (c) 2008-. All rights reserved.
Connected to Tibero.
SQL>


Oracle to Tibero Replcation Setup Example

Install Dbvisit Replicate software as root user

Login to server as tibero user

Run dbvrep command and start setup wizard

tibero@dbvlinuxbox[/home/tibero/TIBERO]: dbvrep
Initializing......done
Dbvisit Replicate version 2.9
Copyright (C) Dbvisit Software Limited.  All rights reserved.
No DDC file loaded.
Run "setup wizard" to start the configuration wizard or try "help" to see all commands available.
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]                                                                                                                                                                        
Accept end-user license agreement? (View/Yes/No) [View] Yes
Before starting the actual configuration, some basic information is needed. The DDC name and script path determines where all files created by the wizard go (and where
to reread them if wizard is rerun) and the license key determines which options are available for this configuration.
(DDC_NAME) - Please enter a name for this replication: [] TIB1
(LICENSE_KEY) - Please enter your license key: [(trial)]
Which Replicate edition do you want to trial (LTD/XTD/MAX): [MAX]
(SETUP_SCRIPT_PATH) - Please enter a directory for location of configuration scripts on this machine: [/home/tibero/TIB1]
Network configuration files were detected on this system in these locations:
/u01/app/oracle/product/12.1.0/db_1/network/admin
(TNS_ADMIN) - Please enter TNS configuration directory for this machine: [/u01/app/oracle/product/12.1.0/db_1/network/admin]
Step 1 - Describe databases
========================================
The first step is to describe databases used in the replication. There are usually two of them (source and target).
Store SYSDBA and DBA passwords? Passwords only required during setup and initialization? (Yes/No) [Yes]
Let's configure the database, describing its type, connectivity, user names etc.
What type of database is this? (Oracle/MySQL/Google Cloud SQL/SQL Server/Tibero/Oracle AWS RDS/CSV/Hadoop): [Oracle]
Please enter database TNS alias: [] SRCDB
Please enter SYSDBA user name: [SYS]
Please enter password for this user: [change_on_install] *******
Please enter user with DBA role: [SYSTEM]
Please enter password for this user: [manager]
Connecting to database SRCDB as SYSTEM to query list of tablespaces and to detect ASM (by looking whether any redo logs or archived logs are stored in ASM).
Enter the Dbvisit Replicate owner (this user will be created by this script): [dbvrep] dbvrep
Please enter password for this user: [dbvpasswd]
Permanent tablespaces detected in database: EXAMPLE, SOE, STREAMS_TBS, USERS.
Please enter default permanent tablespace for this user: [EXAMPLE] USERS
Temporary tablespaces detected in database: TEMP.
Please enter default temporary tablespace for this user: [TEMP]
Following databases are now configured:
1: Oracle SRCDB, SYS/***, SYSTEM/***, dbvrep/***, USERS/TEMP, dbvrep/, ASM:No, TZ: +00:00
Enter the number of the database to modify it, or "add", or "done": [add] 
Let's configure the database, describing its type, connectivity, user names etc.
What type of database is this? (Oracle/MySQL/Google Cloud SQL/SQL Server/Tibero/Oracle AWS RDS/CSV/Hadoop): [Oracle] Tibero
Please enter server name (as specified in tibero6/client/config/tbdsn.tbr: [localhost] dbvlin217.dbvisit.co.nz
Please enter database ODBC DSN: [] tibero
Please enter user name of an administrator: [SYS] 
Please enter password for this user: [password] ******
Enter the user to log into apply database: [DBVREP] 
Please enter password for this user: [password] 

Connecting to database tibero as SYS to query list of tablespaces.

Permanent tablespaces detected in database: USR.
Please enter default permanent tablespace for this user: [USR] 

Temporary tablespaces detected in database: TMP.
Please enter default temporary tablespace for this user: [TMP] 

Following databases are now configured:
1: Oracle SRCDB, SYS/***, SYSTEM/***, dbvrep/***, USERS/TEMP, dbvrep/, ASM:No, TZ: +00:00
2: Tibero tibero, SYS/***, SYS/***, DBVREP/***, USR/TMP, /, ASM:n/a, TZ: 
Enter the number of the database to modify it, or "add", or "done": [done] 
Step 2 - Replication pairs
========================================
The second step is to set source and targets for each replication pair.
Let's configure the replication pair, selecting source and target.
Following databases are described:
1: SRCDB (Oracle)  
2: tibero (Tibero) (cannot be source, is not Oracle)
Select source database: [1]
Select target database: [2]
Will limited DDL replication be enabled? (Yes/No) [Yes]
Use fetcher to offload the mining to a different server? (Yes/No) [No]
Should where clauses (and Event Streaming) include all columns, not just changed and PK? (Yes/No) [No]
Would you like to encrypt the data across the network? (Yes/No) [No]
Would you like to compress the data across the network? (Yes/No) [No]
How long do you want to set the network timeouts. Recommended range between 60-300 seconds [60]
Lock and copy the data initially one-by-one or at a single SCN?
one-by-one : Lock tables one by one and capture SCN
single-scn : One SCN for all tables
ddl-only   : Only DDL script for target objects
resetlogs  : Use SCN from last resetlogs operation (standby activation, rman incomplete recovery)
no-lock    : Do not lock tables. Captures previous SCN of oldest active transaction. Requires pre-requisite running of pre-all.sh script                                
(one-by-one/single-scn/ddl-only/resetlogs/no-lock) [single-scn]                                                                          
What data instantiation script to create?
ddl_file       : DDL file created (APPLY.sql)
ddl_run        : DDL is automatically executed on target
load           : All replicated data is created and loaded automatically
none                                                                                                                                                                    

(ddl_file/ddl_run/load/none) [ddl_file] load
Do you want to (re-)create the tables on target or keep them (they are already created)? (create/keep) [keep] create


Following replication pairs are now configured:
1: SRCDB (Oracle) ==> tibero (Tibero), DDL: Yes, fetcher: No, process suffix: (no suffix), compression: No, encryption: No, network timeout: 60, prepare type:
single-scn, data load: load_create
Enter number of replication pair to modify it, or "add", or "done": [done]


Step 3 - Replicated tables
========================================
The third step is to choose the schemas and tables to be replicated. If the databases are reachable, the tables are checked for existence, datatype support, etc.,
schemas are queried for tables. Note that all messages are merely hints/warnings and may be ignored if issues are rectified before the scripts are actually executed.


Following tables are defined for replication pairs:
1: SRCDB (Oracle) ==> tibero (Tibero), DDL: Yes, suffix: (no suffix), prepare: single-scn
  No tables defined.
Enter number of replication pair to modify it, or "done": [1]


Please enter list of all individual tables to be replicated. Enter schema name(s) only to replicate all tables in that schema. Use comma or space to delimit the
entries.
Enter the tables and schemas: [] SCOTT.EMP
Selected tables: SCOTT.EMP
Add more tables or schemas? (Yes/No) [No]


You can also specify some advanced options:
1. Exclude some tables from schema-level replication
2. Rename schemas or tables.
3. Specify filtering conditions.
4. (Tables only) Configure Event Streaming; this does not maintain a copy of the source table, but logs all operations as separate entries. This is useful for ETL or
as an audit trail. This usually requires adding of new columns (timestamps, old/new values etc.) to the target table.
Specify rename name, filter condition or audit for any of the specified tables? (Yes/No) [No]


Following tables are defined for replication pairs:
1: SRCDB (Oracle) ==> tibero (Tibero), DDL: Yes, suffix: (no suffix), prepare: single-scn
  SCOTT.EMP
Enter number of replication pair to modify it, or "done": [done]
Step 4 - Process configuration
========================================
The fourth step is to configure the replication processes for each replication.

Following processes are defined:
1: MINE on SRCDB
  Not configured.
2: APPLY on tibero
  Not configured.
Enter number of process to modify it, or "done": [1] 
Fully qualified name of the server for the process (usually co-located with the database, unless mine is offloaded using fetcher): [dbvlin217.dbvisit.co.nz] 
Server type (Windows/Linux/Unix): [Linux] 
Enable email notifications about problems? (Yes/No) [No] 
Enable SNMP traps/notifications about problems? (Yes/No) [No] 
Directory with DDC file and default where to create log files etc. (recommended: same as global setting, if possible)? [/home/tibero/TIB1] 

Following settings were pre-filled with defaults or your reloaded settings:
----------------------------------------
[MINE_REMOTE_INTERFACE]: Network remote interface: dbvlin217.dbvisit.co.nz:7901 
[MINE_DATABASE]: Database TNS: SRCDB 
[TNS_ADMIN]: tnsnames.ora path: /u01/app/oracle/product/12.1.0/db_1/network/admin 
[MINE_PLOG]: Filemask for generated plogs: /home/tibero/TIB1/mine/%S.%E (%S is sequence, %T thread, %F original filename (stripped extension), %P process type, %N
process name, %E default extension)
[LOG_FILE]: General log file: /home/tibero/TIB1/log/dbvrep_%N_%D.%E 
[LOG_FILE_TRACE]: Error traces: /home/tibero/TIB1/log/trace/dbvrep_%N_%D_%I_%U.%E 

Checking that these settings are valid...
Do you want to change any of the settings? [No] 

Following processes are defined:
1: MINE on SRCDB
  Host: dbvlin217.dbvisit.co.nz, SMTP: No, SNMP: No
2: APPLY on tibero
  Not configured.
Enter number of process to modify it, or "done": [2] 
Fully qualified name of the server for the process (usually co-located with the database, unless mine is offloaded using fetcher): [] dbvlin217.dbvisit.co.nz
Server type (Windows/Linux/Unix): [] Linux
Enable email notifications about problems? (Yes/No) [No] 
Enable SNMP traps/notifications about problems? (Yes/No) [No] 
Directory with DDC file and default where to create log files etc. (recommended: same as global setting, if possible)? [/home/tibero/TIB1] 

Following settings were pre-filled with defaults or your reloaded settings:
----------------------------------------
[APPLY_REMOTE_INTERFACE]: Network remote interface: dbvlin217.dbvisit.co.nz:7902 
[APPLY_DATABASE]: Database ODBC DSN: tibero 
[TNS_ADMIN]: tnsnames.ora path: /u01/app/oracle/product/12.1.0/db_1/network/admin 
[APPLY_STAGING_DIR]: Directory for received plogs: /home/tibero/TIB1/apply 
[LOG_FILE]: General log file: /home/tibero/TIB1/log/dbvrep_%N_%D.%E 
[LOG_FILE_TRACE]: Error traces: /home/tibero/TIB1/log/trace/dbvrep_%N_%D_%I_%U.%E 

Checking that these settings are valid...
Do you want to change any of the settings? [No] 

Following processes are defined:
1: MINE on SRCDB
  Host: dbvlin217.dbvisit.co.nz, SMTP: No, SNMP: No
2: APPLY on tibero
  Host: dbvlin217.dbvisit.co.nz, SMTP: No, SNMP: No
Enter number of process to modify it, or "done": [done] 
Created file /home/tibero/TIB1/TIB1-APPLY.ddc.
Created file /home/tibero/TIB1/TIB1-MINE.ddc.
Created file /home/tibero/TIB1/config/TIB1-setup.dbvrep.
Created file /home/tibero/TIB1/config/TIB1-dbsetup_SRCDB_dbvrep.sql.
Created file /home/tibero/TIB1/config/TIB1-dbsetup_tibero_DBVREP.sql.
Created file /home/tibero/TIB1/config/TIB1-grants_SRCDB_dbvrep.sql.
Created file /home/tibero/TIB1/config/TIB1-grants_tibero_DBVREP.sql.
Created file /home/tibero/TIB1/config/TIB1-onetime.ddc.
Created file /home/tibero/TIB1/start-console.sh.
Created file /home/tibero/TIB1/TIB1-run-dbvlin217.dbvisit.co.nz.sh.
Created file /home/tibero/TIB1/scripts/TIB1-dbvlin217.dbvisit.co.nz-start-MINE.sh.
Created file /home/tibero/TIB1/scripts/TIB1-dbvlin217.dbvisit.co.nz-stop-MINE.sh.
Created file /home/tibero/TIB1/scripts/TIB1-dbvlin217.dbvisit.co.nz-dbvrep-MINE.sh.
Created file /home/tibero/TIB1/scripts/systemd-dbvrep-MINE_TIB1.service.
Created file /home/tibero/TIB1/scripts/upstart-dbvrep-MINE_TIB1.conf.
Created file /home/tibero/TIB1/scripts/TIB1-dbvlin217.dbvisit.co.nz-start-APPLY.sh.
Created file /home/tibero/TIB1/scripts/TIB1-dbvlin217.dbvisit.co.nz-stop-APPLY.sh.
Created file /home/tibero/TIB1/scripts/TIB1-dbvlin217.dbvisit.co.nz-dbvrep-APPLY.sh.
Created file /home/tibero/TIB1/scripts/systemd-dbvrep-APPLY_TIB1.service.
Created file /home/tibero/TIB1/scripts/upstart-dbvrep-APPLY_TIB1.conf.
Created file /home/tibero/TIB1/Nextsteps.txt.
Created file /home/tibero/TIB1/TIB1-all.sh.
======================================================================================================================================================================

Dbvisit Replicate wizard completed
Script /home/tibero/TIB1/TIB1-all.sh created. This runs all the above created scripts. Please exit out of dbvrep, review and run script as current user to setup and
start Dbvisit Replicate.
======================================================================================================================================================================
Optionally, the script can be invoked now by this wizard.
Run this script now? (Yes/No) [No] No
dbvrep> exit






Now edit TIB1-dbsetup_tibero_DBVREP.sql and add "grant dba to DBVREP;"


tibero@dbvlin217[/home/tibero]: cd TIB1/config/

tibero@dbvlin217[/home/tibero/TIB1/config]: vi TIB1-dbsetup_tibero_DBVREP.sql









Run *-all.sh script



Create the user SCOTT with appropriate rights in the Tibero database before running the script

tibero@dbvlinbox[/home/tibero/TIB1]: . oraenv
ORACLE_SID = [SRCDB] ? 
ORACLE_BASE environment variable is not being set since this
information is not available for the current user ID tibero.
You can set ORACLE_BASE manually if it is required.
Resetting ORACLE_BASE to its previous value or ORACLE_HOME
The Oracle base remains unchanged with value /u01/app/oracle/product/12.1.0/db_1
tibero@dbvlin217[/home/tibero/TIB1]: ./TIB1-all.sh 
Setting up Dbvisit Replicate configuration
Configure database SRCDB...

This check fails if the DBID is not the expected one...
Ok, check passed.
Configure database tibero...
This check fails if the DBID is not the expected one...

                                                                      
Ok, check passed.
Object grants for database SRCDB...

Object grants for database tibero...
Setting up the configuration
Initializing......done
DDC loaded from database (0 variables).
Dbvisit Replicate version 2.9
Copyright (C) Dbvisit Software Limited.  All rights reserved.
DDC file /home/tibero/TIB1/config/TIB1-onetime.ddc loaded.
MINE: Cannot determine Dbvisit Replicate dictionary version. (no
dictionary exists)
APPLY: Cannot determine Dbvisit Replicate dictionary version. (no
dictionary exists)
dbvrep> #clear the no-DDC-DB-available warning
dbvrep> process clear previous warnings
dbvrep> set ON_WARNING SKIP
Variable ON_WARNING set to SKIP for process *.
dbvrep> set ON_ERROR EXIT
Variable ON_ERROR set to EXIT for process *.
dbvrep> 
dbvrep> # Configuring default processes
dbvrep> choose process MINE
Process type MINE set to: MINE.
dbvrep> choose process APPLY
Process type APPLY set to: APPLY.
dbvrep> PROCESS SWITCH_REDOLOG
Redo log switch requested.dbvrep> PROCESS SETUP MINE DROP DICTIONARY
0 dictionary objects dropped.
dbvrep> PROCESS SETUP MINE CREATE DICTIONARY
dbvrep> PROCESS SETUP MINE LOAD DICTIONARY
Oldest active transaction SCN: 23229936 (no active transaction)
Supplemental logging on database set.
Loading dictionary table DBRSCCOL$
Loading dictionary table DBRSCDEF$
Loading dictionary table DBRSCOL$
Loading dictionary table DBRSIND$
Loading dictionary table DBRSOBJ$
Loading dictionary table DBRSTAB$
Loading dictionary table DBRSUSER$
Loading dictionary table DBRSV_$DATABASE
dbvrep> PROCESS SETUP APPLY DROP DICTIONARY
0 dictionary objects dropped.
dbvrep> PROCESS SETUP APPLY CREATE DICTIONARY
dbvrep> PROCESS SETUP APPLY LOAD DICTIONARY
dbvrep> PROCESS SETUP PAIR MINE AND APPLY
Applier SCN set (start=23229955, current=23229955).
dbvrep> SET APPLY.INSTANTIATE_SCN NOW
Variable INSTANTIATE_SCN set to NOW for process APPLY.
dbvrep> SET MINE._PREPARE_SUPLOG_TYPE PK
Variable _PREPARE_SUPLOG_TYPE set to PK for process MINE.
dbvrep> EXCLUDE CREATE TABLE %.DBMS_TABCOMP_TEMP_UNCMP #Ignore tables
created by Compression Advisor
Exclude rule created.
dbvrep> EXCLUDE CREATE TABLE %.DBMS_TABCOMP_TEMP_CMP #Ignore tables
created by Compression Advisor
Exclude rule created.
dbvrep> EXCLUDE CREATE TABLE %.SCHEDULER$_% #Ignore tables created by
Oracle scheduler (also used by schema/full expdp/impdp)
Exclude rule created.
dbvrep> EXCLUDE CREATE TABLE %.CMP1$% #Ignore tables created by
Compression Advisor since 11.2.0.4
Exclude rule created.
dbvrep> EXCLUDE CREATE TABLE %.CMP2$% #Ignore tables created by
Compression Advisor since 11.2.0.4
Exclude rule created.
dbvrep> EXCLUDE CREATE TABLE %.CMP3$% #Ignore tables created by
Compression Advisor since 11.2.0.4
Exclude rule created.
dbvrep> EXCLUDE CREATE TABLE %.CMP4$% #Ignore tables created by
Compression Advisor since 11.2.0.4
Exclude rule created.
dbvrep> memory_set IGNORE_APPLY_DDL_DIFFERENCES Yes
Variable IGNORE_APPLY_DDL_DIFFERENCES set to YES for process *.
dbvrep> PROCESS SUPPLEMENTAL LOGGING TABLE "SCOTT"."EMP" ENABLE PRIMARY
KEY
dbvrep> PROCESS SWITCH_REDOLOG
Redo log switch requested.dbvrep> PROCESS WAIT_SCN_FLIP
Waited 2 seconds until scn_to_timestamp changed.
dbvrep> #single-scn instantiation: lock all tables and schemas
dbvrep> PROCESS LOCK TABLES "SCOTT"."EMP"
Locking all tables.
Lock done.
dbvrep> #single-scn instantiation: unlock all tables and schemas, but
keep the SCN
dbvrep> PROCESS LOCK RELEASE LOCKS
dbvrep> 
dbvrep> #prepare the tables (we use OFFLINE as neither MINE nor APPLY
is running; with OFFLINE we won't wait on network timeout)
dbvrep> PREPARE OFFLINE TABLE "SCOTT"."EMP"
Table SCOTT.EMP instantiated at SCN 23234370
dbvrep> #single-scn instantiation: unlock all tables and schemas,
forget the SCN (so it does not affect any further PREPARE statements)
dbvrep> PROCESS LOCK CLEAR SCN
dbvrep> PROCESS SWITCH_REDOLOG
Redo log switch requested.dbvrep> #prepare script for instantiation
dbvrep> DDL DROP REPLICATE "SCOTT"."EMP"
OK-1926: Execute failed on SQL 'DROP TABLE "SCOTT"."EMP" cascade
constraints' with error [unixODBC] Schema object 'SCOTT.EMP' was not
found or is invalid.    (SQL-72000)
dbvrep> DDL CREATE_FROM_DICT REPLICATE "SCOTT"."EMP"
dbvrep> set APPLY.APPLY_PARALLEL_LOAD_DBI NO
Variable APPLY_PARALLEL_LOAD_DBI set to NO for process APPLY.
dbvrep> PROCESS LOAD_REQUEST OFFLINE TABLE "SCOTT"."EMP" AT INSTANTIATE
SCN
Table SCOTT.EMP will be loaded using SCN 23234370.
dbvrep> create ddcdb from ddcfile
DDC loaded into database (405 variables).
dbvrep> set ON_WARNING SKIP
Variable ON_WARNING set to SKIP for process *.
dbvrep> set ON_ERROR SKIP
Variable ON_ERROR set to SKIP for process *.
OK-0: Completed successfully.
WARN-1850: No DDC DB available, dictionary table does not exist.
Some apply tables were (re)created by the .dbvrep script; now we run the grant scripts again.
Object grants for database SRCDB...

Object grants for database tibero...
These steps are required after the TIB1-all.sh script runs:

1) Create the necessary directory(ies) on the servers:

2) Copy the DDC files to the server(s) where the processes will run:
dbvlin217.dbvisit.co.nz: /home/tibero/TIB1/TIB1-APPLY.ddc
dbvlin217.dbvisit.co.nz: /home/tibero/TIB1/TIB1-MINE.ddc

3) Review that path to dbvrep executable is correct in the run scripts:
/home/tibero/TIB1/TIB1-run-dbvlin217.dbvisit.co.nz.sh

4) Copy the run script to the server(s) where the processes will run:
dbvlin217.dbvisit.co.nz: /home/tibero/TIB1/TIB1-run-dbvlin217.dbvisit.co.nz.sh

5) Ensure firewall is open for listen interfaces 0.0.0.0:7902, 0.0.0.0:7901 used by the processes.

6) Make sure the data on apply are in sync as of time when setup was run.

7) Start the replication processes on all servers:
dbvlin217.dbvisit.co.nz: /home/tibero/TIB1/TIB1-run-dbvlin217.dbvisit.co.nz.sh

8) Start the console to monitor the progress:
/home/tibero/TIB1/start-console.sh

The above list is stored in /home/tibero/TIB1/Nextsteps.txt.







Start replication


tibero@dbvlin217[/home/tibero/TIB1]: ./TIB1-run-dbvlin217.dbvisit.co.nz.sh 
Initializing......done
DDC loaded from database (405 variables).
Dbvisit Replicate version 2.9
Copyright (C) Dbvisit Software Limited.  All rights reserved.
DDC file /home/tibero/TIB1/TIB1-APPLY.ddc loaded.
Starting process APPLY...Created directory /home/tibero/TIB1/ddc_backup
Created directory /home/tibero/TIB1/log/trace/
Created directory /home/tibero/TIB1/apply
started
Initializing......done
DDC loaded from database (405 variables).
Dbvisit Replicate version 2.9
Copyright (C) Dbvisit Software Limited.  All rights reserved.
DDC file /home/tibero/TIB1/TIB1-MINE.ddc loaded.
Starting process MINE...Created directory /home/tibero/TIB1/mine/
started

Start the Console

tibero@dbvlin217[/home/tibero/TIB1]: ./start-console.sh
Initializing......done
DDC loaded from database (406 variables).
Dbvisit Replicate version 2.9
Copyright (C) Dbvisit Software Limited.  All rights reserved.
\ Dbvisit Replicate 2.9(MAX edition) - Evaluation License expires in 30 days
MINE is running. Currently at plog 351 and SCN 23237821 (02/22/2017 03:09:26).
APPLY is running. Currently at plog 351 and SCN 23237800 (02/22/2017 03:09:23).
dbvrep> list prepare
List of prepared schemas:
none
List of prepared tables:
DBVREP.DBRSCOMMON_HEARTBEAT
DBVREP.DBRSOBJ$
DBVREP.DBRSUSER$
SCOTT.EMP (DDL)

Run DML in the source database

tibero@dbvlin217[/home/tibero]: sqlplus scott/tiger
SQL*Plus: Release 12.1.0.2.0 Production on Wed Feb 22 03:11:33 2017
Copyright (c) 1982, 2014, Oracle.  All rights reserved.
Last Successful login time: Wed Feb 22 2017 03:07:44 +13:00
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> insert into emp (empno,ename) values (7935,'Tibero');
1 row created.
SQL> commit;
Commit complete.





Check dbvrep console


Progress of replication TIB1:MINE->APPLY: total/this execution
--------------------------------------------------------------------------------------------------------------------------------------------
SCOTT.EMP:                    100%  Mine:1/1           Unrecov:0/0         Applied:1/1       Conflicts:0/0       Last:22/02/2017 03:12:39/OK
--------------------------------------------------------------------------------------------------------------------------------------------
1 tables listed.



Verify data in the target database

tibero@dbvlin217[/home/tibero]: tbsql scott/tiger
tbSQL 6  
TmaxData Corporation Copyright (c) 2008-. All rights reserved.
Connected to Tibero.
SQL> select empno, ename from emp where empno = 7935;
     EMPNO ENAME     
---------- ----------
      7935 Tibero
1 row selected.


Data Instantiaton

The owner of the objects to be replicated must be created in Tibero

tibero@dbvlin217[/home/tibero]: tbsql system/tibero
tbSQL 6  
TmaxData Corporation Copyright (c) 2008-. All rights reserved.
Connected to Tibero.
SQL> create tablespace SCOTT_TBS datafile '/u01/app/tibero/database/tibero/SCOTT_TBS.tdf' size 2G autoextend on next 64M maxsize unlimited EXTENT MANAGEMENT LOCAL AUTOALLOCATE;
Tablespace 'SCOTT' created.

SQL> create user SCOTT identified by tiger default tablespace SCOTT_TBS temporary tablespace tmp;
User 'SCOTT' created.

SQL> grant dba to SCOTT;
Granted.

SQL> alter user SCOTT quota unlimited on SCOTT_TBS;
User 'SCOTT' altered.

Before data replication can start, the target database must have a copy of the database objects that are going to be replicated. It is also highly desirable that the data in the objects to be replicated are also completely in sync. If the data is not in sync before replication starts, there is a strong possibility that data conflicts can occur. For instance if a record is updated or deleted on the source database that does not exist on the target database.

It is important that the replication starts at the same point as when the source and target data are in sync so that no changes are lost when replication starts. This is done through capturing the Oracle SCN (System Change Number) at the point the table is "prepared" in Dbvisit Replicate.

Only when the target database is Oracle, Dbvisit Replicate assists in creating and setting the starting point without any outage on the source database. But when the target database is not Oracle, then this will have to be done manually causing outage on the source database. Please note that when replication start, source and target objects must be in sync leaving no scope for conflicts in replication due to data divergence. Therefore in production environment, configuration of Dbvisit Replicate should be done when source database is idle.  Therefore is desired to instantiate (ie. run the -all,sh) during a maintenance window when no one is accessing source application (schemas/tables) that are desired to be replicated to Tibero.

 In addition to our LOAD function that is available for creating a starting point there are various tools available to load data from Oracle to Tibero like TBMigrator (see https://www.youtube.com/watch?v=12d4ciL3To4)