Oracle 2套rac集群指向單機多例子的復制搭建

電腦雜談  發布時間:2019-11-07 22:03:20  來源:網絡整理

rac集群搭建_oracle rac搭建_oracle rac集群搭建

由于環境限制oracle rac集群搭建,現在應該把2套rac集群通過dg復制指向遠端的單機多例子里面。

rac指向第一個實例的后面將要有文檔

這里直接添加第二個實例的復制搭建,主要標出不同地方

單實例環境--standby

CentOS release 6.10 (Final)

hostname dg1

ip 10.*.30

Instance_name cad

DB_NAME bol --此次2個一樣

db_unique_name cad

SQL*Plus: Release 11.2.0.4.0 Production

文件系統規劃

Primary Standby

+DATA/bol/datafile/test01.dbf /u01/app/Oracle/oradata/cad/data tempfile

+data/bol/tempfile /u01/app/oracle/oradata/cad/control01.ctl

+fra/bol/archivelog /u01/app/oracle/fast_recovery_area/cad

+fra/bol/onlinelog /u01/app/oracle/oradata/orcl/cad

基本方法與前面相同oracle rac集群搭建,只是示例名有不同之處

1 主庫rac集群,設置為歸檔,和force logging模式

2 主庫添加 standby Redo log 文件

3 主備庫設置listener.ora 和tnsnames.ora 文件

主庫與之前基本同樣

備庫

[[email protected] admin]$ cat listener.ora

# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora

# Generated by Oracle configuration tools.

oracle rac集群搭建_rac集群搭建_oracle rac搭建

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(GLOBAL_DBNAME = orcl)

(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)

(SID_NAME = orcl)

)

(SID_DESC =

(GLOBAL_DBNAME = cad)

(ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_1)

(SID_NAME = cad) ---在主機dg1上 ,添加2個實例

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = dg1)(PORT = 1521))

)

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))

)

)

ADR_BASE_LISTENER = /u01/app/oracle

[[email protected] admin]$ cat tnsnames.ora

bol=

(DESCRIPTION =

rac集群搭建_oracle rac集群搭建_oracle rac搭建

(ADDRESS = (PROTOCOL = TCP)(HOST = 10.*.15)(PORT = 1521))

(ADDRESS = (PROTOCOL = TCP)(HOST = 10.*.16)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME =bol)

)

)

orcl=

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = 10.*.30)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME =orcl)

)

)

cad=

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = 10.*.30)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME =cad)

)

)

[[email protected] ~]$ tnsping cad

4 在備庫構建相應的目錄

mkdir -p /u01/app/oracle/fast_recovery_area/cad

rac集群搭建_oracle rac集群搭建_oracle rac搭建

mkdir -p /u01/app/oracle/oradata/cad/data

mkdir -p /u01/app/oracle/oradata/cad/tempfile

mkdir -p /u01/app/oracle/admin/cad/adump

mkdir -p /u01/app/oracle/admin/cad/data

mkdir -p /u01/app/oracle/admin/cad/redo

mkdir -p /u01/app/oracle/admin/cad/tempfile

mkdir -p /u01/app/oracle/archive/cad

5 修改主備庫參數和把主庫密碼文件cp到備庫

--備庫參數文件

cad.__db_cache_size=469762048

cad.__java_pool_size=16777216

cad.__large_pool_size=33554432

cad.__pga_aggregate_target=654311424

cad.__sga_target=956301312

cad.__shared_io_pool_size=0

cad.__shared_pool_size=385875968

cad.__streams_pool_size=33554432

*.audit_file_dest='/u01/app/oracle/admin/cad/adump'

*.audit_trail='db'

*.compatible='11.2.0.4.0'

*.control_files='/u01/app/oracle/oradata/cad/control01.ctl','/u01/app/oracle/fast_recovery_area/cad/control02.ctl'

*.db_block_size=8192

*.db_domain=''

*.db_file_name_convert='+DATA/bol/datafile','/u01/app/oracle/oradata/cad/data','+DATA/bol/tempfile','/u01/app/oracle/oradata/cad/tempfile'

*.db_name='bol'

*.service_names='cad'

oracle rac集群搭建_rac集群搭建_oracle rac搭建

*.db_unique_name='cad'

*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area/cad'

*.db_recovery_file_dest_size=6005194752

*.diagnostic_dest='/u01/app/oracle'

*.dispatchers='(PROTOCOL=TCP) (SERVICE=bolXDB)'

*.fal_server='cad'

*.log_archive_config='dg_config=(bol,cad)'

*.log_archive_dest_1='location=/u01/app/oracle/archive/cad valid_for=(all_logfiles,all_roles) db_unique_name=cad'

*.log_archive_dest_2='service=bol valid_for=(online_logfiles,primary_role) db_unique_name=bol'

*.log_archive_dest_state_1='ENABLE'

*.log_archive_dest_state_2='ENABLE'

*.log_archive_format='%t_%s_%r.arch'

*.log_file_name_convert='+FRA/bol/onlinelog','/u01/app/oracle/admin/cad/redo'

*.memory_target=1606418432

*.open_cursors=300

*.processes=500

*.remote_login_passwordfile='exclusive'

*.standby_file_management='auto'

*.undo_tablespace='UNDOTBS1'

6 使用 spfile 將備庫啟動 nomount 狀態并開啟

7 備庫進行duplicate

export ORACLE_SID=cad

rman target sys/****@10.*.29/bol auxiliary sys/****@cad nocatalog

8 開啟dg復制

Linux公社的RSS地址:

本文永久更新鏈接地址:


本文來自電腦雜談,轉載請注明本文網址:
http://www.rtcsln.tw/a/ruanjian/article-129207-1.html

    相關閱讀
    發表評論  請自覺遵守互聯網相關的政策法規,嚴禁發布、暴力、反動的言論

    熱點圖片
    拼命載入中...
    黑龙江快乐十分开奖直播