Versions Compared

Key

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

...

Code Block
languagetext
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 (suggestion: use the name of the source database): [] TEST_RDS

(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/oracle/TEST_RDS]

Network configuration files were detected on this system in these locations:
/u01/app/oracle/product/11.2.0/db_1/network/admin
/u01/app/oracle/product/10.2.0/db_1/network/admin
/u01/app/oracle/product/11.2.0/db_1/network/admin
(TNS_ADMIN) - Please enter TNS configuration directory for this machine:
[/u01/app/oracle/product/11.2.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 it's type, connectivity, user names etc.

What type of database is this?
(Oracle/MySQL/SQL Server/Oracle AWS RDS/CSV/Hadoop): [Oracle]

Please enter database TNS alias: [] SOURCEDB

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
SOURCEDB 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]

Please enter password for this user: [dbvpasswd]

Permanent tablespaces detected on the database: USERS.

Please enter default permanent tablespace for this user: [USERS]

Temporary tablespaces detected on the database: TEMP.

Please enter default temporary tablespace for this user: [TEMP]


Following databases are now configured:
1: Oracle SOURCEDB, 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 it's type, connectivity, user names etc.

What type of database is this? (Oracle/MySQL/SQL Server/Oracle AWS RDS/CSV/Hadoop): [Oracle] Oracle AWS RDS
Please enter database TNS alias: [] RDSTGT

Specify AWS RDS instance DBA user Account [] rds_admin

Please enter password for this user: [] ***********

Connecting to database RDSTGT as rds_admin 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]
Please enter password for this user: [dbvpasswd]
Permanent tablespaces detected on the database: RDSADMIN, USERS.
Please enter default permanent tablespace for this user: [RDSADMIN] USERS
Temporary tablespaces detected on the database: TEMP.
Please enter default temporary tablespace for this user: [TEMP]

Following databases are now configured:

1: Oracle SOURCEDB, SYS/***,
SYSTEM/***, dbvrep/***, USERS/TEMP, dbvrep/, ASM:NO, TZ: +00:00
2: Oracle AWS RDS RDSTGT, rds_admin/***, rds_admin/***, dbvrep/***, USERS/TEMP, dbvrep/, ASM:NO, TZ: +00:00

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: SOURCEDB (Oracle)
2: RDSTGT (Oracle AWS RDS)
Select source database: [1]
Select target database: [2]

Will be DDL replication enabled? [yes]

Use fetcher to offload the mining to a different server? (yes/no) [no]

Would you like to encrypt the data across the network (yes or no) [no]

Would you like to compress the data across the network (yes or 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)                                                        
(one-by-one/single-scn/ddl-only/resetlogs) [single-scn]

What data instantiation script to create?

dp_networklink : Data Pump with network link. No export datafile is created (APPLY.sh)
dp_exp         : Data Pump with export datafile. Creates an export datafile (APPLY.sh)
exp            : Pre-datapump exp/imp with export datafile (APPLY.sh)
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                                                                                                                                                                                      
(dp_networklink/dp_exp/exp/ddl_file/ddl_run/load/none) [dp_networklink]


Following replication pairs are now configured:
1: SOURCEDB (Oracle) ==> RDSTGT (Oracle AWS RDS), DDL: yes, fetcher: no, process suffix: (no suffix),
compression: no, encryption: no, network timeout: 60, prepare type: single-scn, dataload: dp_networklink

Enter number of replication pair to modify it, or "add", or "done": [done]
Following replication pairs are now configured:


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 definedfor replication pairs:
1: SOURCEDB (Oracle) ==> RDSTGT (Oracle AWS RDS), 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
Selected schemas: SCOTT
Add more tables or schemas? (YES/NO) [NO]


To replicate changes of PL/SQL objects in schema(s), please enter the schemas to be replicated. Note
that specifying any entry will cause additional privileges to be granted to dbvrep.
Enter through a comma or space-delimited list.
Enter the list of schemas (PL/SQL): []

















You can also specify some advanced options:

1. Rename schemas or tables.
2. Specify filtering conditions.
3. (Tables only) Configure
Change Data Capture; 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 audittrail. This usually requires adding of new columns (timestamps, old/new values etc.) to the target table.

Specify rename name or filter condition for any of the specified schemas (YES/NO): [no]

Following tables are defined for replication pairs:

1: SOURCEDB (Oracle) ==> RDSTGT (Oracle AWS RDS), DDL: yes, suffix: (no suffix), prepare: single-scn
  SCOTT(tables)
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. Although most options have reasonable defaults, manual input is required.
 
Following processes are defined:
1: MINE on XESOURCEDB
  Not configured.
2: APPLY on AWSDBRDSTGT
  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): [dbvrds01dbvlin210.dbvisit.co.nz]
Server type (Windows/Linux/Unix): [Linux]
Enable email notifications about problems (yes/no)? [YESno]
NO
Enable SNMP traps/notifications about problems (yes/no)? [NOno] NO
Directory with DDC file and default where to create log files etc. (recommended: same as global setting, if
possible)? [/home/oracle/RDSPOCTEST_RDS]


Following settings were pre-filled with defaults or your reloaded settings:
----------------------------------------
[MINE_REMOTE_INTERFACE]: Network remote interface: dbvrds01dbvlin210.dbvisit.co.nz:7901
[MINE_DATABASE]: Database TNS: XESOURCEDB
[TNS_ADMIN]: tnsnames.ora path: /u01/app/oracle/product/11.2.0/xedb_1/network/admin
[MINE_USER]: Dbvisit Replicate database username: dbvrep
[MINE_PASSWORD]: Dbvisit Replicate database
password: *********
[MINE_PLOG]: Filemask for generated plogs: /home/oracle/RDSPOCTEST_RDS/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/oracle/RDSPOCTEST_RDS/log/dbvrep_%N_%D.%E
[LOG_FILE_TRACE]: Error traces: /home/oracle/RDSPOCTEST_RDS/log/trace/dbvrep_%N_%D_%I_%U.%E
 
Checking that these settings are valid...
Do you want change any of the settings? [no]


Following processes are defined:
1: MINE on XESOURCEDB
  Host: dbvrds01dbvlin210.dbvisit.co.nz, SMTP: NOno, SNMP: NOno
2: APPLY on AWSDBRDSTGT
  Not configured.
Enter number of process to modify it, or "done": [2]
<usually

 
Fully qualified name of the server for the process (usually co-located with the database, unless mine is offloaded using fetcher): [ip-10-143139-18139-189] dbvrds02
Server 29] ec2-54-82-47-176.compute-1.amazonaws.com

Server type (Windows/Linux/Unix): [Linux]
Enable email notifications about problems (yes/no)? [YESno]
NO
Enable SNMP traps/notifications about problems (yes/no)? [NOno] NO
Directory with DDC file and default where to create log files etc. (recommended: same as global setting, if
possible)? [/home/oracle/RDSPOCTEST_RDS]


Following settings were pre-filled with defaults or your reloaded settings:
----------------------------------------
[APPLY_REMOTE_INTERFACE]: Network remote interface: dbvrds02ec2-54-82-47-176.compute-1.amazonaws.com:7902
[APPLY_DATABASE]: Database TNS: AWSDBRDSTGT
[TNS_ADMIN]: tnsnames.ora path: /u01/app/oracle/product/11.2.0/xedb_1/network/admin
[APPLY_USER]: Dbvisit Replicate database username: dbvrep
[APPLY_PASSWORD]: Dbvisit Replicate database password: *********
[APPLY_STAGING_DIR]: Directory for received plogs: /home/oracle/RDSPOCTEST_RDS/apply
[LOG_FILE]: General log file: /home/oracle/RDSPOCTEST_RDS/log/dbvrep_%N_%D.%E
[LOG_FILE_TRACE]: Error traces: /home/oracle/RDSPOCTEST_RDS/log/trace/dbvrep_%N_%D_%I_%U.%E


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


Following processes are defined:
1: MINE on XESOURCEDB
  Host: dbvrds01dbvlin210.dbvisit.co.nz, SMTP: NOno, SNMP: NOno
2: APPLY on AWSDBRDSTGT
  Host: dbvrds02ec2-54-82-47-176.compute-1.amazonaws.com, SMTP: NOno, SNMP: no
NO
Enter number of process to modify it, or "done": [done]
Created file /home/oracle/RDSPOC/RDSPOC-APPLY.ddc.
Created file /home/oracle/RDSPOC/RDSPOC-MINE.ddc.
Created file /home/oracle/RDSPOC/config/RDSPOC-setup.dbvrep.
Created file /home/oracle/RDSPOC/config/RDSPOC-dbsetup_XE.sql.
Created file /home/oracle/RDSPOC/config/RDSPOC-dbsetup_AWSDB.sql.
Created file /home/oracle/RDSPOC/config/RDSPOC-grants_XE.sql.
Created file /home/oracle/RDSPOC/config/RDSPOC-grants_AWSDB.sql.
Created file /home/oracle/RDSPOC/config/RDSPOC-onetime.ddc.
Created file /home/oracle/RDSPOC/start-console.sh.
Do you want change any of the settings? [no]


Following processes are defined:
1: MINE on SOURCEDB
  Host: dbvlin210.dbvisit.co.nz, SMTP: no, SNMP: no
2: APPLY on RDSTGT
  Host: ec2-54-82-47-176.compute-1.amazonaws.com, SMTP: no, SNMP: no

Enter number of process to modify it, or "done": [done]
Created file /home/oracle/RDSPOC/RDSPOC-run-dbvrds01.shTEST_RDS/TEST_RDS-APPLY.ddc.
Created file /home/oracle/RDSPOC/RDSPOC-run-dbvrds02.shTEST_RDS/TEST_RDS-MINE.ddc.
Created file /home/oracle/TEST_RDS/RDSPOC/Nextsteps.txtconfig/TEST_RDS-setup.dbvrep.
Created file /home/oracle/TEST_RDS/RDSPOCconfig/RDSPOC-all.sh.
==========================================================================================================================================================


Dbvisit Replicate wizard completed


Script /home/oracle/RDSPOC/RDSPOC-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.
TEST_RDS-dbsetup_SOURCEDB.sql.
Created file /home/oracle/TEST_RDS/config/TEST_RDS-dbsetup_RDSTGT.sql.
Created file /home/oracle/TEST_RDS/config/TEST_RDS-grants_SOURCEDB.sql.
Created file /home/oracle/TEST_RDS/config/TEST_RDS-grants_RDSTGT.sql.
Created file /home/oracle/TEST_RDS/config/TEST_RDS-onetime.ddc.
Created file /home/oracle/TEST_RDS/start-console.sh.
Created file /home/oracle/TEST_RDS/TEST_RDS-run-dbvlin210.dbvisit.co.nz.sh.
Created file /home/oracle/TEST_RDS/TEST_RDS-run-ec2-54-82-47-176.compute-1.amazonaws.com.sh.
Created file /home/oracle/TEST_RDS/Nextsteps.txt.
Created file /home/oracle/TEST_RDS/TEST_RDS-all.sh.


==========================================================================================================================================================
Optionally, the script can be invoked now by this wizard.
Run this script now? (yes/no) [NO] NO
dbvrep> exit


 

Required steps due to lack of SYS/SYSTEM account access in RDS

Before you run the “RDSPOC-all.sh” script you need to make a small change.  Update this line:

 

Code Block
languagetext
sqlplus -S "dbvadmin/odb10g11@AWSDB as sysdba" @/home/oracle/RDSPOC/config/RDSPOC-dbsetup_AWSDB.sql

 

TO the one below (remove the “as sysdba”)

 

Code Block
languagetext
sqlplus -S "dbvadmin/odb10g11@AWSDB" @/home/oracle/RDSPOC/config/RDSPOC-dbsetup_AWSDB.sql

 

The second change is to the RDSPOC-dbsetup_awsdb.sql script.  This change is required as we do not have access as the SYS or SYSTEM user to create the dbvrep user or grants.  Note the “grant dba to dbvrep” at the end of the script.  This is to make sure that dbvrep have sufficient permission to perform required tasks.

 

Code Block
languagetext
set feedback off
whenever sqlerror exit failure
-- alter database add supplemental log data;     <<----- comment out this line


prompt This check fails if the DBID is not the expected one...
set heading off
select to_number(decode(dbid, 2623380325, null, 'NotTheDatabaseDBIDWeExpected'))
from v$database;
prompt Ok, check passed.


begin execute immediate 'drop user dbvrep cascade'; exception when others then if sqlcode = -1918 then null; else raise; end if; end;
/
create user dbvrep identified by dbvpasswd default tablespace USERS temporary tablespace TEMP;
-- grants because this is a target database


alter user dbvrep quota unlimited on USERS;
grant create session to dbvrep;
grant create table to dbvrep;
grant create view to dbvrep;
grant create sequence to dbvrep;
grant create procedure to dbvrep;
grant execute on dbms_flashback to dbvrep;
-- grant select on v_$database to dbvrep;   ß comment out this line
-- grant select on v_$mystat to dbvrep;    ß comment out this line
-- grant select on v_$session to dbvrep;   ß comment out this line
-- grant select on gv_$session to dbvrep;  ß comment out this line
-- grant select on v_$lock to dbvrep;   ß comment out this line
-- grant select on gv_$lock to dbvrep;    ß comment out this line
-- grant select on sys.user$ to dbvrep;    ß comment out this line
-- grant alter system to dbvrep;
grant alter session to dbvrep;
-- This is for 10.2.0.5 trigger-fire-once
begin execute immediate 'begin dbms_streams_auth.grant_admin_privilege(''dbvrep''); end; '; exception when others then null; end;
/
-- This will fail on versions prior to 11.2.0.2
begin execute immediate 'begin dbms_goldengate_auth.grant_admin_privilege(''dbvrep''); end; '; exception when others then null; end;
/
-- this is needed for 9.2 only:
-- grant alter database to dbvrep;   ß comment out this line


-- grants because this is a target database with DDL replication enabled


grant select any table to dbvrep;
grant update any table to dbvrep;
grant insert any table to dbvrep;
grant delete any table to dbvrep;
grant create any table to dbvrep;
grant alter any table to dbvrep;
grant drop any table to dbvrep;
grant create any index to dbvrep;
grant alter any index to dbvrep;
grant drop any index to dbvrep;
grant create any view to dbvrep;
grant drop any view to dbvrep;


-- ADD THIS FOR AMAZON RDS
-- This is required as we do not have SYS user access to grant specific permissions to dbvrep
--
grant dba to dbvrep;  <<-- IMPORTANT - ADD This line

===============================
Dbvisit Replicate wizard completed
Script /home/oracle/TEST_RDS/TEST_RDS-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 DbvisitReplicate.
=========================================================================================================================================================================================
Optionally, the script can be invoked now by this wizard.
Run this script now? (yes/no) [NO]
dbvrep> exit


 

Review APPLY DDC file

...