码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2015-10-13 13:58:13      阅读:346      评论:0      收藏:0      [点我收藏+]

标签:oracle11g使用from active database新特性创建物理备库

准备工作:

  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;

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

标签:oracle11g使用from active database新特性创建物理备库

原文地址:http://4538453.blog.51cto.com/4528453/1702459

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!