欢迎来到天天文库
浏览记录
ID:26021932
大小:231.86 KB
页数:9页
时间:2018-11-24
《oracle-11g-搭建dataguard步骤》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、ORACLE11G搭建DATAGUARD步骤1安装环境在主机1上安装数据库软件,并建监听和实例,在主机2上安装数据库软件,并建监听,但不建实例。主机1主机2操作系统redhat6.164位redhat6.164位主机名dg1db2IP192.168.132.3192.168.132.4数据库软件版本oracle11.2.0.1.0oracle11.2.0.1.0ORACLE_BASE/oracle/app/oracle//oracle/app/oracle/ORACLE_HOME$ORACLE_BASE/product/11.2.0/d
2、b_1$ORACLE_BASE/product/11.2.0/db_1ORACLE_SIDdbtest闪回区4G归档开启2主数据库配置2.1设置数据库强制归档sqlplus/assysdbaSQL>ALTERDATABASEFORCELOGGING;SQL>selectforce_loggingfromv$database;FOR---YES1.1添加STANDBY日志文件SQL>alterdatabaseaddstandbylogfilegroup4('/oradata/dbtest/redo04.log')size50m;SQL>a
3、lterdatabaseaddstandbylogfilegroup5('/oradata/dbtest/redo05.log')size50m;SQL>alterdatabaseaddstandbylogfilegroup6('/oradata/dbtest/redo06.log')size50m;SQL>alterdatabaseaddstandbylogfilegroup7('/oradata/dbtest/redo07.log')size50m;SQL>select*fromv$logfileorderby1;1.2修改参数文件
4、1.2.1生成pfileSQL>createpfilefromspfile;SQL>shutdownimmediate;1.2.2修改pfilevi$ORACLE_HOME/dbs/initdbtest.ora在最后添加如下内容:*.db_unique_name=dbtest1*.fal_server='dbtest2'*.fal_client='dbtest1'*.standby_file_management=auto*.db_file_name_convert='/oradata/dbtest/','/oradata/dbtest
5、/'*.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'*.log_archive_dest_state_2='ENABLE'1.1.1生成sp
6、fileSQL>shutdownimmediate[oracle@dbserver01~]$cd$ORACLE_HOME/dbs[oracle@dbserver01dbs]$mvspfilejkfwdb.oraspfilejkfwdb.ora.bakSQL>startupnomountSQL>createspfilefrompfile;Filecreated.SQL>showparameteruniqSQL>shutdownimmediate;SQL>startupSQL>showparameterspfile1.2修改监听配置文件1.
7、3修改TNS配置文件[oracle@dg1admin]$cattnsnames.ora#tnsnames.oraNetworkConfigurationFile:/oracle/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora#GeneratedbyOracleconfigurationtools.DBTEST=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.132.3)(PORT=1521))(CONNECT_DATA
8、=(SERVER=DEDICATED)(SERVICE_NAME=dbtest1)))DBTEST1=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.13
此文档下载收益归作者所有