您好,登录后才能下订单哦!
这篇文章主要介绍“如何利用ORACLE创建物理备库”,在日常操作中,相信很多人在如何利用ORACLE创建物理备库问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”如何利用ORACLE创建物理备库”的疑惑有所帮助!接下来,请跟着小编一起来学习吧!
准备工作:
主库启用归档
在所有系统上安装oralce 11g软件
备库创建必要的目录
创建监听,配置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创建物理备库”的学习就结束了,希望能够解决大家的疑惑。理论与实践的搭配能更好的帮助大家学习,快去试试吧!若想继续学习更多相关知识,请继续关注亿速云网站,小编会继续努力为大家带来更多实用的文章!
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。