oracle11g dg方案

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

•简单搭建DataGuard•Failover•Switchover•ADG•SnapshotStandby•跳归档恢复•备库的设计方案•闪回数据库•故障分析知识点概览简单搭建DataGuard•fs.aio-max-nr=3145728•cat/proc/sys/fs/aio-max-nr•sysctl-wfs.aio-max-nr=3145728•rmantargetsys/oracle@dataguruauxiliarysys/oracle@sdatagurunocatalog•Duplicatetargetdatabaseforstandbyfromactivedatabasenofilenamecheck;•createconfigurationdg_dataguruasprimarydatabaseisdataguruconnectidentifierisdataguru;•adddatabasesdataguruasconnectidentifierissdatagurumaintainedasphysical;Switchover•1.Verifythatitispossibleselectdatabase_role,switchover_statusfromv$database;•2.Initiatetheswitchoveroperationontheprimarydatabasealterdatabasecommittoswitchovertophysicalstandbywithsessionshutdownwait;•3.Shutdownandrestarttheoriginalprimaryinstance•5.Verifytheswitchoverstatusinstandby•6.Switchthephysicalstandbydatabaseroletotheprimaryrolealterdatabasecommittoswitchovertoprimary;•7.openthenewprimarydatabase•8.Startrecoveralterdatabaserecovermanagedstandbydatabasedisconnectfromsession;alterdatabaserecovermanagedstandbydatabaseusingcurrentlogfileDisconnectfromsession;Failovertophysicalstandby1.resolvegapSELECTthread#,low_sequence#,high_sequence#FROMv$archive_gap;ALTERDATABASEREGISTERPHYSICALLOGFILE'filespec1‘2.FinishrecoverALTERDATABASERECOVERMANAGEDSTANDBYDATABASEFINISHFORCE;3.ConverttoprimaryALTERDATABASECOMMITTOSWITCHOVERTOPRIMARYReinstate避免重复搭建DataGuard,原理原来的主库开启闪回数据库ActiveDataGuard•Selectopen_modefromv$database;–READONLYWITHAPPLY•Recovermanagedstandbydatabasedisconnectfromsession;•Recovermanagedstandbydatabasedisconnectfromsessionusingcurrentlogfile;SnapshotStandby•可读可写的备库•切换为SnapshotStandby•selectdatabase_role,open_modefromv$database;•Dgmgrlconvertdatabasesdatagurutosnapshotstandby;SQLAlterdatabaseconverttosnapshotstandby;•切换回PhysicalStandby•dgmgrlconvertdatabasesdatagurutophysicalstandby;•SQLalterdatabaseconverttophysicalstandby;•切换角色之后,需要重启备库跳归档恢复•归档丢失,重建备库–SELECTCURRENT_SCNFROMV$DATABASE;•增量备份•同步控制文件•数据变化不频繁,恢复过一个丢失半年归档的数据库•resetdatabasetoincarnation2;跳归档恢复•主库:•BACKUPINCREMENTALFROMSCN2291364DATABASEFORMAT'/home/oracle/backup_stage/sdataguru_%U'tag'FORSTANDBY';•备份控制文件•备库:•恢复控制文件•catalogstartwith'/U01/backup_stage/increment_backup';•Recovermanagedstandbydatabasecancel;•recoverdatabasenoredo;•colCURRENT_SCNformat9999999999999999999999•SELECTCURRENT_SCNFROMV$DATABASE;•recovermanagedstandbydatabasedisconnectfromsession;备库的设计方案备库的设计方案极端环境的恢复闪回数据库闪回数据库•Startupmount•Alterdatabaseflashbackon;11g的改进AlterdatabaseflashbackonAlterdatabaseflashbackoff故障分析DropDatafile导致的OracleBug10.2.0.4.0–Adddatafile–Dropdatafile–MRPshutdown–Bug5623467-CorruptredofromALTERTABLESPACEDROPDATAFILE(文档ID5623467.8)11g备库无法开启ADG的原因分析–Showparametercompatible–备库的compatible为11.1.0.7以上

1 / 14
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功