Oracle 10g使用RMAN创建physical standby(一)

日期: 2008-11-03 作者:Anna 来源:TechTarget中国 英文

1.试验环境

SQL> select * from v$version;


BANNER

—————————————————————-

Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – Prod

PL/SQL Release 10.2.0.1.0 – Production

CORE 10.2.0.1.0 Production

TNS for Linux: Version 10.2.0.1.0 – Production

NLSRTL Version 10.2.0.1.0 – Production

2.确认主库处于归档模式

SQL> archive log list;

Database log mode Archive Mode

Automatic archival Enabled

Archive destination /u02/arch

Oldest online log sequence 154

Next log sequence to archive 156

Current log sequence 156

3.创建备库instance

windows平台利用oradim工具创建一个新的instance,

unix/linux平台设置新的ORACLE_SID即可


  4.准备好主备库的参数文件

主库:

orcl.__db_cache_size=184549376

orcl.__java_pool_size=4194304

orcl.__large_pool_size=4194304

orcl.__shared_pool_size=88080384

orcl.__streams_pool_size=0

*.audit_file_dest=’/u01/oracle/admin/orcl/adump’

*.background_dump_dest=’/u01/oracle/admin/orcl/bdump’

*.compatible=’10.2.0.1.0′

*.control_files=’/u01/oracle/oradata/orcl/control01.ctl’,’

/u01/oracle/oradata/orcl/control02.ctl’,’

/u01/oracle/oradata/orcl/control03.ctl’

*.core_dump_dest=’/u01/oracle/admin/orcl/cdump’

*.db_block_size=8192

*.db_domain=”

*.db_file_multiblock_read_count=16

*.db_name=’orcl’

*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)’

*.job_queue_processes=10

*.log_archive_dest_1=’LOCATION=/u02/arch’

*.log_archive_format=’%t_%s_%r.dbf’

*.nls_language=’SIMPLIFIED CHINESE’

*.nls_territory=’CHINA’

*.open_cursors=300

*.pga_aggregate_target=94371840

*.processes=150

*.remote_login_passwordfile=’EXCLUSIVE’

*.sga_target=285212672

*.undo_management=’AUTO’

*.undo_tablespace=’UNDOTBS1′

*.user_dump_dest=’/u01/oracle/admin/orcl/udump’

#################################

db_unique_name=node1

service_names=orcl

log_archive_config=’dg_config=(node1,node2)’

log_archive_dest_2=’service=dbstandby

valid_for=(online_logfiles,primary_role) db_unique_name=node2′

log_archive_dest_state_1=enable

log_archive_dest_state_2=enable

fal_server=dbstandby

standby_file_management=AUTO

备库:

orcl.__db_cache_size=184549376

orcl.__java_pool_size=4194304

orcl.__large_pool_size=4194304

orcl.__shared_pool_size=88080384

orcl.__streams_pool_size=0

*.audit_file_dest=’/u01/oracle/admin/orcl/adump’

*.background_dump_dest=’/u01/oracle/admin/orcl/bdump’

*.compatible=’10.2.0.1.0′

*.control_files=’/u01/oracle/oradata/orcl/control01.ctl’,’

/u01/oracle/oradata/orcl/control02.ctl’,’

/u01/oracle/oradata/orcl/control03.ctl’

*.core_dump_dest=’/u01/oracle/admin/orcl/cdump’

*.db_block_size=8192

*.db_domain=”

*.db_file_multiblock_read_count=16

*.db_name=’orcl’

*.dispatchers='(PROTOCOL=TCP) (SERVICE=orclXDB)’

*.job_queue_processes=10

*.log_archive_dest_1=’LOCATION=/u02/arch’

*.log_archive_format=’%t_%s_%r.dbf’

*.nls_language=’SIMPLIFIED CHINESE’

*.nls_territory=’CHINA’

*.open_cursors=300

*.pga_aggregate_target=94371840

*.processes=150

*.remote_login_passwordfile=’EXCLUSIVE’

*.sga_target=285212672

*.undo_management=’AUTO’

*.undo_tablespace=’UNDOTBS1′

*.user_dump_dest=’/u01/oracle/admin/orcl/udump’

#################################

db_unique_name=node2

service_names=orcl

log_archive_config=’dg_config=(node1,node2)’

log_archive_dest_2=’service=dbprimary

valid_for=(online_logfiles,primary_role) db_unique_name=node1′

log_archive_dest_state_1=enable

log_archive_dest_state_2=enable

fal_server=dbprimary

fal_client=dbstandby

standby_file_management=AUTO

5.生成password file

c:/>orapwd file=d:/oracle/ora92/DATABASE/PWDtest.ORA password=pass

或者直接将主库上的密码文件copy一份到备库上

6.配置网络

配置主备库的listener.ora,tnsnames.ora。修改完listener.ora后需要重启监听器。

我们一直都在努力坚持原创.......请不要一声不吭,就悄悄拿走。

我原创,你原创,我们的内容世界才会更加精彩!

【所有原创内容版权均属TechTarget,欢迎大家转发分享。但未经授权,严禁任何媒体(平面媒体、网络媒体、自媒体等)以及微信公众号复制、转载、摘编或以其他方式进行使用。】

微信公众号

TechTarget微信公众号二维码

TechTarget

官方微博

TechTarget中国官方微博二维码

TechTarget中国

电子邮件地址不会被公开。 必填项已用*标注

敬请读者发表评论,本站保留删除与本文无关和不雅评论的权力。

相关推荐