goldengate 学习系列7-ogg 12c support read standby redo
本站文章除注明转载外,均为本站原创: 转载自love wife love life —Roger的Oracle/MySQL/PostgreSQL数据恢复博客
Goldengate 12c support redo standby redo
1. source
1) 配置好active dg(略)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
1) active dataguard [oracle@11g_adg ~]$ sqlplus roger/roger@roger SQL*Plus: Release 11.2.0.4.0 Production on Tue Jun 9 16:25:07 2015 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select database_role,open_mode from v$database; DATABASE_ROLE OPEN_MODE ---------------- -------------------- PRIMARY READ WRITE SQL> conn roger/roger@standby Connected. SQL> select database_role,open_mode from v$database; DATABASE_ROLE OPEN_MODE ---------------- -------------------- PHYSICAL STANDBY READ ONLY WITH APPLY |
2)add tranlog
1 2 3 4 5 6 7 8 |
GGSCI (11g_adg) 107> dblogin userid ggs@roger,password ggs Successfully logged into database. GGSCI (11g_adg as ggs@roger) 109> ADD SCHEMATRANDATA ROGER 2015-06-09 16:09:28 INFO OGG-01788 SCHEMATRANDATA has been added on schema ROGER. 2015-06-09 16:09:28 INFO OGG-01976 SCHEMATRANDATA for scheduling columns has been added on schema ROGER. |
说明:这里进行add schematrandata 仍然需要连接到primary db.
3) 抽取进程/pump 进程配置
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 |
GGSCI (11g_adg as ggs@standby) 122> view param ext1 extract ext1 userid ggs@standby,password ggs discardfile ./dirrpt/ext1.dsc, append, megabytes 50 warnlongtrans 2h, checkinterval 3m TRANLOGOPTIONS MINEFROMACTIVEDG EXTTRAIL ./dirdat/ex ,FORMAT RELEASE 11.2 NUMFILES 3000 ALLOCFILES 200 table roger.*; GGSCI (11g_adg as ggs@standby) 123> view param dp1 EXTRACT dp1 RMTHOST 192.168.1.110, MGRPORT 7809 TCPBUFSIZE 5000000 PASSTHRU RMTTRAIL ./dirdat/rm , format release 11.2 NUMFILES 3000 TABLE roger.*; GGSCI (11g_adg as ggs@standby) 124> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT RUNNING DP1 00:00:00 00:00:03 EXTRACT RUNNING EXT1 00:00:00 00:00:04 |
说明:参数 TRANLOGOPTIONS MINEFROMACTIVEDG 是12.1引入的新参数。
2. target
1)复制进程配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
GGSCI (killdb.com) 24> view param rep1124 replicat rep1124 userid ggs@roger,password ggs reperror default, discard DISCARDROLLOVER AT 20:30 discardfile ./dirrpt/rep1124.dsc, append, megabytes 50 assumetargetdefs allownoopupdates numfiles 3000 map roger.*, target roger.*; GGSCI (killdb.com) 25> info rep1124 REPLICAT REP1124 Last Started 2015-06-09 16:14 Status RUNNING Checkpoint Lag 00:00:00 (updated 00:00:06 ago) Log Read Checkpoint File ./dirdat/rm000006 2015-06-09 16:10:38.060936 RBA 1609 |
3. 测试dml
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 |
--11gR2 primary db SQL> conn roger/roger Connected. SQL> insert into t_ogg values(1,'a'); 1 row created. SQL> insert into t_ogg values(1,'a'); 1 row created. SQL> insert into t_ogg values(2,'b'); 1 row created. SQL> insert into t_ogg values(3,'c'); 1 row created. SQL> commit; Commit complete. SQL> SQL> SQL> select database_role,open_mode from v$database; DATABASE_ROLE OPEN_MODE ---------------- -------------------- PRIMARY READ WRITE ---target db www.killdb.com>conn roger/roger Connected. www.killdb.com>select * from t_ogg; ID NAME ---------- -------------------- 1 a 1 a 2 b 3 c www.killdb.com>select * from v$version where rownum < 2; BANNER ---------------------------------------------------------------- Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Prod |
Leave a Reply
You must be logged in to post a comment.