




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
PerformingSwitchoverandFailoverObjectivesAftercompletingthislesson,youshouldbeabletodothefollowing:ExplainthedatabaserolesPerformaswitchoverPerformafailoverUseFlashbackDatabaseafterafailoverTypesofRolesinan
OracleDataGuardConfigurationTherearetwotypesofrolesinanOracleDataGuardconfiguration:Userrole:identifiesthegroupanddeterminestheprivilegesassignedtoauser.Databaserole:identifieswhatrole(primaryorstandby)thedatabaseplaysinaDataGuardconfiguration.SQL>SELECTdatabase_roleFROMv$database;
DATABASE_ROLE
----------------
LOGICALSTANDBYRoleManagementServicesAdatabaseoperatesinoneoftwomutuallyexclusiverolesinaDataGuardconfiguration:Primaryrole:Thedatabaseisoperatingintheprimaryrole,andredotransportservicesareshippingredotothestandbydatabases.Standbyrole:Thedatabaseisoperatinginthestandbyrole,andlogapplyservicesareapplyingthearchivedredologstothestandbydatabase.Withrolemanagementservices,youcanchangetheserolesdynamically.RoleTransitions:SwitchoverandFailoverNotautomaticallyinvokedSwitchoverPlannedrolereversalUsedforOSorhardwaremaintenanceFailoverUnplannedrolereversalUsedinanemergencyMinimalornodatalossdependingonthe
data-protectionmodeFast-startfailovercanbeenabledforautomaticfailoverChoosingtheBestRoleTransitionOperationAreyouperformingaplannedroletransitionsothatyoucanperformhardwareorsoftwaremaintenanceonthesystemthatcurrentlyhoststheprimarydatabase?Switchovertobestavailablestandbydatabase.YesCanyouruncrashrecoverytorepairtheprimarydatabaseinatimelymanner?YesRepairprimarydatabase.NoNoFailovertobestavailablestandbydatabase.SwitchoverTransitionstherolesoftheprimaryandstandbydatabasesNoresettingoftheonlineredologsofthenewprimarydatabaseNodatalossSwitchover:BeforeStandby
databaseRead/write
transactionsPrimary
databaseSanFranciscoBostonOracleNetApplicationApplicationRead-onlyreportsSwitchover:AfterStandby
databaseRead/write
transactionsPrimary
databaseApplicationApplicationRead-onlyreportsSanFranciscoBostonOracleNetStandbyRedoLogsandSwitchoversStandbyredologsshouldbeconfiguredontheprimarydatabasetoeaseswitchovers.RedoshipmentRFSStandbyredologsOnlineredologsPrimarydatabaseStandbydatabaseStandbyredologsPreparingforaSwitchoverVerifythefollowinginpreparationfortheswitchoveroperation:networkconnectivitybetweentheprimaryandstandbylocations.PerformingaSwitchoverbyUsing
EnterpriseManagerSelectthedatabaseandclickSwitchover.PerformingaSwitchoverbyUsing
EnterpriseManagerClickYestoconfirm.PerformingaSwitchoverbyUsing
EnterpriseManagerPerformingaSwitchover
toaPhysicalStandbybyUsingSQLPerformthesestepsonlyifyouarenotusingtheDataGuardbroker.Ontheoriginalprimarydatabase:Verifythatitispossibletoperformaswitchoveroperation.Initiatetheswitchoveroperationontheprimarydatabase:Shutdownandrestarttheinstance.SQL>ALTERDATABASECOMMITTOSWITCHOVERTO2PHYSICALSTANDBY;PerformingaSwitchover
toaPhysicalStandbybyUsingSQLOntheoriginalphysicalstandbydatabase:VerifytheswitchoverstatusintheV$DATABASEview.Switchthephysicalstandbydatabaseroletotheprimaryrole.Ifthestandbydatabasewasopenedread-only,shutdownandrestartthenewprimarydatabase.Ifitwasnotopenedread-only,openthedatabase.Beginarchivinglogstothephysicalstandbydatabase.PerformingaSwitchover
toaLogicalStandbybyUsingSQLOntheoriginalprimarydatabase:Verifythatitispossibletoperformaswitchover.Preparetheprimarydatabasefortheswitchover:SQL>ALTERDATABASEPREPARETOSWITCHOVER2TOLOGICALSTANDBY;PerformingaSwitchover
toaLogicalStandbybyUsingSQLOntheoriginallogicalstandbydatabase:Preparethelogicalstandbydatabaseforswitchover:SQL>ALTERDATABASEPREPARETOSWITCHOVER2TOPRIMARY;PerformingaSwitchover
toaLogicalStandbybyUsingSQLOntheoriginalprimarydatabase:VerifytheswitchoverstatusinV$DATABASE.Switchtheprimarydatabasetothelogicalstandbydatabaserole:SQL>ALTERDATABASECOMMITTOSWITCHOVER2TOLOGICALSTANDBY;PerformingaSwitchover
toaLogicalStandbybyUsingSQLSQL>ALTERDATABASECOMMITTOSWITCHOVER2TOPRIMARY;SQL>ALTERSYSTEMARCHIVELOGCURRENT;Onthenewprimarydatabase(originallogicalstandbydatabase):VerifytheswitchoverstatusinV$DATABASE.Switchthelogicalstandbydatabasetotheprimarydatabaserole.Ensurethatallstandbydatabasesbeginreceivingredodata.PerformingaSwitchover
toaLogicalStandbybyUsingSQLOnthenewlogicalstandbydatabase:StartSQLApply.SQL>ALTERDATABASE2STARTLOGICALSTANDBYAPPLY;ConsiderationsWhenPerformingaSwitchovertoaLogicalStandbyDatabaseSwitchoveroperationdoesnotcauseashutdownoftheprimary.Thereisnoneedtoterminateusersessions,butterminationisrecommended.Logicalstandbydatabasemaynothavealldata.SituationsThatPreventaSwitchoverYoucannotperformaswitchoverinthefollowingsituations:Archivedredologfilesareunavailable.Point-in-timerecoveryisrequired.Productiondatabaseisnotopenandcannotbeopened.FailoverStandby
databasebecomesprimarydatabase.Read/write
transactionsOnlineredo
logsLocalarchivingSanFranciscoBostonArchivedredo
logsApplicationOnlineRedo
LogsLocalArchivingArchivedredo
logsPrimarydatabaseFailoverConsiderationsOldprimarydatabaseisnolongerpartoftheconfiguration.Datalossispossible.Failovershouldbeusedonlyinanemergency.Special-casefailover:activationofastandbyPerformingaFailoverbyUsing
EnterpriseManagerSelectthedatabaseandclickFailover.PerformingaFailoverbyUsing
EnterpriseManagerPerformingaFailoverbyUsing
EnterpriseManagerSelectthefailovertypeandclickYes.PerformingaFailoverbyUsing
EnterpriseManagerPerformingaFailover
toaPhysicalStandbyDatabaseThephysicalstandbydatabaseneedstobereinstated.PerformingaFailover
toaLogicalStandbyDatabaseThelogicalstandbydatabaseisnowtheprimarydatabase.Thephysicalstandbydatabaseisdisabled.PerformingaFailovertoa
PhysicalStandbyDatabasebyUsingSQLIdentifyandresolveanygapsinthearchivedredologfiles.Repeatstep1untilallgapsareresolved.Copyanyothermissingarchivedredologfiles.Initiatethefailoveroperationonthetargetstandbydatabase.Convertthephysicalstandbydatabasetotheprimaryrole.Completethetransitionofthestandbydatabasetotheprimarydatabaserole.(Optional)Backupthenewprimarydatabase.(Optional)Restorethefailedprimarydatabase.PerformingaFailovertoa
LogicalStandbyDatabasebyUsingSQLCopymissingredologstothelogicalstandbydatabase.Registerthemissingredologs:Ifitexists,registerthepartiallyfilledarchivelogfile.Ensurethatallredologfileshavebeenappliedtothenewprimarydatabase.SQL>ALTERDATABASEREGISTERLOGICAL2LOGFILE'filespec';SQL>SELECTAPPLIED_SCN,LATEST_SCN2FROMV$LOGSTDBY_PROGRESS;PerformingaFailovertoa
LogicalStandbyDatabasebyUsingSQLActivatethenewprimarydatabase:Enablearchivingofredologs.BeginSQLApplyoperationsonalllogicalstandbydatabases:SQL>ALTERDATABASEACTIVATE2LOGICALSTANDBYDATABASE3FINISHAPPLY;SQL>ALTERDATABASESTARTLOGICALSTANDBY2APPLYNEWPRIMARYdblink;ActivatingaStandbyDatabaseWhenyouareunabletofailover,youcanactivateastandbydatabasebyissuingoneofthefollowingcommands(dependingontheroleofthedatabase):SQL>ALTERDATABASEACTIVATE2LOGICALSTANDBYDATABASE;SQL>ALTERDATABASEACTIVATE2PHYSICALSTANDBYDATABASE;RestoringDatabasesAfteraRoleTransitionAdditionalstepsmaybeneededtorestoreyourdisaster-recoverysolutionafteraroletransition:Databasesmaybedisabled,butarenotremovedfromthebrokerconfiguration.Reenablebrokermanagementofthedatabases:ReinstatedatabasesusingtheREINSTATE
DATABASEcommandorthroughEnterpriseManager.Re-createdatabasesfromacopyoftheprimarydatabaseandreenablethedatabase
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 公司現(xiàn)金支取管理制度
- 公司落實(shí)安全管理制度
- 江蘇開放大學(xué)2025年春大學(xué)英語(A)復(fù)習(xí)題3參考答案
- 2025房產(chǎn)買賣合同與購房協(xié)議
- 河南省2024~2025學(xué)年 高二下冊第一次質(zhì)量檢測數(shù)學(xué)試卷附解析
- 廣東省惠州市2024-2025學(xué)年高一下冊數(shù)學(xué)期末考試模擬卷附解析
- 神秘傳承的考驗(yàn)基礎(chǔ)知識(shí)點(diǎn)歸納
- 產(chǎn)權(quán)顧問工作簡歷模板
- 社區(qū)社區(qū)服務(wù)社會(huì)學(xué)研究管理基礎(chǔ)知識(shí)點(diǎn)歸納
- 上饒市市直學(xué)校遴選教師筆試真題2024
- 內(nèi)分泌科臨床路徑存在問題及整改措施
- 嵊泗縣洋山客運(yùn)站工程環(huán)評報(bào)告
- 農(nóng)家樂出租合同協(xié)議書
- 2025年北京海淀初三二模語文試題及答案
- 2024年成都市八年級(jí)(初二會(huì)考)中考地理+生物真題試卷
- 福建福建省紅十字基金會(huì)人員招聘筆試歷年參考題庫附帶答案詳解
- 2024北京海淀區(qū)四年級(jí)(下)期末數(shù)學(xué)試題及答案
- 2025年江蘇鹽城市燕舞集團(tuán)有限公司招聘筆試參考題庫含答案解析
- 【MOOC】運(yùn)輸包裝-暨南大學(xué) 中國大學(xué)慕課MOOC答案
- 2023年高考真題-生物(遼寧卷) 含答案
評論
0/150
提交評論