我的最佳实践
① 手动创建好初始化参数文件:
*.audit_file_dest='E:APPXJXUADMINORASTANDADUMP'
*.control_files='E:APPXJXUORADATAORASTANDCONTROL01.CTL','E:APPXJXUFLASH_RECOVERY_AREAORASTANDCONTROL02.CTL'
*.core_dump_dest='e:appxjxudiag
dbmsorastandorastandcdump'
*.db_block_size=8192
*.db_domain=''
*.LOG_ARCHICE_CONFIG='DG_CONFIG=(ORA11G,ORASTAND)'
*.db_file_name_convert='E:appxjxuoradataORA11G','E:appxjxuoradataORASTAND'
*.db_name='ORA11G'
*.db_recovery_file_dest='E:appxjxuflash_recovery_area'
*.db_recovery_file_dest_size=3912M
*.db_unique_name='ORASTAND'
*.diagnostic_dest='E:APPXJXU'
*.FAL_SERVER=ORA11G
*.FAL_CLIENT=ORASTAND
*.log_archive_dest_1='location=E:appxjxuoradataORASTANDarch valid_for=(ALL_LOGFILES,ALL_ROLES) db_unique_name=ORASTAND'
*.log_archive_dest_2='service=ORA11G lgwr valid_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) db_unique_name=ORA11G'
*.log_file_name_convert='E:appxjxuoradataORA11G','E:appxjxuoradataORASTAND','E:appxjxuoradataORA11Garch','E:appxjxuoradataORASTANDarch','E:appxjxuoradataORA11Gstandby','E:appxjxuoradataORASTANDstandby'
*.memory_target=800M
*.nls_language='SIMPLIFIED CHINESE'
*.nls_territory='CHINA'
*.open_cursors=300
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'
上面黑粗体表明的,最好先设置好,省得在DUPLICATE命令时也一堆,烦。 当然如果目录结构一直的话,就不用烦了。
② RMAN
CONNECT TARGET sys/oracle@ORA11G #连接到主库,必须用TNSname方式连接
CONNECT AUXILIARY sys/oracle@ORASTAND #连接到备库
DUPLICATE TARGET DATABASE FOR STANDBY FROM ACTIVE DATABASE dorecover
③ 执行完RMAN ,检查一下备库数据文件及日志文件的路径
V$DATAFILE,V$LOGFILE;
如有不符合要求的,ALTER DATABASE RENAME FILE ****** TO ********;