DBA Hub

📋Steps in this guide1/24

Integrated Capture - Local deployment - Bright DBA

AIM: Configure GoldenGate 12C Integrated Capture  (All extract/pump and       replicat on same database/server).

oracle performanceintermediate
by OracleDba
14 views
1

Overview

AIM: UPDATE OPERATION
2

Section 2

1. Overview <--- We will cover this soon in upcoming article 2. Environment

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
GoldenGate 12c: 
Integrated Extract is available from OGG 11g
Integrated Replicat is available from OGG 12c
What is Integrated Capture?
Instead of reading from the redo/archive logs, the Oracle GoldenGate Extract process interacts directly with a database logmining server to receive data changes in the form of logical change records (LCR).
In Pre-Goldengate 12c classic capture mode, the Oracle GoldenGate Extract process captures data changes from the Oracle redo or archive log files on the source system.
Integrated capture modes (2 Types)
a) Local deployment
The source database and the log mining server are the same database
b) Downstream deployment
<--- We will cover this soon in upcoming article
The source and log mining databases are different databases.

Server Name			: RAC1,RAC2
OS Version			: Red Hat Enterprise Linux 5.7
RAC				:
2 Node RAC
Database Version		:
11.2.0.3.10
GoldenGate Version		: Version 12.1.2.0.0 for oracle db 11.2.0.3.10
Database Name			:
BR8DBA (br8dba1, br8dba2)
File System			: ASM 
Golden Gate User		: GATE
Golden Gate Extract		: E11G
Golden Gate Pump		: P11G
Golden Gate Replicat	        : R11G
Source Schema			: SENDER
Target Schema			: RECEIVER
Oracle Home			: /u01/app/oracle/product/11.2.0.3/db_1
GoldenGate Home			: /u01/app/oracle/product/gg/ogg11 (shared home)
3

Section 3

2 Node RAC 3. Install GoldenGate 12C for Oracle 11.2.0.3.10 4. Create test schemas for replication

Code/Command (click line numbers to comment):

1
http://www.br8dba.com/goldengate-12c-installation/
4

Section 4

5. Grant DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE 6. Set streams_pool_size

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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.

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>

SQL>
exec DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE('GATE', 'capture');
PL/SQL procedure successfully completed.

SQL>
5

Section 5

7. Verify compatible *** Database version should be atleast 11.2.0.3.0 OR above *** Also using below MOS note we have to apply patch based on your current PSU 8. Setup DDL scripts at Database level a) Run marker_setup script

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
On Instance 1 (br8dba1):

SQL>
alter system set streams_pool_size=150M sid='br8dba1';
System altered.

SQL> 

On Instance 2 (br8dba2):

SQL>
alter system set streams_pool_size=150M sid='br8dba2';
System altered.

SQL>

SQL> select ISSYS_MODIFIABLE from V$PARAMETER where NAME='compatible';

ISSYS_MOD
---------
FALSE

SQL>

SQL>
show parameter compatible
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
compatible                           string
11.2.0.3.0 <----
SQL>
*** Database version should be atleast 11.2.0.3.0 OR above
*** Also using below MOS note we have to apply patch based on your current PSU
11.2.0.3 Database Specific Bundle Patches for Integrated Extract 11.2.x (Doc ID 1411356.1)

[oracle@rac1 ~]$
opatch lsinventory | grep -i 18466925
Patch  18466925     : applied on Mon Dec 05 21:56:31 IST 2016
[oracle@rac1 ~]$
6

Section 6

8. Setup DDL scripts at Database level a) Run marker_setup script b) Run ddl_setup script

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
SQL>
@marker_setup.sql
Marker setup script

You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.

Enter Oracle GoldenGate schema name:
gate <---
Marker setup table script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to GATE

MARKER TABLE
-------------------------------
OK

MARKER SEQUENCE
-------------------------------
OK

Script complete.
SQL>

SQL>
@ddl_setup.sql;
Oracle GoldenGate DDL Replication setup script

Verifying that current user has privileges to install DDL Replication...

You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: For an Oracle 10g source, the system recycle bin must be disabled. For Oracle 11g and later, it can be enabled.
NOTE: The schema must be created prior to running this script.
NOTE: Stop all DDL replication before starting this installation.

Enter Oracle GoldenGate schema name:
gate <----
Working, please wait ...
Spooling to file ddl_setup_spool.txt

Checking for sessions that are holding locks on Oracle Golden Gate metadata tables ...

Check complete.

Using GATE as a Oracle GoldenGate schema name.

Working, please wait ...

DDL replication setup script complete, running verification script...
Please enter the name of a schema for the GoldenGate database objects:
Setting schema name to GATE

CLEAR_TRACE STATUS:

Line/pos   Error
---------- --------------------------
No errors  No errors

CREATE_TRACE STATUS:

Line/pos   Error
---------- --------------------------
No errors  No errors

TRACE_PUT_LINE STATUS:

Line/pos   Error
---------- --------------------------
No errors  No errors

INITIAL_SETUP STATUS:

Line/pos   Error
---------- --------------------------
No errors  No errors

DDLVERSIONSPECIFIC PACKAGE STATUS:

Line/pos   Error
---------- --------------------------
No errors  No errors

DDLREPLICATION PACKAGE STATUS:

Line/pos   Error
---------- ----------------------------
No errors  No errors

DDLREPLICATION PACKAGE BODY STATUS:

Line/pos   Error
---------- ----------------------------
No errors  No errors

DDL IGNORE TABLE
-----------------------------------
OK

DDL IGNORE LOG TABLE
-----------------------------------
OK

DDLAUX  PACKAGE STATUS:

Line/pos   Error
---------- ----------------------------
No errors  No errors

DDLAUX PACKAGE BODY STATUS:

Line/pos   Error
---------- ----------------------------
No errors  No errors

SYS.DDLCTXINFO  PACKAGE STATUS:

Line/pos   Error
---------- ----------------------------
No errors  No errors

SYS.DDLCTXINFO  PACKAGE BODY STATUS:

Line/pos   Error
---------- ----------------------------
No errors  No errors

DDL HISTORY TABLE
-----------------------------------
OK

DDL HISTORY TABLE(1)
-----------------------------------
OK

DDL DUMP TABLES
-----------------------------------
OK

DDL DUMP COLUMNS
-----------------------------------
OK

DDL DUMP LOG GROUPS
-----------------------------------
OK

DDL DUMP PARTITIONS
-----------------------------------
OK

DDL DUMP PRIMARY KEYS
-----------------------------------
OK

DDL SEQUENCE
-----------------------------------
OK

GGS_TEMP_COLS
-----------------------------------
OK

GGS_TEMP_UK
-----------------------------------
OK

DDL TRIGGER CODE STATUS:

Line/pos   Error
---------- ------------------------------
No errors  No errors

DDL TRIGGER INSTALL STATUS
-----------------------------------
OK

DDL TRIGGER RUNNING STATUS
-----------------------------------
ENABLED

STAYMETADATA IN TRIGGER
-----------------------------------
OFF

DDL TRIGGER SQL TRACING
-----------------------------------
0

DDL TRIGGER TRACE LEVEL
-----------------------------------
0

LOCATION OF DDL TRACE FILE
----------------------------------------------------------------------
/u01/app/oracle/diag/rdbms/br8dba/br8dba1/trace/ggs_ddl_trace.log

Analyzing installation status...


VERSION OF DDL REPLICATION
----------------------------------------------------------------------
OGGCORE_12.1.2.0.0_PLATFORMS_130924.1316

STATUS OF DDL REPLICATION
----------------------------------------------------------------------
SUCCESSFUL installation of DDL Replication software components
Script complete.
SQL>
7

Section 7

c) Run ddl_enable script d) Run ddl_pin script

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
SQL>
@ddl_enable.sql;
Trigger altered.

SQL>

SQL>
@ddl_pin.sql
gate
PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.


PL/SQL procedure successfully completed.

SQL>
8

Section 8

9. OGG Configuration a) Set the environment 9. OGG Configuration a) Set the environment b) Login to Database

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
[oracle@rac1 ~]$
cat 11.env
GG11=/u01/app/oracle/product/gg/ogg11; export GG11
ORACLE_HOME=/u01/app/oracle/product/11.2.0.3/db_1;  export ORACLE_HOME
ORACLE_SID=br8dba1; export ORACLE_SID
PATH=$PATH:/u01/app/oracle/product/gg/ogg11; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/u01/app/oracle/product/gg/ogg11; export LD_LIBRARY_PATH
alias ggsci='cd $GG11; ./ggsci'
[oracle@rac1 ~]$

[oracle@rac1 ~]$
. 11.env
[oracle@rac1 ~]$
9

Section 9

c) Configure Manager d) Create Extract Group INTEGRATED TRANLOG

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
[oracle@rac1 ~]$
ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.1.2.0.0 17185003 OGGCORE_12.1.2.0.0_PLATFORMS_130924.1316_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Sep 25 2013 00:31:13
Operating system character set identified as UTF-8.

Copyright (C) 1995, 2013, 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>

GGSCI (rac1.rajasekhar.com) 2> edit param mgr

-- Add below entries 
PORT 15500
DYNAMICPORTLIST 15510-15520
PURGEOLDEXTRACTS /u01/app/oracle/product/gg/ogg11/dirdat/*, USECHECKPOINTS

GGSCI (rac1.rajasekhar.com) 3>
view params mgr
PORT 15500
DYNAMICPORTLIST 15510-15520
PURGEOLDEXTRACTS /u01/app/oracle/product/gg/ogg11/dirdat/*, USECHECKPOINTS
GGSCI (rac1.rajasekhar.com) 4>

GGSCI (rac1.rajasekhar.com) 4>
ADD EXTRACT E11G
INTEGRATED TRANLOG
, BEGIN NOW
EXTRACT added.

GGSCI (rac1.rajasekhar.com) 5>
ADD EXTTRAIL ./dirdat/ea, EXTRACT E11G, MEGABYTES 50
EXTTRAIL added.

GGSCI (rac1.rajasekhar.com) 6> edit params E11G

-- Add below entries
EXTRACT E11G
EXTTRAIL ./dirdat/ea
USERID gate, PASSWORD gate
TRANLOGOPTIONS INTEGRATEDPARAMS (MAX_SGA_SIZE 100)
DDL INCLUDE ALL
DDLOPTIONS REPORT
TABLE sender.*;
GGSCI (rac1.rajasekhar.com) 7>
view params E11G
EXTRACT E11G
EXTTRAIL ./dirdat/ea
USERID gate, PASSWORD gate
TRANLOGOPTIONS INTEGRATEDPARAMS (MAX_SGA_SIZE 100)
DDL INCLUDE ALL
DDLOPTIONS REPORT
TABLE sender.*;
GGSCI (rac1.rajasekhar.com) 8>

GGSCI (rac1.rajasekhar.com) 14>
REGISTER EXTRACT E11G DATABASE
Extract E11G successfully registered with database at SCN 2152703.
GGSCI (rac1.rajasekhar.com) 15>
10

Section 10

REGISTER EXTRACT E11G DATABASE e) Create Pump Group f) Add supplemental logging

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
GGSCI (rac1.rajasekhar.com) 8>
ADD EXTRACT P11G, EXTTRAILSOURCE ./dirdat/ea
EXTRACT added.

GGSCI (rac1.rajasekhar.com) 9> A
DD RMTTRAIL ./dirdat/pa, EXTRACT P11G, MEGABYTES 50
RMTTRAIL added.

GGSCI (rac1.rajasekhar.com) 10> edit params P11G

GGSCI (rac1.rajasekhar.com) 11>
view params P11G
EXTRACT P11G
RMTHOST 192.168.2.101, MGRPORT 15500
USERID gate, password gate
RMTTRAIL ./dirdat/pa
PASSTHRU
TABLE sender.*;
GGSCI (rac1.rajasekhar.com) 12>
11

Section 11

SCHEMATRANDATA g) Set up the Checkpoint table h) Activate the GLOBALS parameters

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
GGSCI (rac1.rajasekhar.com) 16>
ADD
SCHEMATRANDATA
sender
2016-12-05 20:36:13  INFO    OGG-01788  SCHEMATRANDATA has been added on schema sender.

2016-12-05 20:36:13  INFO    OGG-01976  SCHEMATRANDATA for scheduling columns has been added on schema sender.

GGSCI (rac1.rajasekhar.com) 17>
--
The ADD SCHEMATRANDATA command adds supplemental logging to all tables both current and future for sender schema.

GGSCI (rac1.rajasekhar.com) 17>
EDIT PARAMS ./GLOBALS
-- Add below entries
GGSCHEMA GATE
ENABLEMONITORING
CHECKPOINTTABLE GATE.CHECKPOINT
GGSCI (rac1.rajasekhar.com) 18> sh cat ./GLOBALS

GGSCHEMA GATE
ENABLEMONITORING
CHECKPOINTTABLE GATE.CHECKPOINT

GGSCI (rac1.rajasekhar.com) 19>
12

Section 12

h) 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. i) Add a Replicat checkpoint table

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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 (rac1.rajasekhar.com) 19>
exit
[oracle@rac1 ogg11]$

[oracle@rac1 ~]$
ggsci
Oracle GoldenGate Command Interpreter for Oracle
Version 12.1.2.0.0 17185003 OGGCORE_12.1.2.0.0_PLATFORMS_130924.1316_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Sep 25 2013 00:31:13
Operating system character set identified as UTF-8.

Copyright (C) 1995, 2013, 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>
ADD CHECKPOINTTABLE GATE.CHECKPOINT
Successfully created checkpoint table GATE.CHECKPOINT.

GGSCI (rac1.rajasekhar.com) 3>
13

Section 13

j) Create the Replicat Group -- The ASSUMETARGETDEFS statement means that we are assuming both source and target table structure is same. k) Start Manager, Extract, Pump and Replicat

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
GGSCI (rac1.rajasekhar.com) 3>
ADD REPLICAT R11G, EXTTRAIL ./dirdat/pa,checkpointtable gate.checkpoint
REPLICAT added.


GGSCI (rac1.rajasekhar.com) 4>
edit param r11g
-- Add below
REPLICAT R11G
ASSUMETARGETDEFS
userid gate, password gate
DISCARDFILE ./dirout/receiver.dsc, purge
ASSUMETARGETDEFS
DDLOPTIONS REPORT
MAP sender.*, TARGET receiver.*;
-- The ASSUMETARGETDEFS statement means that we are assuming both source and target table structure is same.
GGSCI (rac1.rajasekhar.com) 8> view params r11g

REPLICAT R11G
ASSUMETARGETDEFS
userid gate, password gate
DISCARDFILE ./dirout/receiver.dsc, purge
ASSUMETARGETDEFS
DDLOPTIONS REPORT
MAP sender.*, TARGET receiver.*;

GGSCI (rac1.rajasekhar.com) 9>
14

Section 14

10. Verify LIST AVAILABLE TABLES CURRENTLY a1) Source: 10. Verify LIST AVAILABLE TABLES CURRENTLY a1) Source:

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
GGSCI (rac1.rajasekhar.com) 9>
info all
Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED
JAGENT      STOPPED
EXTRACT     STOPPED     E11G        00:00:00      01:18:04
EXTRACT     STOPPED     P11G        00:00:00      01:08:06
REPLICAT    STOPPED     R11G        00:00:00      00:12:02


GGSCI (rac1.rajasekhar.com) 10>
start mgr
Manager started.


GGSCI (rac1.rajasekhar.com) 11>
start extract E11G
Sending START request to MANAGER ...
EXTRACT E11G starting


GGSCI (rac1.rajasekhar.com) 12>
start extract P11G
Sending START request to MANAGER ...
EXTRACT P11G starting


GGSCI (rac1.rajasekhar.com) 13>
start replicat R11G
Sending START request to MANAGER ...
REPLICAT R11G starting


GGSCI (rac1.rajasekhar.com) 14>
info all
Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER
RUNNING
JAGENT      STOPPED
EXTRACT
RUNNING
E11G        00:00:09      00:00:00
EXTRACT
RUNNING
P11G        00:00:00      02:29:55
REPLICAT
RUNNING
R11G        00:00:00      00:00:04

GGSCI (rac1.rajasekhar.com) 5>

SQL>
conn sender/sender;
Connected.
SQL> select * from tab;

no rows selected
<----
SQL>
15

Section 15

a2) Target: CREATE TABLE OPERATION b1) Source: CREATE TABLE OPERATION b1) Source:

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
SQL>
conn receiver/receiver
Connected.
SQL> select * from tab;

no rows selected
<---
SQL>
16

Section 16

b2) Target: INSERT OPERATION c1) Execute INSERT on the Source INSERT OPERATION

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
SQL>
create table sugi(Name varchar2(10) PRIMARY KEY, Role varchar2(10));
Table created.

SQL>

SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
SUGI                           TABLE <-----
SQL>
17

Section 17

c1) Execute INSERT on the Source c2) Verify Insert Changes on Target UPDATE OPERATION d1) Execute update on the Source

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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: TEJU
Enter value for b: DBA
old   1: insert into SUGI values ('&a','&b')
new   1: insert into SUGI values ('TEJU','DBA')

1 row created.

SQL> COMMIT;

Commit complete.

SQL>
SELECT * FROM SUGI;
NAME       ROLE
---------- ----------
RAJ        DBA
SUGI       DBA
TEJU       DBA
SQL>

SQL> SELECT * FROM SUGI;

NAME       ROLE
---------- ----------
RAJ        DBA
SUGI       DBA
TEJU       DBA
SQL>
18

Section 18

UPDATE OPERATION d1) Execute update on the Source d2) Verify Update Changes on Target

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
SQL>
update SUGI TEJU SET role='MANAGER' where name='RAJ';
1 row updated.

SQL>
update SUGI SET role='MANAGER' where name='TEJU';
1 row updated.

SQL> commit;

Commit complete.

SQL> select * from sugi;

NAME       ROLE
---------- ----------
RAJ        MANAGER
<----
SUGI       DBA
TEJU       MANAGER
<----
SQL>

SQL> select * from sugi;

NAME       ROLE
---------- ----------
RAJ        MANAGER
<----
SUGI       DBA
TEJU       MANAGER
<----
SQL>
19

Section 19

DELETE OPERATION e1) Execute Delete on the Source DELETE OPERATION e1) Execute Delete on the Source e2) Verify Delete Changes on Target

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
SQL>
delete from SUGI where name='RAJ';
1 row deleted.

SQL> COMMIT;

Commit complete.

SQL> SELECT * FROM SUGI;

NAME       ROLE
---------- ----------
SUGI       DBA
TEJU       MANAGER
SQL>
20

Section 20

ALTER TABLE OPERATION f1) Execute ALTER TABLE on the Source ALTER TABLE OPERATION f1) Execute ALTER TABLE on the Source f2) Verify ALTER TABLE Changes on Target

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
SQL> SELECT * FROM SUGI;

NAME       ROLE
---------- ----------
SUGI       DBA
TEJU       MANAGER
SQL>

SQL>
CREATE TABLE TEST AS SELECT * FROM SUGI;
Table created.

SQL> SELECT * FROM TAB;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
SUGI                           TABLE
TEST                           TABLE <----
SQL>
ALTER TABLE TEST ADD EMPNO VARCHAR2(30);
Table altered.

SQL> desc test
 Name        Null?    Type
 ---------   -------- ----------------------------
 NAME                 VARCHAR2(10)
 ROLE                 VARCHAR2(10)
 EMPNO                VARCHAR2(30)
             
SQL>
21

Section 21

DROP TABLE OPERATION g1) Execute DROP TABLE on the Source DROP TABLE OPERATION g1) Execute DROP TABLE on the Source g2) Verify DROP TABLE Changes on Target

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
SQL>
desc test
Name      Null?    Type
 -------   -------- ----------------------------
 NAME               VARCHAR2(10)
 ROLE               VARCHAR2(10)
 EMPNO              VARCHAR2(30)
<-----
SQL>

SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
SUGI                           TABLE
TEST                           TABLE

SQL>
drop table
sugi
purge;
Table dropped.

SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
TEST                           TABLE
<----
SQL>
22

Section 22

g2) Verify DROP TABLE Changes on Target TRUNCATE TABLE OPERATION h1) Execute TRUNCATE TABLE on the Source TRUNCATE TABLE OPERATION h1) Execute TRUNCATE TABLE on the Source

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
SQL> select * from tab;

TNAME                          TABTYPE  CLUSTERID
------------------------------ ------- ----------
TEST                           TABLE <----

SQL>

SQL>
truncate table test;
Table truncated.

SQL> select count(*) from test;

  COUNT(*)
----------
         0
<----
SQL>
23

Section 23

h2) Verify TRUNCATE TABLE Changes on Target 11. Verify alertlog (alert_br8dba1.log)

Code/Command (click line numbers to comment):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
SQL> select count(*) from test;

  COUNT(*)
----------
         0
<----
SQL>

CAPTURE OGG$CAP_E11G: Source Database:
BR8DBA
CAPTURE OGG$CAP_E11G: Parameter Set by User: CAPTURE_IDKEY_OBJECTS Value: Y
CAPTURE OGG$CAP_E11G: Parameter Set by User: CAPTURE_SEQUENCE_NEXTVAL Value: N
CAPTURE OGG$CAP_E11G: Parameter Set by User: GETAPPLOPS Value: Y
CAPTURE OGG$CAP_E11G: Parameter Set by User: GETREPLICATES Value: N
CAPTURE OGG$CAP_E11G: Parameter Set by User: INCLUDE_OBJECTS Value: SYS.SMON_SCN_TIME
CAPTURE OGG$CAP_E11G: Parameter Set by User: MAX_SGA_SIZE Value: 100
<---
CAPTURE OGG$CAP_E11G: Parameter Set by User:
PARALLELISM Value: 2 <---
GoldenGate CAPTURE CP01 for OGG$CAP_E11G with pid=54, OS id=32549 is in combined capture and apply mode.
Capture OGG$CAP_E11G is handling 1 applies.
  -- capture is running in apply-state checkpoint mode.
Starting persistent Logminer Session with sid = 1 for GoldenGate Capture OGG$CAP_E11G
LOGMINER:
Parameters summary for session# = 1
LOGMINER:
Number of processes = 4, Transaction Chunk Size = 1
LOGMINER
: Memory Size = 66M, Checkpoint interval = 1000M
LOGMINER
: SpillScn 0, ResetLogScn 1974745
LOGMINER: summary for session# = 1
LOGMINER: StartScn: 2279365 (0x0000.0022c7c5)
LOGMINER: EndScn: 0
LOGMINER: HighConsumedScn: 2279365 (0x0000.0022c7c5)
LOGMINER: session_flag: 0xf0
LOGMINER: Read buffers: 64
LOGMINER: Memory LWM limit: 10M, 79%
LOGMINER: Memory Release Limit: 15000
LOGMINER: LowCkptScn: 2275760 (0x0000.0022b9b0)
LOGMINER: HighCkptScn: 2275762 (0x0000.0022b9b2)
LOGMINER: SkipScn: 2275760 (0x0000.0022b9b0)
Tue Dec 06 00:56:22 2016
LOGMINER
: session#=1 (OGG$CAP_E11G), reader MS00 pid=55 OS id=32557 sid=164 started
Tue Dec 06 00:56:22 2016
LOGMINER
: session#=1 (OGG$CAP_E11G), builder MS01 pid=57 OS id=32561 sid=162 started
Tue Dec 06 00:56:22 2016
LOGMINER
: session#=1 (OGG$CAP_E11G), preparer MS02 pid=58 OS id=32565 sid=33 started
Tue Dec 06 00:56:22 2016
LOGMINER: session#=1 (OGG$CAP_E11G), preparer MS03 pid=60 OS id=32569 sid=22 started
CAPTURE OGG$CAP_E11G: Session Restart SCN: 2275760
LOGMINER: Begin mining logfile for session 1 thread 1 sequence 20, +TEST/br8dba/onlinelog/group_2.272.924477045
LOGMINER: Begin mining logfile for session 1 thread 2 sequence 17, +TEST/br8dba/onlinelog/group_3.271.924477045
Tue Dec 06 00:56:23 2016
XStream Out client for OGG$E11G with pid=61, OS id=32572 is waiting for GoldenGate Capture OGG$CAP_E11G to complete initializ
ation.
XStream Out client for OGG$E11G successfully attached to GoldenGate Capture OGG$CAP_E11G to receive uncommitted changes with
pid=61, OS id=32572.
[oracle@rac1 trace]$
24

Section 24

Caution: Your use of any information or materials on this website is entirely at your own risk. It is provided for educational purposes only. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using. Caution: Your use of any information or materials on this website is entirely at your own risk. It is provided for educational purposes only. It has been tested internally, however, we do not guarantee that it will work for you. Ensure that you run it in your test environment before using. Reference: 11.2.0.3 Database Specific Bundle Patches for Integrated Extract 11.2.x (Doc ID 1411356.1)

Comments (0)

Please to add comments

No comments yet. Be the first to comment!