Unidirectional DML Replication
Note: All Datafiles, Control files, Redo logs and Archive logs under ASM file system on both Source and Target
Configure Oracle GoldenGate to perform DML one-way replication between an Oracle 10gR2 database to an Oracle 11gR2 database.
Contents
___________________________________________________________________________________________________________________________________
0. Environment
1. Configure TNS Entries on Source Oracle 10gR2
2. Configure TNS Entries on Target Oracle 11gR2
3. Create test schemas for replication on Source and Target
4. GoldenGate Installation on Source and Target
5. OGG Configuration on Source Oracle 10gR2
a) Login to Database
b) Configure Manager
c) Create Extract Group
d) Create Pump Extract Group
e) Add supplemental logging for table
6. OGG Configuration on Target Oracle 11gR2
a) Login to Database
b) Configure Manager
c) Set up the checkpoint table
i) Create a GLOBALS file
ii) Activate the GLOBALS parameters
iii) Add a Replicat checkpoint table
7) Create the Replicat Group
8. On Source Start Manager, Extract and Pump
9. On Target Start the Manager and Replicat
10. Test and Verify the Results
Insert
a1) Execute Insert on the Source Oracle Database 10gR2
a2) Verify Insert Changes on Target Oracle Database 11gR2
Update
b1) Execute update on the Source Oracle Database 10gR2
b2) Verify Update Changes on Target Oracle Database 11gR2
Delete
c1) Execute Delete on the Source Oracle Database 10gR2
c2) Verify Delete Changes on Target Oracle Database 11gR2
___________________________________________________________________________________________________________________________________
0. Environment
Source:
Platform: Linuxx86_64 Server Name: RAC1.RAJASEKHAR.COM, IP: 192.168.2.10 DB Version: Oracle 10.2.0.5, File system: ASM, All db files on ASM. DB Name: RCM GoldenGate Version: V11.2.x for oracle db 10g GoldenGate Schema: GATE Source Database Schema: SENDER
Target:
Platform: Linuxx86_64 Server Name: RAC2.RAJASEKHAR.COM, IP: 192.168.2.11 DB Version: Oracle 11.2.0.3, , File system: ASM, All db files on ASM. DB Name: MGM GoldenGate Version: V11.2.x for oracle db 11g GoldenGate Schema: GATE Target Database Schema: RECEIVER
1. Configure TNS Entries on source Oracle 10gR2
[oracle@rac1 ~]$ ps -ef | grep tns root 9 2 0 10:46 ? 00:00:00 [netns] oracle 6334 1 0 15:11 ? 00:00:00 /u01/app/oracle/product/10.2.0/db_1/bin/tnslsnr LISTENER -inherit oracle 8326 4131 0 23:53 pts/2 00:00:00 grep tns [oracle@rac1 ~]$
[oracle@rac1 admin]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.5.0 - Production on 24-JUL-2015 00:03:58
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.10)(PORT=1521)(IP=FIRST))) STATUS of the LISTENER
Alias LISTENER Version TNSLSNR for Linux: Version 10.2.0.5.0 - Production Start Date 24-JUL-2015 00:03:18 Uptime 0 days 0 hr. 0 min. 40 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.10)(PORT=1521))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM", status UNKNOWN, has 1 handler(s) for this service... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... Service "rcm" has 1 instance(s). Instance "rcm", status READY, has 1 handler(s) for this service... Service "rcmXDB" has 1 instance(s). Instance "rcm", status READY, has 1 handler(s) for this service... Service "rcm_XPT" has 1 instance(s). Instance "rcm", status READY, has 1 handler(s) for this service... The command completed successfully [oracle@rac1 admin]$
[oracle@rac1 ~]$ cd /u01/app/oracle/product/10.2.0/db_1/network/admin/ [oracle@rac1 admin]$ cat listener.ora LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.10)(PORT = 1521)(IP = FIRST)) ) )
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1) (PROGRAM = extproc) ) (SID_DESC = (SID_NAME = +ASM) (ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1) ) ) [oracle@rac1 admin]$ [oracle@rac1 admin]$ cat tnsnames.ora
tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
Generated by Oracle configuration tools.
ASM = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.10)(PORT = 1521)) ) (CONNECT_DATA = (SID = +ASM) ) )
MGM = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.11)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = mgm) ) )
RCM = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.10)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = rcm) ) )
[oracle@rac1 admin]$
[oracle@rac1 ~]$ sqlplus sys/sys@rcm as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Thu Jul 23 23:39:57 2015 Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
[oracle@rac1 ~]$ sqlplus sys/sys@mgm as sysdba SQL*Plus: Release 10.2.0.5.0 - Production on Thu Jul 23 23:40:29 2015 Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options
SQL>
[oracle@rac1 ~]$ sqlplus sys/sys@asm as sysdba << Trying to connect to ASM instance. >> SQL*Plus: Release 10.2.0.5.0 - Production on Thu Jul 23 23:41:11 2015 Copyright (c) 1982, 2010, Oracle. All Rights Reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select NAME, STATE from v$asm_diskgroup;
NAME STATE
VOL MOUNTED
SQL>
2. Configure TNS Entries on Target Oracle 11gR2
[oracle@rac2 admin]$ ps -ef | grep tns root 9 2 0 10:46 ? 00:00:00 [netns] oracle 8335 1 0 17:04 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit oracle 12023 9019 0 23:50 pts/2 00:00:00 grep tns [oracle@rac2 admin]$
[oracle@rac2 admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 24-JUL-2015 00:08:45
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) STATUS of the LISTENER
Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.3.0 - Production Start Date 23-JUL-2015 17:04:34 Uptime 0 days 7 hr. 4 min. 10 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/rac2/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=rac2.rajasekhar.com)(PORT=1521))) Services Summary... Service "+ASM" has 1 instance(s). Instance "+ASM", status READY, has 1 handler(s) for this service... Service "mgm" has 1 instance(s). Instance "mgm", status READY, has 1 handler(s) for this service... Service "mgmXDB" has 1 instance(s). Instance "mgm", status READY, has 1 handler(s) for this service... The command completed successfully [oracle@rac2 admin]$
[oracle@rac2 ~]$ cd /u01/app/11.2.0/grid/network/admin/ [oracle@rac2 admin]$ cat listener.ora
listener.ora Network Configuration File: /u01/app/11.2.0/grid/network/admin/listener.ora
Generated by Oracle configuration tools.
LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = rac2.rajasekhar.com)(PORT = 1521)) ) )
ADR_BASE_LISTENER = /u01/app/oracle
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent [oracle@rac2 admin]$
[oracle@rac2 ~]$ cd /u01/app/oracle/product/11.2.0/db_1/network/admin/ [oracle@rac2 admin]$ cat tnsnames.ora
tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
Generated by Oracle configuration tools.
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (ORACLE_HOME = /u01/app/11.2.0/grid) (SID_NAME = rcm) ) (SID_DESC = (ORACLE_HOME = /u01/app/11.2.0/grid) (SID = +ASM) ) )
LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.11)(PORT = 1521)) )
ADR_BASE_LISTENER = /u01/app/oracle
ASM = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.11)(PORT = 1521)) ) (CONNECT_DATA = (SID = +ASM) ) )
MGM = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = rac2.rajasekhar.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mgm) ) )
RCM = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.2.10)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = rcm) ) )
[oracle@rac2 admin]$
[oracle@rac2 admin]$ sqlplus sys/sys@rcm as sysdba SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 23 23:49:44 2015 Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
[oracle@rac2 admin]$ sqlplus sys/sys@mgm as sysdba SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 23 23:50:04 2015 Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options
SQL>
[oracle@rac2 admin]$ sqlplus sys/sys@asm as sysdba SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 23 23:50:22 2015 Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Automatic Storage Management option
SQL> select NAME, STATE from v$asm_diskgroup;
NAME STATE
DATA MOUNTED
SQL>
3. Create test schemas for replication on Source and Target
On Source Oracle Database 10gR2
Create test schemas for replication. I will create a replication from schema sender to schema receiver
[oracle@rac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Thu Jul 23 11:41:21 2015
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create user sender identified by sender default tablespace users temporary tablespace temp;
User created.
SQL> grant connect,resource,unlimited tablespace to sender;
Grant succeeded.
[oracle@rac1 ~]$ sqlplus sender/sender;
SQL> create table sugi(Name varchar2(10), Role varchar2(10));
Table created.
SQL>
On Target Oracle Database 11gR2
[oracle@rac2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Thu Jul 23 11:43:14 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options
SQL> create user receiver identified by receiver default tablespace users temporary tablespace temp;
User created.
SQL> grant connect,resource,unlimited tablespace to receiver;
Grant succeeded.
SQL> create table sugi(Name varchar2(10), Role varchar2(10));
Table created.
SQL>
4. GoldenGate Installation on Source and Target
Please click here
Note: The below procedure is same for “Installing Oracle GoldenGate V11.2.x for Oracle 11gR2 on Linux x86-64?
5. OGG Configuration on Source Oracle 10gR2
a) Login to Database
[oracle@rac1 gg10]$ ggsci
Oracle GoldenGate Command Interpreter for Oracle Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO Linux, x64, 64bit (optimized), Oracle 10g on Apr 23 2012 07:30:46
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.
GGSCI (rac1.rajasekhar.com) 1> dblogin userid gate, password gate Successfully logged into database.
GGSCI (rac1.rajasekhar.com) 2>
b) Configure Manager
GGSCI (rac1.rajasekhar.com) 2> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER STOPPED
GGSCI (rac1.rajasekhar.com) 3> edit param mgr
-- Add below entries PORT 15000
GGSCI (rac1.rajasekhar.com) 4> view param mgr
PORT 15000
GGSCI (rac1.rajasekhar.com) 5>
c) Create Extract Group
GGSCI (rac1.rajasekhar.com) 7> ADD EXTRACT E10G, TRANLOG, BEGIN NOW EXTRACT added.
GGSCI (rac1.rajasekhar.com) 8> ADD EXTTRAIL ./dirdat/ea, EXTRACT E10G, MEGABYTES 50 EXTTRAIL added.
GGSCI (rac1.rajasekhar.com) 10> edit param e10g
-- Add below entries EXTRACT e10g USERID gate, PASSWORD gate EXTTRAIL ./dirdat/ea TRANLOGOPTIONS ASMUSER SYS@ASM, ASMPASSWORD sys << Note: If REDO logs in ASM, Then must to add this entry here >> TABLE sender.*;
GGSCI (rac1.rajasekhar.com) 11> view param e10g
EXTRACT e10g USERID gate, PASSWORD gate EXTTRAIL ./dirdat/ea TRANLOGOPTIONS ASMUSER SYS@ASM, ASMPASSWORD sys TABLE sender.*;
GGSCI (rac1.rajasekhar.com) 12> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER STOPPED EXTRACT STOPPED E10G 00:00:00 00:01:38
GGSCI (rac1.rajasekhar.com) 13>
d) Create Pump Group
GGSCI (rac1.rajasekhar.com) 13> ADD EXTRACT P10G, EXTTRAILSOURCE ./dirdat/ea EXTRACT added.
GGSCI (rac1.rajasekhar.com) 14> ADD RMTTRAIL ./dirdat/pa, EXTRACT P10G, MEGABYTES 50 RMTTRAIL added.
GGSCI (rac1.rajasekhar.com) 15> edit param p10g
-- Add below entries
EXTRACT p10g USERID gate, password gate RMTHOST 192.168.2.11, mgrport 15000 RMTTRAIL ./dirdat/pa PASSTHRU TABLE sender.*;
GGSCI (rac1.rajasekhar.com) 16> view param p10g
EXTRACT p10g USERID gate, password gate RMTHOST 192.168.2.11, mgrport 15000 RMTTRAIL ./dirdat/pa PASSTHRU TABLE sender.*;
GGSCI (rac1.rajasekhar.com) 17>
e) Add supplemental logging for table
GGSCI (rac1.rajasekhar.com) 37> ADD TRANDATA SENDER.*
2015-07-23 14:21:43 WARNING OGG-00869 No unique key is defined for table 'SUGI'. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.
Logging of supplemental redo data enabled for table SENDER.SUGI.
GGSCI (rac1.rajasekhar.com) 38> INFO TRANDATA SENDER.SUGI
Logging of supplemental redo log data is enabled for table SENDER.SUGI.
Columns supplementally logged for table SENDER.SUGI: NAME, ROLE.
GGSCI (rac1.rajasekhar.com) 39>
6. OGG Configuration on Target Oracle 11gR2
a) Login to Database
GGSCI (rac2.rajasekhar.com) 1> dblogin userid gate, password gate Successfully logged into database.
GGSCI (rac2.rajasekhar.com) 2>
b) Configure Manager
GGSCI (rac2.rajasekhar.com) 2> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER STOPPED
GGSCI (rac2.rajasekhar.com) 3> edit param mgr
-- Add below entry PORT 15000
GGSCI (rac2.rajasekhar.com) 4> view param mgr
PORT 15000
GGSCI (rac2.rajasekhar.com) 5>
c) Set up the Checkpoint table
i) Create a GLOBALS file
— Global file need to create on target where replicat process running
— Checkpoint tables are only used by the Replicat, so no need to create on source because it’s one-way replication.
GGSCI (rac2.rajasekhar.com) 5> EDIT PARAMS ./GLOBALS -- Add below entries GGSCHEMA GATE CHECKPOINTTABLE GATE.CHECKPOINT
GGSCI (rac2.rajasekhar.com) 6> sh cat ./GLOBALS
GGSCHEMA GATE CHECKPOINTTABLE GATE.CHECKPOINT
GGSCI (rac2.rajasekhar.com) 7>
ii) Activate the GLOBALS parameters
For the GLOBALS configuration to take effect, you must exit the session in which the changes were made. Execute the following command to exit GGSCI.
GGSCI (rac2.rajasekhar.com) 7> EXIT
iii) Add a Replicat checkpoint table
GGSCI (rac2.rajasekhar.com) 1> dblogin userid gate, password gate Successfully logged into database.
GGSCI (rac2.rajasekhar.com) 2>
GGSCI (rac2.rajasekhar.com) 2> ADD CHECKPOINTTABLE GATE.CHECKPOINT
Successfully created checkpoint table GATE.CHECKPOINT.
GGSCI (rac2.rajasekhar.com) 3>
7) Create the Replicat Group
GGSCI (rac2.rajasekhar.com) 3> ADD REPLICAT R11G, EXTTRAIL ./dirdat/pa,checkpointtable gate.checkpoint REPLICAT added.
GGSCI (rac2.rajasekhar.com) 4> edit param r11g -- Add below REPLICAT R11G ASSUMETARGETDEFS userid gate, password gate DISCARDFILE ./dirout/receiver.dsc, purge MAP sender.*, TARGET receiver.*;
GGSCI (rac2.rajasekhar.com) 5> view param r11g
REPLICAT R11G ASSUMETARGETDEFS userid gate, password gate DISCARDFILE ./dirout/receiver.dsc, purge MAP sender.*, TARGET receiver.*;
GGSCI (rac2.rajasekhar.com) 6> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER STOPPED REPLICAT STOPPED R11G 00:00:00 00:00:44
GGSCI (rac2.rajasekhar.com) 7>
8. On Source Start Manager, Extract and Pump
GGSCI (rac1.rajasekhar.com) 39> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER STOPPED EXTRACT STOPPED E10G 00:00:00 00:24:30 EXTRACT STOPPED P10G 00:00:00 00:21:12
GGSCI (rac1.rajasekhar.com) 40> start mgr
Manager started.
GGSCI (rac1.rajasekhar.com) 41> start extract e10g
Sending START request to MANAGER ... EXTRACT E10G starting
GGSCI (rac1.rajasekhar.com) 42> start extract p10g
Sending START request to MANAGER ... EXTRACT P10G starting
GGSCI (rac1.rajasekhar.com) 43> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING EXTRACT RUNNING E10G 00:00:00 00:24:54 EXTRACT RUNNING P10G 00:00:00 00:21:36
GGSCI (rac1.rajasekhar.com) 44>
9. On Target start the Manager and Replicat
GGSCI (rac2.rajasekhar.com) 7> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER STOPPED REPLICAT STOPPED R11G 00:00:00 00:00:44
GGSCI (rac2.rajasekhar.com) 8> start mgr
Manager started.
GGSCI (rac2.rajasekhar.com) 9> start replicat R11G
Sending START request to MANAGER ... REPLICAT R11G starting
GGSCI (rac2.rajasekhar.com) 10> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING REPLICAT RUNNING R11G 00:00:00 00:08:04
GGSCI (rac2.rajasekhar.com) 11>
10. Test and Verify the Results
INSERT OPERATION
a1) Execute Insert on the Source Oracle Database 10gR2
[oracle@rac1 ~]$ sqlplus sender/sender;
SQL*Plus: Release 10.2.0.5.0 - Production on Fri Jul 24 02:31:44 2015
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> SQL> select * from sugi;
no rows selected
SQL> SQL> insert into sugi values ('&a','&b'); Enter value for a: RAJ Enter value for b: DBA old 1: insert into sugi values ('&a','&b') new 1: insert into sugi values ('RAJ','DBA')
1 row created.
SQL> / Enter value for a: SUGI Enter value for b: DBA old 1: insert into sugi values ('&a','&b') new 1: insert into sugi values ('SUGI','DBA')
1 row created.
SQL> / Enter value for a: TEJA Enter value for b: DBA old 1: insert into sugi values ('&a','&b') new 1: insert into sugi values ('TEJA','DBA')
1 row created.
SQL> / Enter value for a: VIJAY Enter value for b: DBA old 1: insert into sugi values ('&a','&b') new 1: insert into sugi values ('VIJAY','DBA')
1 row created.
SQL> / Enter value for a: SATYA Enter value for b: DBA old 1: insert into sugi values ('&a','&b') new 1: insert into sugi values ('SATYA','DBA')
1 row created.
SQL> / Enter value for a: MOHAN Enter value for b: DBA old 1: insert into sugi values ('&a','&b') new 1: insert into sugi values ('MOHAN','DBA')
1 row created.
SQL> / Enter value for a: AMITH Enter value for b: DBA old 1: insert into sugi values ('&a','&b') new 1: insert into sugi values ('AMITH','DBA')
1 row created.
SQL> / Enter value for a: PAVAN Enter value for b: DBA old 1: insert into sugi values ('&a','&b') new 1: insert into sugi values ('PAVAN','DBA')
1 row created.
SQL> / Enter value for a: PREM Enter value for b: DBA old 1: insert into sugi values ('&a','&b') new 1: insert into sugi values ('PREM','DBA')
1 row created.
SQL> COMMIT;
Commit complete.
SQL> SQL> select * from sugi;
NAME ROLE
SUGI DBA TEJA DBA VIJAY DBA SATYA DBA RAJ DBA MOHAN DBA AMITH DBA PAVAN DBA PREM DBA 9 rows selected. SQL>
a2) Verify Insert Changes on Target Oracle Database 11gR2
SQL> conn receiver/receiver; Connected. SQL> select * from sugi;
no rows selected
SQL> SQL> SQL> /
NAME ROLE
SUGI DBA TEJA DBA VIJAY DBA SATYA DBA MOHAN DBA AMITH DBA RAJ DBA PAVAN DBA PREM DBA
9 rows selected.
SQL>
UPDATE OPERATION
b1) Execute update on the Source Oracle Database 10gR2
SQL> show user USER is "SENDER" SQL> update sugi set role='PSE' where name='VIJAY';
1 row updated.
SQL> update sugi set role='PSE' where name='SATYA';
1 row updated.
SQL> update sugi set role='PSE' where name='PAVAN';
1 row updated.
SQL> commit;
Commit complete.
SQL> select * from sugi;
NAME ROLE
SUGI DBA TEJA DBA VIJAY PSE SATYA PSE MOHAN DBA AMITH DBA RAJ DBA PAVAN PSE PREM DBA
9 rows selected.
SQL>
b2) Verify Update Changes on Target Oracle Database 11gR2
SQL> show user USER is "RECEIVER" SQL> select * from sugi;
NAME ROLE
SUGI DBA TEJA DBA VIJAY PSE SATYA PSE