VR虚拟现实物理DATAGUARD主备切换对OGGDML同步影响测试.docx
- 文档编号:27625030
- 上传时间:2023-07-03
- 格式:DOCX
- 页数:39
- 大小:23.17KB
VR虚拟现实物理DATAGUARD主备切换对OGGDML同步影响测试.docx
《VR虚拟现实物理DATAGUARD主备切换对OGGDML同步影响测试.docx》由会员分享,可在线阅读,更多相关《VR虚拟现实物理DATAGUARD主备切换对OGGDML同步影响测试.docx(39页珍藏版)》请在冰豆网上搜索。
VR虚拟现实物理DATAGUARD主备切换对OGGDML同步影响测试
物理DATAGUARD主备切换对OGG(DML)同步影响测试
一、环境介绍
数据库角色
DG主库
DG备库
OGG同步库(查询库)
IP
10.15.59.102
10.14.156.137
10.15.34.36
操作系统版本
AIX5.3
AIX5.3
AIX5.2
Oraclerdbms版本
10.2.0.4.0
10.2.0.4.0
10.2.0.4.0
OGG版本
10.2.0.19build002
None
10.2.0.19build002
xlC.rte版本
9.0.0.1
10.1.0.0
9.0.0.1
Oraclesid
oratest
oratest
oratest
Db_unique_name
oratest
phyoratest
oratest
注:
如何搭建环境在此文档中不做描述。
测试表:
test.testtb
SQL>desctest.testtb
NameNull?
Type
---------------------------------------------------------------------------------------
ANUMBER(38)
切换前纪录:
主库:
SQL>select*fromtest.testtborderbya;
A
----------------------------
4
6
7
8
9
10
20
100
200
500
1000
A
--------------------------
1001
1002
5000
30000
15rowsselected.
OGG查询库:
SQL>select*fromtest.testtborderbya;
A
-------------------------
4
6
7
8
9
10
20
100
200
500
1000
A
-----------------------
1001
1002
5000
30000
15rowsselected.
通过表中的数据比较可以看到主库与OGG查询库为同步状态。
主库后台日志:
Thread1advancedtologsequence48(LGWRswitch)
Currentlog#2seq#48mem#0:
/oratest/oratest/redo02.log
WedDec1813:
28:
542013
ARC1:
Standbyredologfileselectedforthread1sequence47fordestinationLOG_ARCHIVE_DEST_2
WedDec1813:
40:
322013
Thread1advancedtologsequence49(LGWRswitch)
Currentlog#3seq#49mem#0:
/oratest/oratest/redo03.log
WedDec1813:
40:
322013
ARC1:
Standbyredologfileselectedforthread1sequence48fordestinationLOG_ARCHIVE_DEST_2
可以看到当前主库归档日志为48号,在线日志为49号(未归档)
DG灾备库后台日志:
RFS[1]:
Identifieddatabasetypeas'physicalstandby'
TueDec1723:
27:
202013
RFSLogMiner:
Clientdisabledfromfurthernotification
TueDec1723:
29:
512013
RFS[1]:
Successfullyopenedstandbylog4:
'/oratest/oratest/stand01.dbf'
TueDec1723:
29:
522013
MediaRecoveryLog/oratest/archive/1_47_834059738.dbf
MediaRecoveryWaitingforthread1sequence48
TueDec1723:
41:
302013
RFS[1]:
Successfullyopenedstandbylog4:
'/oratest/oratest/stand01.dbf'
TueDec1723:
41:
332013
MediaRecoveryLog/oratest/archive/1_48_834059738.dbf
MediaRecoveryWaitingforthread1sequence49
可以看到当前灾备库已经MediaRecovery的归档日志为48号,等待的下个日志为49号
综上,可以判断出主库与灾备库当前为同步状态。
二、DG主备切换:
主库操作:
1.Altersystemswitchlogfile;
主库后台日志:
WedDec1813:
45:
032013
Thread1advancedtologsequence50(LGWRswitch)
Currentlog#1seq#50mem#0:
/oratest/oratest/redo01.log
WedDec1813:
45:
032013
ARC1:
Standbyredologfileselectedforthread1sequence49fordestinationLOG_ARCHIVE_DEST_2
备库后台日志:
TueDec1723:
46:
012013
RFS[1]:
Successfullyopenedstandbylog4:
'/oratest/oratest/stand01.dbf'
TueDec1723:
46:
032013
MediaRecoveryLog/oratest/archive/1_49_834059738.dbf
MediaRecoveryWaitingforthread1sequence50
2.在主库关闭OGG查询库同步进程
GGSCI(loopback)34>infoall
ProgramStatusGroupLagTimeSinceChkpt
MANAGERRUNNING
EXTRACTRUNNINGDP0100:
00:
0000:
00:
02
EXTRACTRUNNINGEXT0100:
00:
0000:
00:
06
GGSCI(loopback)35>stop*
SendingSTOPrequesttoEXTRACTDP01...
Requestprocessed.
SendingSTOPrequesttoEXTRACTEXT01...
Requestprocessed.
GGSCI(loopback)36>infoall
ProgramStatusGroupLagTimeSinceChkpt
MANAGERRUNNING
EXTRACTSTOPPEDDP0100:
00:
0000:
00:
03
EXTRACTSTOPPEDEXT0100:
00:
0000:
00:
01
3.查看主库状态并切换主->备
主库操作:
Sql>selectNAME,DB_UNIQUE_NAME,OPEN_MODE,PROTECTION_MODE,PROTECTION_LEVEL,SWITCHOVER#,DATABASE_ROLE,SWITCHOVER_STATUSfromv$database;
NAMEDB_UNIQUE_NAMEOPEN_MODEPROTECTION_MODEPROTECTION_LEVELSWITCHOVER#
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DATABASE_ROLESWITCHOVER_STATUS
------------------------------------------------------------------------
ORATESToratestREADWRITEMAXIMUMPERFORMANCEMAXIMUMPERFORMANCE3369866885
PRIMARYTOSTANDBY
Sql>alterdatabasecommittoswitchovertophysicalstandby;
Databasealtered.
主库后台日志:
WedDec1813:
48:
012013
alterdatabasecommittoswitchovertophysicalstandby
WedDec1813:
48:
012013
ALTERDATABASECOMMITTOSWITCHOVERTOPHYSICALSTANDBY(oratest)
WedDec1813:
48:
022013
Thread1advancedtologsequence51(LGWRswitch)
Currentlog#2seq#51mem#0:
/oratest/oratest/redo02.log
WedDec1813:
48:
022013
ARC0:
Standbyredologfileselectedforthread1sequence50fordestinationLOG_ARCHIVE_DEST_2
WedDec1813:
48:
022013
SMON:
disablingtxrecovery
WedDec1813:
48:
022013
StoppingbackgroundprocessCJQ0
WedDec1813:
48:
022013
StoppingbackgroundprocessQMNC
WedDec1813:
48:
042013
StoppingJobqueueslaveprocesses,flags=27
WedDec1813:
48:
042013
Jobqueueslaveprocessesstopped
Waitingfordispatcher'D000'toshutdown
Alldispatchersandsharedserversshutdown
WedDec1813:
48:
092013
SMON:
disablingcacherecovery
WedDec1813:
48:
092013
Shuttingdownarchiveprocesses
Archivingisdisabled
WedDec1813:
48:
142013
ARCHshuttingdown
ARC1:
Archivalstopped
WedDec1813:
48:
192013
ARCHshuttingdown
ARC0:
Archivalstopped
WedDec1813:
48:
202013
Thread1closedatlogsequence51
Successfulcloseofredothread1
WedDec1813:
48:
202013
ARCH:
Noswitcharchivalofthread1,sequence51
ARCH:
End-Of-RedoBrancharchivalofthread1sequence51
ARCH:
Archivingisdisabledduetocurrentlogfilearchival
ClearingstandbyactivationID3369866885(0xc8dc1685)
Theprimarydatabasecontrolfilewascreatedusingthe
'MAXLOGFILES16'clause.
Thereisspaceforupto13standbyredologfiles
UsethefollowingSQLcommandsonthestandbydatabasetocreate
standbyredologfilesthatmatchtheprimarydatabase:
ALTERDATABASEADDSTANDBYLOGFILE'srl1.f'SIZE52428800;
ALTERDATABASEADDSTANDBYLOGFILE'srl2.f'SIZE52428800;
ALTERDATABASEADDSTANDBYLOGFILE'srl3.f'SIZE52428800;
ALTERDATABASEADDSTANDBYLOGFILE'srl4.f'SIZE52428800;
Archivelogforthread1sequence51requiredforstandbyrecovery
Switchover:
Primarycontrolfileconvertedtostandbycontrolfilesuccesfully.
MRP0startedwithpid=14,OSid=1802254
WedDec1813:
48:
212013
MRP0:
BackgroundManagedStandbyRecoveryprocessstarted(oratest)
ManagedStandbyRecoverynotusingRealTimeApply
parallelrecoverystartedwith15processes
Onlinelogfilepre-clearingoperationdisabledbyswitchover
MediaRecoveryLog/oratest/archive/1_51_834059738.dbf
IdentifiedEnd-Of-Redoforthread1sequence51
WedDec1813:
48:
262013
MediaRecoveryEnd-Of-Redoindicatorencountered
WedDec1813:
48:
272013
MediaRecoveryApplieduntilchange633877
WedDec1813:
48:
272013
MRP0:
MediaRecoveryComplete:
End-Of-REDO(oratest)
ResettingstandbyactivationID3369866885(0xc8dc1685)
WedDec1813:
48:
282013
MRP0:
BackgroundMediaRecoveryprocessshutdown(oratest)
WedDec1813:
48:
292013
Switchover:
Complete-Databaseshutdownrequired(oratest)
WedDec1813:
48:
292013
Completed:
alterdatabasecommittoswitchovertophysicalstandby
WedDec1813:
48:
292013
idledispatcher'D000'terminated,pid=(14,1)
备库后台日志:
TueDec1723:
48:
592013
RedoShippingClientConnectedasPUBLIC
--ConnectedUserisValid
RFS[2]:
AssignedtoRFSprocess655484
RFS[2]:
Identifieddatabasetypeas'physicalstandby'
RFS[2]:
Successfullyopenedstandbylog4:
'/oratest/oratest/stand01.dbf'
TueDec1723:
49:
032013
MediaRecoveryLog/oratest/archive/1_50_834059738.dbf
MediaRecoveryWaitingforthread1sequence51
TueDec1723:
49:
182013
RedoShippingClientConnectedasPUBLIC
--ConnectedUserisValid
RFS[3]:
AssignedtoRFSprocess647280
RFS[3]:
Identifieddatabasetypeas'physicalstandby'
RFS[3]:
ArchivedLog:
'/oratest/archive/1_51_834059738.dbf'
TueDec1723:
49:
192013
MediaRecoveryLog/oratest/archive/1_51_834059738.dbf
IdentifiedEnd-Of-Redoforthread1sequence51
TueDec1723:
49:
222013
MediaRecoveryEnd-Of-Redoindicatorencountered
TueDec1723:
49:
222013
MediaRecoveryApplieduntilchange633877
TueDec1723:
49:
222013
MRP0:
MediaRecoveryComplete:
End-Of-REDO(oratest)
ResettingstandbyactivationID3369866885(0xc8dc1685)
TueDec1723:
49:
252013
MRP0:
BackgroundMediaRecoveryprocessshutdown(oratest)
4.启动主库到mount状态,并查看主库状态
主库操作:
SQL>shutdownimmediate
ORA-01507:
databasenotmounted
ORACLEinstanceshutdown.
SQL>startupmount
ORACLEinstancestarted.
TotalSystemGlobalArea1610612736bytes
FixedSize2084400bytes
VariableSize385876432bytes
DatabaseBuffers1207959552bytes
RedoBuffers14692352bytes
Databasemounted.
SQL>selectNAME,DB_UNIQUE_NAME,OPEN_MODE,PROTECTION_MODE,PROTECTION_LEVEL,SWITCHOVER#,DATABASE_ROLE,SWITCHOVER_STATUSfromv$database;
NAMEDB_UNIQUE_NAMEOPEN_MODEPROTECTION_MODEPROTECTION_LEVELSWITCHOVER#
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
DATABASE_ROLESWITCHOVER_STATUS
------------------------------------------------------------------------
ORATESToratestMOUNTEDMAXIMUMPERFORMANCEMAXIMUMPERFORMANCE0
PHYSICALSTANDBYTOPRIMARY
可以看到已经转变为备库
5.查看备库状态并切换备->主
备库操作:
SQL>selectNAME,DB_UNIQUE_NAME,OPEN_MODE,PROTECTION_MODE,PROTECTION_LEVEL,SWITCHOVER#,DATABASE_ROLE,SWITCHOVER_STATUSfromv$database;
NAMEDB_UNIQUE_NAME
------------------------------------------------------------------------------
OPEN_MODEPROTECTION_MODE
------------------------------------------------------------
PROTECTION_LEVELSWITCHOVER#
---------------------------------------------------
DATABASE_ROLESWITCHOVER_STATUS
------------------------------------------------------------------------
ORATESTphyoratest
MOUNTEDMAXIMUMPERFORMANCE
MAXIMUMPER
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- VR 虚拟现实 物理 DATAGUARD 切换 OGGDML 同步 影响 测试
![提示](https://static.bdocx.com/images/bang_tan.gif)