Oracle DG之--構(gòu)建Physical Standby(一主庫(kù)對(duì)應(yīng)多備庫(kù))
10余年的興平網(wǎng)站建設(shè)經(jīng)驗(yàn),針對(duì)設(shè)計(jì)、前端、開(kāi)發(fā)、售后、文案、推廣等六對(duì)一服務(wù),響應(yīng)快,48小時(shí)及時(shí)工作處理。網(wǎng)絡(luò)營(yíng)銷(xiāo)推廣的優(yōu)勢(shì)是能夠根據(jù)用戶(hù)設(shè)備顯示端的尺寸不同,自動(dòng)調(diào)整興平建站的顯示方式,使網(wǎng)站能夠適用不同顯示終端,在瀏覽器中調(diào)整網(wǎng)站的寬度,無(wú)論在任何一種瀏覽器上瀏覽網(wǎng)站,都能展現(xiàn)優(yōu)雅布局與設(shè)計(jì),從而大程度地提升瀏覽體驗(yàn)。成都創(chuàng)新互聯(lián)公司從事“興平網(wǎng)站設(shè)計(jì)”,“興平網(wǎng)站推廣”以來(lái),每個(gè)客戶(hù)項(xiàng)目都認(rèn)真落實(shí)執(zhí)行。
系統(tǒng)環(huán)境:
操作系統(tǒng): RedHat EL6
Oracle: Oracle 10.2.0.1.0
如圖所示,主庫(kù)為bjdb(db_unique_name),備庫(kù)為shdb和gzdb。
案例分析:
一個(gè)主庫(kù),兩個(gè)備庫(kù)
主庫(kù)初始化參數(shù)(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'
以下參數(shù)用于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'
備庫(kù)初始化參數(shù)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'
以下參數(shù)用于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'
備庫(kù)初始化參數(shù)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
以下參數(shù)用于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'
---以上為構(gòu)建一個(gè)主庫(kù)2個(gè)Physical Standby的初始化參數(shù),創(chuàng)建過(guò)程省略,可以參考:http://tiany.blog.51cto.com/513694/1583444《 Oracle DG之--構(gòu)建Physical Standby》