配置ORACLE 11G ADG
时间:2022-03-14 02:20
以前装过10g的,没有做笔记,昨天使用duplicate方法装了个11g ADG,过程艰辛,记录下:
一、环境配置
主库
IP地址:192.168.233.128/24
操作系统版本:rhel5.8 64bit
数据库版本:11.2.0.1 64bit
数据库sid名:orcl
数据库名:orcl
数据库db_unique_name:orcl1
主机名:pr
物理备库
IP地址:192.168.233.129/24
操作系统版本:rhel5.8 64bit
数据库版本:11.2.0.1 64bit
数据库sid名:orcl
数据库名:orcl
数据库db_unique_name:orcl2
主机名:st
二、修改主备库listener.ora,tnsnames.ora文件如下
三、修改主库、备库的pfile文件,红色部分为新增加的部分。
[oracle@st dbs]$ more initorcl.ora orcl.__db_cache_size=142606336 orcl.__java_pool_size=4194304 orcl.__large_pool_size=4194304 orcl.__oracle_base=‘/export/11g‘#ORACLE_BASE set from environment orcl.__pga_aggregate_target=167772160 orcl.__sga_target=251658240 orcl.__shared_io_pool_size=0 orcl.__shared_pool_size=92274688 orcl.__streams_pool_size=0 *.audit_file_dest=‘/export/11g/admin/orcl/adump‘ *.audit_trail=‘db‘ *.compatible=‘11.2.0.0.0‘ *.control_files=‘/export/11g/oradata/orcl/control01.ctl‘,‘/export/11g/flash_recovery_area/orcl/control02.ctl‘ *.db_block_size=8192 *.db_domain=‘‘ *.db_name=‘orcl‘ *.db_recovery_file_dest=‘/export/11g/flash_recovery_area‘ *.db_recovery_file_dest_size=4070572032 *.diagnostic_dest=‘/export/11g‘ *.dispatchers=‘(PROTOCOL=TCP) (SERVICE=orclXDB)‘ *.log_archive_format=‘%t_%s_%r.dbf‘ *.memory_target=417333248 *.open_cursors=300 *.processes=150 *.remote_login_passwordfile=‘EXCLUSIVE‘ *.undo_tablespace=‘UNDOTBS1‘ *.fal_client=‘orcl2‘ *.fal_server=‘orcl1‘ *.log_archive_config=‘DG_CONFIG=(orcl1,orcl2)‘ *.log_archive_dest_1=‘LOCATION=USE_DB_RECOVERY_FILE_DEST valid_for=(all_logfiles,primary_role) db_unique_name=orcl2‘ *.log_archive_dest_2=‘SERVICE=orcl1 lgwr async valid_for=(online_logfile,primary_role) db_unique_name=orcl1‘ *.remote_login_passwordfile=‘EXCLUSIVE‘ *.standby_file_management=‘AUTO‘ *.db_unique_name=‘orcl2‘ |
四、在备库上创建相应的目录
如udump/,oradate/
五、将备库启动到nomount状态,然后连接主库进行duplicate操作
RMAN> duplicate target database for standby from active database; Starting Duplicate Db at 10-NOV-14 …… …… 省略 contents of Memory Script: sql statement: alter database mount standby database |