欢迎来到天天文库
浏览记录
ID:37713114
大小:37.08 KB
页数:16页
时间:2019-05-29
《oracle dataguard》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、OracleDataGuard常用维护命令参考手册 2009-12-0913:40:44
2、 分类: Oracle
3、字号 订阅OracleDataGuard常用维护命令参考手册StartStandbyDatabasestartupnomountalterdatabasemountstandbydatabase;alterdatabaserecovermanagedstandbydatabasedisconnect;Disable/Enablearchivelogdestinationsaltersystems
4、etlog_archive_dest_state_2='defer';altersystemsetlog_archive_dest_state_2='enable';Toremoveadelayfromastandbyalterdatabaserecovermanagedstandbydatabasecancel;alterdatabaserecovermanagedstandbydatabasenodelaydisconnect;StopandStartofLogicalstandbyapplyalterda
5、tabasestoplogicalstandbyapply;alterdatabasestartlogicalstandbyapply;PhysicalStandbyswitchover:InPrimaryDatabase:ALTERDATABASECOMMITTOSWITCHOVERTOPHYSICALSTANDBY;SHUTDOWNIMMEDIATE;STARTUPNOMOUNT;ALTERDATABASEMOUNTSTANDBYDATABASE;InstandbyDatabase:ALTERDATABAS
6、ECOMMITTOSWITCHOVERTOPRIMARY;SHUTDOWNIMMEDIATE;STARTUP;InPrimaryDatabase:ALTERDATABASERECOVERMANAGEDSTANDBYDATABASEDISCONNECTFROMSESSION; IftheprimaryDatabaseisdown,wecanusefllowingsteptoactivestandbydatabase:AlterDATABASERECOVERMANAGEDSTANDBYDATABASEFINISH;
7、AlterDATABASECOMMITTOSWITCHOVERTOPRIMARY;SHUTDOWNIMMEDIATE;STARTUP;RegistermissingarchivelogfileFindarchiveloggapbyquery:SELECTTHREAD#,LOW_SEQUENCE#,HIGH_SEQUENCE#FROMV$ARCHIVE_GAP;registerusing:ALTERDATABASEREGISTERPHYSICALLOGFILE'filespec1'; selectprotect
8、ion_mode,protection_levelfromv$databaseselectdatabase_rolefromv$databaseselect switchover_status from v$database ALTERDATABASECOMMITTOSWITCHOVERTOPRIMARY;ALTERDATABASECOMMITTOSWITCHOVERTOPHYSICALSTANDBY; 1. 设置主站点为FORCELOGGING模式;AlterDATABASEFORCELOG
9、GING;2. 设置归档模式,在整个DATAGUARD环境中,不允许出现非归档模式,因此以后导数据之类的工作不能改到非归档模式下做,否则dataguard需要重做。a) 打开/关闭自动归档altersystem setlog_archive_start=true scope=spfile;altersystem setlog_archive_start=false scope=spfile;altersystemarchivelogstart; --打开自动归档altersystem
10、archivelogstop; --关闭自动归档 b) 打开/关闭归档日志状态ShutdownimmediateStartupmountalterdatabasearchivelog; --打开alterdatabasenoarchivelog; --关闭alterdatabaseopen; 3. 做数据库的冷备份a) 关闭数据库
此文档下载收益归作者所有