源 端:Oracle 11.2.0.4 RAC R2
目标端:Oracle 11.2.0.4 RAC R2
源端是生产库。目标端数据库采用ogg,按表名 从生产库同步至与生产库配置相同的交换数据库内的数据,提供客户端只读访问。
1.巡检中发现交换库端ogg的replicat进程为running状态,且有延迟
GGSCI (hxbak2) 1> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EX_PUB unknown 00:00:09
EXTRACT RUNNING EX_TLKZX 00:00:00 00:00:09
EXTRACT RUNNING EX_WEB 00:00:00 00:00:00
EXTRACT RUNNING EX_WEBR 00:00:00 00:00:04
EXTRACT RUNNING P_PUB 00:00:00 00:00:08
EXTRACT RUNNING P_TLKZX 00:00:00 00:00:05
EXTRACT RUNNING P_WEB 00:00:00 00:00:03
EXTRACT RUNNING P_WEBR 00:00:00 00:00:03
EXTRACT RUNNING P_WEBRB 00:00:00 00:00:02
REPLICAT RUNNING R_AC01 00:00:00 00:00:01
REPLICAT RUNNING R_OTH 00:00:00 00:00:01
REPLICAT RUNNING R_OTHB 00:00:00 00:00:01
REPLICAT RUNNING R_TLSI 43:47:46 02:35:48
REPLICAT RUNNING R_TLSIWW 00:00:00 00:00:00
REPLICAT RUNNING R_WEB 00:00:00 00:00:08
REPLICAT RUNNING R_WEBR 00:00:00 00:00:09
2.首先查看本地文件系统/ogg的空间使用情况 : #df -g
$df -g
Filesystem GB blocks Free %Used Iused %Iused Mounted on
/dev/hd4 5.00 4.70 6% 10927 1% /
/dev/hd2 10.00 5.99 41% 62354 5% /usr
/dev/hd9var 5.00 4.15 18% 9020 1% /var
/dev/hd3 5.00 3.85 24% 3069 1% /tmp
/dev/hd1 6.00 1.00 84% 2120 1% /home
/dev/hd11admin 0.25 0.25 1% 5 1% /admin
/proc - - - - - /proc
/dev/hd10opt 5.00 4.71 6% 10590 1% /opt
/dev/livedump 0.25 0.25 1% 4 1% /var/adm/ras/livedump
/dev/fslv00 40.00 13.20 67% 499465 14% /u01
/dev/ogg_lv 350.00 334.80 5% 941 1% /ogg
/dev/explv 590.00 238.61 60% 419 1% /exp_backup
/dev/ITMLV 4.00 3.08 23% 4353 1% /opt/IBM/ITM
⚠️发现/ogg使用情况正常
GGSCI (hxbak2) 3> send R_TLSI status
Sending STATUS request to REPLICAT R_TLSI ...
Current status: Processing data
Sequence #: 15103
RBA: 83501358
5549 records in current transaction
GGSCI (hxbak2) 4> !
send R_TLSI status
Sending STATUS request to REPLICAT R_TLSI ...
Current status: Processing data
Sequence #: 15103
RBA: 83502483
5553 records in current transaction
GGSCI (hxbak2) 5> !
send R_TLSI status
Sending STATUS request to REPLICAT R_TLSI ...
Current status: Processing data
Sequence #: 15103
RBA: 83503334
5556 records in current transaction
⚠️发现延迟进程正在同步1503号归档日志的内的事务
4.查看延迟进程当前事物时间点状态:stats r_tlsi hourly
Sending STATS request to REPLICAT R_TLSI ...
Start of Statistics at 2017-11-02 12:51:12.
Replicating from TLSI.ZE31 to TLSI.ZE31:
*** Hourly statistics since 2017-11-02 12:00:00 ***
No database operations have been performed.
Replicating from TLSI.KC22 to TLSI.KC22:
*** Hourly statistics since 2017-11-02 12:00:00 ***
No database operations have been performed.
*** Hourly statistics since 2017-11-02 12:00:00 ***
Total inserts 0.00
Total updates 0.00
Total deletes 3270.00
Total discards 0.00
Total operations 3270.00
⚠️返回结果省略
INST_ID SID USERNAME MODULE EVENT SQL_ID LAST_CALL_ET
---------- ---------- ---------- ------------------------------ ------------------------------ ------------- ------------
1 756 OGG OGG-R_TLSI-OPEN_DATA_SOURCE SQL*Net message from client cn41135fzbkdw 1
SQL> select * from table(dbms_xplan.display_awr('步骤7查询得到的sql_id'))
根据查询结果,针对不同结果进一步优化