資源描述:
《oracle11g搭建dataguard步驟》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫。
1、WORD資料可編輯ORACLE11G搭建DATAGUARD步驟1安裝環(huán)境在主機(jī)1上安裝數(shù)據(jù)庫軟件,并建監(jiān)聽和實例,在主機(jī)2上安裝數(shù)據(jù)庫軟件,并建監(jiān)聽,但不建實例。主機(jī)1主機(jī)2操作系統(tǒng)redhat6.164位redhat6.164位主機(jī)名dg1db2IP192.168.132.3192.168.132.4數(shù)據(jù)庫軟件版本oracle11.2.0.1.0oracle11.2.0.1.0ORACLE_BASE/oracle/app/oracle//oracle/app/oracle/ORACLE_HOME$ORACLE_BASE/produc
2、t/11.2.0/db_1$ORACLE_BASE/product/11.2.0/db_1ORACLE_SIDdbtest閃回區(qū)4G歸檔開啟2主數(shù)據(jù)庫配置2.1設(shè)置數(shù)據(jù)庫強(qiáng)制歸檔sqlplus/assysdbaSQL>ALTERDATABASEFORCELOGGING;SQL>selectforce_loggingfromv$database;FOR---YES專業(yè)整理分享WORD資料可編輯1.1添加STANDBY日志文件SQL>alterdatabaseaddstandbylogfilegroup4('/oradata/dbtest
3、/redo04.log')size50m;SQL>alterdatabaseaddstandbylogfilegroup5('/oradata/dbtest/redo05.log')size50m;SQL>alterdatabaseaddstandbylogfilegroup6('/oradata/dbtest/redo06.log')size50m;SQL>alterdatabaseaddstandbylogfilegroup7('/oradata/dbtest/redo07.log')size50m;SQL>select*from
4、v$logfileorderby1;1.2修改參數(shù)文件1.2.1生成pfileSQL>createpfilefromspfile;SQL>shutdownimmediate;1.2.2修改pfilevi$ORACLE_HOME/dbs/initdbtest.ora在最后添加如下內(nèi)容:*.db_unique_name=dbtest1*.fal_server='dbtest2'*.fal_client='dbtest1'*.standby_file_management=auto*.db_file_name_convert='/orada
5、ta/dbtest/','/oradata/dbtest/'專業(yè)整理分享WORD資料可編輯*.log_file_name_convert='/oradata/dbtest/','/oradata/dbtest/'*.log_archive_config='dg_config=(dbtest1,dbtest2)'*.log_archive_dest_2='service=dbtest2LGWRSYNCAFFIRMvalid_for=(online_logfiles,primary_role)db_unique_name=dbtest2'
6、*.log_archive_dest_state_2='ENABLE'1.1.1生成spfileSQL>shutdownimmediate[oracle@dbserver01~]$cd$ORACLE_HOME/dbs[oracle@dbserver01dbs]$mvspfilejkfwdb.oraspfilejkfwdb.ora.bakSQL>startupnomountSQL>createspfilefrompfile;Filecreated.SQL>showparameteruniqSQL>shutdownimmediate;SQ
7、L>startupSQL>showparameterspfile1.2修改監(jiān)聽配置文件1.3修改TNS配置文件[oracle@dg1admin]$cattnsnames.ora#tnsnames.oraNetworkConfigurationFile:/oracle/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora#GeneratedbyOracleconfigurationtools.專業(yè)整理分享WORD資料可編輯DBTEST=(DESCRIPTION=(ADDRES
8、S=(PROTOCOL=TCP)(HOST=192.168.132.3)(PORT=1521))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=dbtest1)))DBTEST