重庆思庄Oracle、Redhat认证学习论坛
标题:
11G ADG 主库redlog大小不一致
[打印本页]
作者:
zhouwei1990
时间:
2017-12-29 17:20
标题:
11G ADG 主库redlog大小不一致
11G DG环境中,主库LOG FILE不一致。
GROUP# THREAD# SEQUENCE# BYTES BLOCKSIZE MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME
---------- ---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- --------- ------------ ---------
1 1 38 52428800 512 1 NO CURRENT 1218499 29-DEC-17 2.8147E+14
2 1 37 52428800 512 1 YES ACTIVE 1218456 29-DEC-17 1218499 29-DEC-17
3 2 23 52428800 512 1 YES ACTIVE 1216069 29-DEC-17 1218491 29-DEC-17
4 2 22 52428800 512 1 YES INACTIVE 1212688 29-DEC-17 1216069 29-DEC-17
13 1 36 104857600 512 1 YES ACTIVE 1218447 29-DEC-17 1218456 29-DEC-17
14 2 24 104857600 512 1 NO CURRENT 1218491 29-DEC-17 2.8147E+14
此时,备库备用日志文件,如果全为50M,则当主库日志切换到100M大小的redo log时,备库会报错(此时使用不了主备实时同步功能,需要主库进行日志切换后数据才能同步到备库):
RFS[2]: No standby redo logfiles available for thread 1
备库备用日志文件必须大于或者等于主库redo log大小。
如果将在备库添加一个100M大小的standby log file。则主库切换到100M redo log时,备库自动找到100M的standby redo log。
GROUP# DBID THREAD# SEQUENCE# BYTES BLOCKSIZE USED ARC STATUS FIRST_CHANGE# FIRST_TIM NEXT_CHANGE# NEXT_TIME LAST_CHANGE# LAST_TIME
---------- ---------------------------------------- ---------- ---------- ---------- ---------- ---------- --- ---------- ------------- --------- ------------ --------- ------------ ---------
5 UNASSIGNED 1 0 52428800 512 0 NO UNASSIGNED
6 UNASSIGNED 1 0 52428800 512 0 NO UNASSIGNED
7 UNASSIGNED 1 0 52428800 512 0 YES UNASSIGNED
8 UNASSIGNED 1 0 52428800 512 0 YES UNASSIGNED
9 1425129662 2 34 52428800 512 28160 YES ACTIVE 1233408 29-DEC-17 1233404 29-DEC-17
10 UNASSIGNED 2 0 52428800 512 0 NO UNASSIGNED
11 UNASSIGNED 2 0 52428800 512 0 YES UNASSIGNED
12 UNASSIGNED 2 0 52428800 512 0 YES UNASSIGNED
13 1425129662 1 63 104857600 512 24064 YES ACTIVE 1233436 29-DEC-17 1233605 29-DEC-17
14 UNASSIGNED 2 0 104857600 512 0 YES UNASSIGNED
15 UNASSIGNED 1 0 104857600 512 0 YES UNASSIGNED
而备库告警日志会提示找到对应的standby redo:
RFS[1]: Selected log 15 for thread 1 sequence 64 dbid 1425129662 branch 89734892
总结:
1.主库redo log大小尽量保证每组一致。
2.当主库redo log 大小不一致时,备库standby redo log最少应该跟主库redo log大小一致。
比如:主库2个100M redo log组,备库也需要创建2个100M standby redo log组。
3.当主库redo log 大小不一致时,备库standby redo log建议最好每组大小均设置为主库最大的redo log大小。
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/)
Powered by Discuz! X3.2