配置pfile启动到nomount
*.audit_trail='db'
*.cluster_database=true
*.compatible='11.2.0.4.0'
*.control_files='/oradata/current.ctl'
*.db_block_size=8192
*.db_name='feichedb'
*.diagnostic_dest='/u01/app/oracle'
*.log_archive_dest_1='location=/orarchive'
*.open_cursors=1000
*.pga_aggregate_target=5G
*.processes=2800
*.sessions=3085
*.sga_target=10g
*.DB_FILE_NAME_CONVERT='+DATA/feichedb/datafile','/oradata','+DATA/feichedb/tempfile','/zmsft'
*.LOG_FILE_NAME_CONVERT='+DATA/feichedb/onlinelog','/oradata'
*.standby_file_management=auto
*.db_unique_name=feichedbdg
备数据库配置静态监听
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.4.1.32)(PORT = 1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME =feichedbdg)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME = feichedbdg)
)
)
克隆数据库
rman target sys/oracle@feichedb auxiliary sys/oracle@feichedbdg
duplicate target database for standby from active database;
启动日志传输
alter system set log_archive_config='dg_config=(feichedb,feichedbdg)';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=feichedbdg VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=feichedbdg';
ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE;
开启日志应用
alter system set log_archive_config='dg_config=(feichedb,feichedbdg)';
alter database recover managed standby database cancel;
alter database recover managed standby database disconnect from session;