Unidirectional DML Replication

Wesley13
• 阅读 587

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

点赞
收藏
评论区
推荐文章
blmius blmius
3年前
MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1
文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s
皕杰报表之UUID
​在我们用皕杰报表工具设计填报报表时,如何在新增行里自动增加id呢?能新增整数排序id吗?目前可以在新增行里自动增加id,但只能用uuid函数增加UUID编码,不能新增整数排序id。uuid函数说明:获取一个UUID,可以在填报表中用来创建数据ID语法:uuid()或uuid(sep)参数说明:sep布尔值,生成的uuid中是否包含分隔符'',缺省为
待兔 待兔
3个月前
手写Java HashMap源码
HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程HashMap的使用教程22
Jacquelyn38 Jacquelyn38
3年前
2020年前端实用代码段,为你的工作保驾护航
有空的时候,自己总结了几个代码段,在开发中也经常使用,谢谢。1、使用解构获取json数据let jsonData  id: 1,status: "OK",data: 'a', 'b';let  id, status, data: number   jsonData;console.log(id, status, number )
Wesley13 Wesley13
3年前
mysql设置时区
mysql设置时区mysql\_query("SETtime\_zone'8:00'")ordie('时区设置失败,请联系管理员!');中国在东8区所以加8方法二:selectcount(user\_id)asdevice,CONVERT\_TZ(FROM\_UNIXTIME(reg\_time),'08:00','0
Stella981 Stella981
3年前
DOIS 2019 DevOps国际峰会北京站来袭~
DevOps国际峰会是国内唯一的国际性DevOps技术峰会,由OSCAR 联盟指导、DevOps时代社区与高效运维社区联合主办,共邀全球80余名顶级专家畅谈DevOps体系与方法、过程与实践、工具与技术。会议召开时间:2019070508:00至2019070618:00结束会议召开地点:北京主办单位:DevOps
Wesley13 Wesley13
3年前
00:Java简单了解
浅谈Java之概述Java是SUN(StanfordUniversityNetwork),斯坦福大学网络公司)1995年推出的一门高级编程语言。Java是一种面向Internet的编程语言。随着Java技术在web方面的不断成熟,已经成为Web应用程序的首选开发语言。Java是简单易学,完全面向对象,安全可靠,与平台无关的编程语言。
Stella981 Stella981
3年前
Android蓝牙连接汽车OBD设备
//设备连接public class BluetoothConnect implements Runnable {    private static final UUID CONNECT_UUID  UUID.fromString("0000110100001000800000805F9B34FB");
Wesley13 Wesley13
3年前
MySQL部分从库上面因为大量的临时表tmp_table造成慢查询
背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_
Python进阶者 Python进阶者
9个月前
Excel中这日期老是出来00:00:00,怎么用Pandas把这个去除
大家好,我是皮皮。一、前言前几天在Python白银交流群【上海新年人】问了一个Pandas数据筛选的问题。问题如下:这日期老是出来00:00:00,怎么把这个去除。二、实现过程后来【论草莓如何成为冻干莓】给了一个思路和代码如下:pd.toexcel之前把这