利用ORACLE 11g 新特性创建物理备库

准备工作:

  1. 主库启用归档

  2. 在所有系统上安装oralce 11g软件

  3. 备库创建必要的目录

  4. 创建监听,配置tnsname文件


第一步:

将主库的密码文件cp一份到备库中


第二步:

主备库的参数文件修改:

主库参数文件如:

matrix.__db_cache_size=83886080

matrix.__java_pool_size=4194304

matrix.__large_pool_size=4194304

matrix.__oracle_base='/u2/oracle'#ORACLE_BASE set from environment

matrix.__pga_aggregate_target=176160768

matrix.__sga_target=243269632

matrix.__shared_io_pool_size=0

matrix.__shared_pool_size=138412032

matrix.__streams_pool_size=0

*.audit_file_dest='/u2/oracle/admin/matrix/adump'

*.audit_trail='db'

*.compatible='11.2.0.0.0'

*.control_files='/oradata/matrix/control01.ctl','/u2/oracle/fast_recovery_area/matrix/control02.ctl'

*.db_block_size=8192

*.db_domain=''

*.db_name='matrix'

*.db_recovery_file_dest='/u2/oracle/fast_recovery_area'

*.db_recovery_file_dest_size=4322230272

*.diagnostic_dest='/u2/oracle'

*.dispatchers='(PROTOCOL=TCP) (SERVICE=matrixXDB)'

*.memory_target=419430400

*.open_cursors=300

*.processes=150

*.remote_login_passwordfile='EXCLUSIVE'

*.undo_tablespace='UNDOTBS1'

*.db_unique_name='matrix'

*.log_archive_config='dg_config=(matrix,matrixdg)'

*.log_archive_dest_1='location=/oradata/arch/matrix'

*.log_archive_dest_2='service=matrixdg lgwr async valid_for=(online_logfiles,primary_role) db_unique_name=matrixdg'

*.log_archive_dest_state_1=enable

*.log_archive_dest_state_2=enable

*.standby_file_management='auto'

*.fal_server='matrixdg'

*.fal_client='matrix'

*.db_file_name_convert='/oradata/matrixdg','/oradata/matrix'

*.log_file_name_convert='/oradata/arch/matrixdg','/oradata/matrix'

~

备库参数文件如:

*.audit_file_dest='/u2/oracle/admin/matrixdg/adump'

*.audit_trail='db'

*.compatible='11.2.0.0.0'

*.control_files='/oradata/matrixdg/control01.ctl','/u2/oracle/fast_recovery_area/matrixdg/control02.ctl'

*.db_block_size=8192

*.db_domain=''

*.db_name='matrix'

*.db_recovery_file_dest='/u2/oracle/fast_recovery_area'

*.db_recovery_file_dest_size=4322230272

*.diagnostic_dest='/u2/oracle'

*.dispatchers='(PROTOCOL=TCP) (SERVICE=matrixXDB)'

*.memory_target=419430400

*.open_cursors=300

*.processes=150

*.remote_login_passwordfile='EXCLUSIVE'

*.undo_tablespace='UNDOTBS1'

*.db_unique_name='matrixdg'

*.log_archive_config='dg_config=(matrix,matrixdg)'

*.log_archive_dest_1='location=/oradata/arch/matrixdg'

*.log_archive_dest_2='service=matrix lgwr async valid_for=(online_logfiles,primary_role) db_unique_name=matrix'

*.log_archive_dest_state_1=enable

*.log_archive_dest_state_2=enable

*.standby_file_management='manual'

*.fal_server='matrix'

*.fal_client='matrixdg'

*.db_file_name_convert='/oradata/matrix','/oradata/matrixdg'

*.log_file_name_convert='/oradata/arch/matrix','/oradata/arch/atrixdg'


第四步:

将备库启动到nomount状态

SQL> startup nomount


第五步:

RMAN>connect target sys/oracle@matrix;

RMAN>connect target sys/oracle@matrixdg;

RMAN>duplicate target database for standby from active database;


第六步:

备为中创建standby redo logfile

SQL>alter database add standby logfile '<PATH>' size 50M;


第七步:

备为中启动日志应用

SQL>alter database recover managed standby database using current logfile disconnect;

你可能感兴趣的:(Active,ORACLE11G使用from)