欢迎来到天天文库
浏览记录
ID:32658233
大小:101.67 KB
页数:21页
时间:2019-02-14
《oracle_data_guard安装配置与操作维护使用指南》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、准备工作主机Hosts表要添加两台数据库的主机名和IP地址;主机是primary,配置两机监听备机是standby,配置两机监听启动关闭命名dbstartdbshutlsnrctlstartlsnrctlstoptnspingprimarytnspingstandby安装数据库配置监听器主数据库配置SQL>alterdatabaseforcelogging;SQL>shutdownimmediateSQL>startupmountSQL>alterdatabasearchivelog;SQL>archiveloglis
2、t$sqlplus/nologSQL*Plus:Release10.2.0.1.0一ProductiononMonMay3010:06:472011Copyright(c)1982,2005,Oracle・AHrightsreserved.SQL>conn/assysdbaConnected.SQL>alterdatabaseforcelogging;Databasealtered•SQL>shutdownimmediateDatabaseclosed.Databasedismounted•ORACLEinstance
3、shutdown.SQL>startupmountORACLEinstancestarted•TotalSystemGlobalFixedSizeVariableSizeDatabaseBuffersRedoBuffersDatabasemounted.Area364904448bytes1219424bytes92275872bytes264241152bytes7168000bytesArchiveModeEnabledSQL>alterdatabasearchivelog;Databasealtered•SQL>
4、archiveloglistDatabaselogmodeAutomaticarchivalArchivedestination/opt/oracle/oradata/primary/archiveOldestonlinelogsequence1Nextlogsequencetoarchive2Currentlogsequence2主拷贝数据库文件SQL>selectnamefromv$datafile;SQL>shutdownimmediate;SQL>selectnamefromv$datafile;NAME/op
5、t/oracle/oradata/primary/systemOl•dbf/opt/oracle/oradata/primary/undotbsOl•dbf/opt/oracle/oradata/primary/sysauxOl•dbf/opt/oracle/oradata/primary/usersOl•dbfSQL>shutdownimmediate;ORA-01109:databasenotopenDatabasedismounted•ORACLEinstanceshutdown.主创建控制文件SQL>start
6、upmountSQL>alterdatabasecreatestandbycontrolfileas1$ORACLE_BASE/oradata/primary/standby.ctl1;SQL>startupmountORACLEinstancestarted•TotalSystemGlobalFixedSizeVariableSizeDatabaseBuffersRedoBuffersDatabasemounted.Area364904448bytes1219424bytes92275872bytes26424115
7、2bytes7168000bytesSQL>alterdatabasecreatestandbycontrolfileas1/opt/oracle/oradata/primmry/stmndby•ct11;Databasealtered•主创建密码文件copy(主)$ORACLE_HOME/dbs/orapwprimary修改名称为orapwstandbycopy(备)$ORACLE_HOME/dbs下如果没有创建一$rm$ORACLE_HOME/dbs/orapwprimary$orapwdfile=1$ORACLE
8、_HOME/dbs/orapwprimary1password=sysentries=5主创建初始化参数SQL>createpfile=1$ORACLE_HOME/dbs/initprimary.ora1fromspfile;SQL>createpfile=*$ORACLE_HOME/dbs/initstandby.ora*fro
此文档下载收益归作者所有