資源描述:
《Oracle dataguard 11G 配置與維護(hù)手冊(cè)》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫。
1、Oracle11gR2Dataguard配置手冊(cè)1.判斷DataGuard是否安裝select*fromv$optionwhereparameter='OracleDataGuard';2.網(wǎng)絡(luò)配置192.168.1.10(orcl)------------------------------------192.168.1.20(dg)3.監(jiān)聽配置主庫[oracle@node1~]$cd/u01/app/product/11.2.0/db_1/network/admin[oracle@node1admin]$catlistener.oraLIST
2、ENER=(DESCRIPTION_LIST=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node1)(PORT=1521))))[oracle@node1admin]$cattnsnames.oraORCL=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=node1)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl)))DG=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(P
3、ROTOCOL=TCP)(HOST=node2)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=dg)Oracle11gR2Dataguard配置手冊(cè)))備庫[oracle@node1admin]$catlistener.oraLISTENER=(DESCRIPTION_LIST=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT=1521))))[oracle@node1admin]$cattnsnames.oraORCL=(DESCRIPTION=(AD
4、DRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=node1)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=orcl)))DG=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=node2)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=dg)))4.主庫前期準(zhǔn)備設(shè)置強(qiáng)制寫日志SQL>selectFORCE_LOGGINGfromv$database;NOSQL>alterdatabas
5、eforcelogging;SQL>selectFORCE_LOGGINGfromv$database;YESOracle11gR2Dataguard配置手冊(cè)5.創(chuàng)建口令文件orapwdfile=$ORACLE_HOME/dbs/orapwdb1password=oracleentries=56.修改主庫初始化參數(shù)創(chuàng)建主庫pfilesql>createpfilefromspfile;修改pfileDB_UNIQUE_NAME=orclLOG_ARCHIVE_CONFIG='DG_CONFIG=(orcl,dg)'LOG_ARCHIVE_DEST_
6、1='LOCATION=/u01/app/archiveVALID_FOR=(ALL_LOGFILES,ALL_ROLES)DB_UNIQUE_NAME=orcl'LOG_ARCHIVE_DEST_2='SERVICE=dgLGWRASYNCVALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)DB_UNIQUE_NAME=dg'LOG_ARCHIVE_DEST_STATE_1=ENABLELOG_ARCHIVE_DEST_STATE_2=ENABLELOG_ARCHIVE_FORMAT=%t_%s_%r.arcFAL_
7、SERVER=dgFAL_CLIENT=orclSTANDBY_FILE_MANAGEMENT=AUTOPfile拷貝到備庫上scp–rp/u01/app/product/11.2.0/db_1/dbs/initorcl.oranode2:/u01/app/product/11.2.0/db_1/dbs/7.修改數(shù)據(jù)庫運(yùn)行在歸檔模式下SHUTDOWNIMMEDIATE;STARTUPMOUNT;ALTERDATABASEARCHIVELOG;ALTERDATABASEOPEN;8.創(chuàng)建備份庫需要的控制文件創(chuàng)建控制文件Shutdownimmedia
8、teSTARTUPMOUNT;ALTERDATABASECREATESTANDBYCONTROLFILEAS'/tmp/orcl.ctl