1.查看特定进程的状态
------------------------------------------------------------------------------------------
GGSCI (xag100) 12> info ex1
EXTRACT EX1 Last Started 2020-04-16 22:51 Status RUNNING
Checkpoint Lag 00:00:10 (updated 00:00:04 ago)
Process ID 6126
Log Read Checkpoint Oracle Integrated Redo Logs
2020-04-16 23:00:42
SCN 0.1029860 (1029860)
# 上面 “Oracle Integrated Redo Logs” 表示 进程抽取模式为集成抽取模式
------------------------------------------------------------------------------------------
GGSCI (xag101) 10> info rt1
REPLICAT RT1 Last Started 2020-04-16 22:51 Status RUNNING
INTEGRATED
Checkpoint Lag 00:00:00 (updated 00:00:09 ago)
Process ID 6105
Log Read Checkpoint File /u01/app/oracle/product/ogg/dirdat/r1000000002
2020-04-16 22:53:27.228634 RBA 2370
# 上面 “INTEGRATED” 表示 进程REPLICAT模式为集成REPLICAT模式
------------------------------------------------------------------------------------------
2.配置流池(stream pool)大小
在抽取进程启用的数据库(抽取源库或 downstream 库)上,需配置流池大小,以应用于 logmining Server。
SQL> ALTER SYSTEM SET streams_pool_size=<pool_size> scope=both sid=‘*‘;
注意:流池大小由集成抽取参数 MAX_SGA_SIZE 及 PARALLELISM 决定,推荐公式为 (MAX_SGA_SIZE * PARALLELISM) * 1.25 ???
SQL> show parameter sga_max_size
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
sga_max_size big integer 2592M
alter system set streams_pool_size=1000m scope=both;
3.集成抽取(Integrated Capture)模式降级至传统抽取(Classic Capture)模式
a.备份软件目录
Back up the current Oracle GoldenGate working directories.
b.修改抽取进程参数
大多数情况下,传统抽取模式下的抽取进程参数同样适用于集成抽取模式下的抽取进程,此时需按需修改抽取进程参数。
c.停止抽取进程
GGSCI> STOP EXTRACT ex1
d.检查进程是否允许降级为传统抽取模式
GGSCI> INFO EXTRACT ex1 UPGRADE
e.GGSCI 环境下登陆源端数据库 (使用类似如下语句,在 GGSCI 环境下登陆源端数据库)
GGSCI> dblogin useridalias ogg100
f.降级抽取进程至集成抽取模式
GGSCI> ALTER EXTRACT ex1 DOWNGRADE INTEGRATED TRANLOG
g.反注册抽取进程
GGSCI> UNREGISTER EXTRACT ex1 DATABASE
h.修改 配置文件,去掉如下文件中的 “TRANLOGOPTIONS INTEGRATEDPARAMS” 整行信息
GGSCI (xag100 as ogg_admin@DB100) 30> view param ex1
extract ex1
SETENV(ORACLE_SID="DB100")
SETENV(NLS_LANG=AMERICAN_AMERICA.AL32UTF8)
USERID ogg_admin, PASSWORD 123456
TRANLOGOPTIONS INTEGRATEDPARAMS (max_sga_size 300,_LOGMINER_READ_BUFFERS 128,parallelism 2)
REPORTCOUNT EVERY 30 MINUTES, RATE
DISCARDFILE /u01/app/oracle/product/ogg/dirrpt/extsr1.dsc, APPEND, MEGABYTES 1024
DISCARDROLLOVER AT 3:00
EXTTRAIL /u01/app/oracle/product/ogg/dirdat/e1
DYNAMICRESOLUTION
DBOPTIONS ALLOWUNUSEDCOLUMN
FETCHOPTIONS NOUSESNAPSHOT
FETCHOPTIONS FETCHPKUPDATECOLS
TABLE us01.t1;
i.重启抽取进程
GGSCI> START EXTRACT ex1
4.查看特定进程的状态
GGSCI (xag100 as ogg_admin@DB100) 34> info ex1
EXTRACT EX1 Last Started 2020-04-16 23:30 Status RUNNING
Checkpoint Lag 00:00:00 (updated 00:00:04 ago)
Process ID 6346
Log Read Checkpoint Oracle Redo Logs
2020-04-16 23:30:13 Seqno 17, RBA 4290048
SCN 0.1034338 (1034338)
上面 “Oracle Redo Logs” 表示 进程抽取模式为传统抽取模式(Classic Capture)
5.升级抽取进程
a.备份软件目录
Back up the current Oracle GoldenGate working directories.
b.修改抽取进程参数
大多数情况下,传统抽取模式下的抽取进程参数同样适用于集成抽取模式下的抽取进程,此时需按需修改抽取进程参数。
例如:设置集成抽取进程单个 logminner 进程使用 SGA 大小为 300M,logminner 进程数为 2。
修改ex1 配置增加如下内容
TRANLOGOPTIONS INTEGRATEDPARAMS (max_sga_size 300,_LOGMINER_READ_BUFFERS 128,parallelism 2)
c.GGSCI 环境下登陆源端数据库 使用类似如下语句,在 GGSCI 环境下登陆源端数据库。
GGSCI> dblogin useridalias ogg100
d.停止抽取进程
GGSCI> STOP EXTRACT ex1
e.注册抽取进程以挖掘数据库
GGSCI> REGISTER EXTRACT ex1 DATABASE
f.检查进程是否允许升级为集成抽取模式
GGSCI> INFO EXTRACT ex1 UPGRADE
Extract EX1 is ready to be upgraded to integrated capture.
g.升级抽取进程至集成抽取模式
GGSCI> ALTER EXTRACT ex1 UPGRADE INTEGRATED TRANLOG
h.重启抽取进程
GGSCI> START EXTRACT ex1
6.查看特定进程的状态
GGSCI (xag100 as ogg_admin@DB100) 62> info ex1
EXTRACT EX1 Last Started 2020-04-16 23:47 Status RUNNING
Checkpoint Lag 00:00:06 (updated 00:00:05 ago)
Process ID 6456
Log Read Checkpoint Oracle Integrated Redo Logs
2020-04-16 23:47:36
SCN 0.1058365 (1058365)
# 上面 “Oracle Integrated Redo Logs” 表示 进程抽取模式为集成抽取模式