大橙子网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

OracleDG之--构建PhysicalStandby(一主库对应多备库)

Oracle DG之--构建Physical Standby(一主库对应多备库)

10余年的兴平网站建设经验,针对设计、前端、开发、售后、文案、推广等六对一服务,响应快,48小时及时工作处理。网络营销推广的优势是能够根据用户设备显示端的尺寸不同,自动调整兴平建站的显示方式,使网站能够适用不同显示终端,在浏览器中调整网站的宽度,无论在任何一种浏览器上浏览网站,都能展现优雅布局与设计,从而大程度地提升浏览体验。成都创新互联公司从事“兴平网站设计”,“兴平网站推广”以来,每个客户项目都认真落实执行。

系统环境:

操作系统: RedHat EL6

Oracle:    Oracle 10.2.0.1.0

Oracle DG之--构建Physical Standby(一主库对应多备库)

      如图所示,主库为bjdb(db_unique_name),备库为shdb和gzdb。

案例分析: 

一个主库,两个备库

主库初始化参数(pfile):

[oracle@bjsrv dbs]$ cat initbj.ora 

*.audit_file_dest='/u01/app/oracle/admin/prod/adump'
*.background_dump_dest='/u01/app/oracle/admin/prod/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/u01/app/oracle/oradata/prod/control01.ctl','/disk1/oradata/bj/control02.ctl','/disk2/oradata/bj/control03.ctl'
*.core_dump_dest='/u01/app/oracle/admin/prod/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.DB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/sh','/u01/app/oracle/oradata/prod','/u01/app/oracle/oradata/gz','/u01/app/oracle/oradata/prod'
*.db_recovery_file_dest='/u01/app/oracle/flash_recovery_area'
*.db_recovery_file_dest_size=2147483648
*.instance_name='bj'
*.job_queue_processes=10
*.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/app/oracle/admin/prod/udump'

以下参数用于DG配置:

*.db_name='prod'
*.DB_UNIQUE_NAME='bjdb'
*.FAL_CLIENT='bjdb'
*.FAL_SERVER='shdb','gzdb'

*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(bjdb,shdb,gzdb)'

*.LOG_ARCHIVE_DEST_1='LOCATION=/disk3/arch_bj
  VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
  DB_UNIQUE_NAME=bjdb'
  
*.LOG_ARCHIVE_DEST_2='SERVICE=shdb LGWR ASYNC
  VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) 
  DB_UNIQUE_NAME=shdb'
  
*.LOG_ARCHIVE_DEST_3='SERVICE=gzdb LGWR ASYNC
  VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
  DB_UNIQUE_NAME=gzdb'
  
*.LOG_ARCHIVE_DEST_STATE_1='ENABLE'
*.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
*.LOG_ARCHIVE_DEST_STATE_3='ENABLE'
*.log_archive_format='arch_%t_%s_%r.log'
*.LOG_ARCHIVE_MAX_PROCESSES=3

*.LOG_FILE_NAME_CONVERT='/disk1/oradata/sh','/disk1/oradata/bj','/disk2/oradata/sh','/disk2/oradata/bj','/disk1/oradata/gz','/disk1/oradata/bj','/disk2/oradata/gz','/disk2/oradata/bj'
*.STANDBY_FILE_MANAGEMENT='AUTO'

备库初始化参数pfile(shdb):

[oracle@shsrv dbs]$ cat initsh.ora 
*.audit_file_dest='/u01/app/oracle/admin/sh/adump'
*.background_dump_dest='/u01/app/oracle/admin/sh/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/u01/app/oracle/oradata/sh/std_control.ctl'
*.core_dump_dest='/u01/app/oracle/admin/sh/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.DB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/prod','/u01/app/oracle/oradata/sh','/u01/app/oracle/gz','/u01/app/oracle/oradata/sh'
*.instance_name='sh'
*.job_queue_processes=10
*.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/app/oracle/admin/sh/udump'

以下参数用于DG配置:

*.db_name='prod'
*.DB_UNIQUE_NAME='shdb'
*.FAL_CLIENT='shdb'
*.FAL_SERVER='bjdb','gzdb'

*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(bjdb,shdb,gzdb)'

*.LOG_ARCHIVE_DEST_1='LOCATION=/disk3/arch_sh
  VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
  DB_UNIQUE_NAME=shdb'
  
*.LOG_ARCHIVE_DEST_2='SERVICE=bjdb LGWR ASYNC
  VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) 
  DB_UNIQUE_NAME=bjdb'
  
*.LOG_ARCHIVE_DEST_3='SERVICE=gzdb LGWR ASYNC
  VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
  DB_UNIQUE_NAME=gzdb'
  
*.LOG_ARCHIVE_DEST_STATE_1='ENABLE'
*.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
*.LOG_ARCHIVE_DEST_STATE_3='ENABLE'
*.log_archive_format='arch_%t_%s_%r.log'
*.LOG_ARCHIVE_MAX_PROCESSES=3

*.LOG_FILE_NAME_CONVERT='/disk1/oradata/bj','/disk1/oradata/sh','/disk2/oradata/bj','/disk2/oradata/sh','/disk1/oradata/gz','/disk1/oradata/sh','/disk2/oradata/gz','/disk2/oradata/sh'
*.STANDBY_FILE_MANAGEMENT='AUTO'

备库初始化参数pfile(gzdb):

[oracle@gzsrv dbs]$ cat initgz.ora 

*.audit_file_dest='/u01/app/oracle/admin/gz/adump'
*.background_dump_dest='/u01/app/oracle/admin/gz/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/u01/app/oracle/oradata/gz/gzstd_control.ctl'
*.core_dump_dest='/u01/app/oracle/admin/gz/cdump'
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=16
*.DB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/prod','/u01/app/oracle/oradata/gz','/u01/app/oracle/oradata/sh','/u01/app/oracle/oradata/gz'
*.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/app/oracle/admin/gz/udump'
*.job_queue_processes=10

以下参数用于DG配置:

*.db_name='prod'
*.DB_UNIQUE_NAME='gzdb'
*.FAL_CLIENT='gzdb'
*.FAL_SERVER='bjdb','shdb'
*.instance_name='gz'

*.LOG_ARCHIVE_CONFIG='DG_CONFIG=(bjdb,shdb,gzdb)'

*.LOG_ARCHIVE_DEST_1='LOCATION=/disk3/arch_gz
  VALID_FOR=(ALL_LOGFILES,ALL_ROLES)
  DB_UNIQUE_NAME=gzdb'
  
*.LOG_ARCHIVE_DEST_2='SERVICE=bjdb LGWR ASYNC
  VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) 
  DB_UNIQUE_NAME=bjdb'
  
*.LOG_ARCHIVE_DEST_3='SERVICE=shdb LGWR ASYNC
  VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)
  DB_UNIQUE_NAME=shdb'
  
*.LOG_ARCHIVE_DEST_STATE_1='ENABLE'
*.LOG_ARCHIVE_DEST_STATE_2='ENABLE'
*.LOG_ARCHIVE_DEST_STATE_3='ENABLE'
*.log_archive_format='arch_%t_%s_%r.log'
*.LOG_ARCHIVE_MAX_PROCESSES=3

*.LOG_FILE_NAME_CONVERT='/disk1/oradata/bj','/disk1/oradata/gz','/disk2/oradata/bj','/disk2/oradata/gz','/disk1/oradata/sh','/disk1/oradata/gz','/disk2/oradata/sh','/disk2/oradata/gz'
*.STANDBY_FILE_MANAGEMENT='AUTO'

---以上为构建一个主库2个Physical Standby的初始化参数,创建过程省略,可以参考:http://tiany.blog.51cto.com/513694/1583444《 Oracle DG之--构建Physical Standby》


当前名称:OracleDG之--构建PhysicalStandby(一主库对应多备库)
标题网址:http://dzwzjz.com/article/pjodsp.html
在线咨询
服务热线
服务热线:028-86922220
TOP