一、RAC One Node介紹
1、rac one node數據庫可以轉換成RAC數據庫,轉換過程可以在線,無需停止RAC one node數據庫;
2、rac one node可以創建多個rac onde node數據庫運行在不同的節點上;
3、當運行節點需要維護,如打patch,可以手動切換(relocate)使用online database relocate,減少業務中斷時間;
4、rac one node比RAC數據庫減少了節點間數據傳輸時間以及GC類的等待事件;
5、從11.2.0.1開始就有了rac one node特性,但僅僅支持linux平臺,在11.2.0.2以后支持所有平臺;
參考文檔:Oracle RACOne Node -- Changes in 11.2.0.2 (文檔 ID 1232802.1)?
二、使用DBCA創建RAC One Node
[oracle@jzh2 ~]$ dbca
2.1 選擇"Oracle RAC One Node database"
后面創建數據庫與創建RAC數據庫基本一致,過程省略。。。。。
2.2、RAC one數據庫基本信息
$ srvctl config database -d jzh
Database unique name: jzh
Database name: jzh
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +DATA/jzh/spfilejzh.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: jzh
Database instances:
Disk Groups: DATA,ARCH
Mount point paths:
Services: jzhdb==============》新建的Service
Type: RACOneNode===========》數據庫類型是 one node
Online relocation timeout: 30
Instance name prefix: jzh
Candidate servers: jzh2,jzh3
Database is administrator managed
2.3、數據庫配置信息
SQL> show parameter name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert string
db_name string jzh
db_unique_name string jzh
global_names boolean FALSE
instance_name string jzh_1==========》實例名,在RAC數據庫中實例一般為jzh2,而在RAC One Node中多了"_"。
lock_name_space string
log_file_name_convert string
processor_group_name string
service_names string jzhdb
2.4、集群信息
SQL> show parameter cluster_database
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
cluster_database boolean TRUE
cluster_database_instances integer 2
2.5、RAC One Node切換(relocate)
查詢當前實例運行情況:
$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
ora.DATA.dg
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
ora.LISTENER.lsnr
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
ora.VOTE.dg
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
ora.asm
ONLINE ONLINE jzh2 Started
ONLINE ONLINE jzh3 Started
ora.gsd
OFFLINE OFFLINE jzh2
OFFLINE OFFLINE jzh3
ora.net1.network
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
ora.ons
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jzh3
ora.cvu
1 OFFLINE OFFLINE
ora.jzh.db
1 ONLINE ONLINE jzh2 Open
ora.jzh.jzhdb.svc
1 ONLINE ONLINE jzh2
ora.jzh2.vip
1 ONLINE ONLINE jzh2
ora.jzh3.vip
1 ONLINE ONLINE jzh3
ora.oc4j
1 ONLINE ONLINE jzh3
ora.scan1.vip
1 ONLINE ONLINE jzh3
數據庫與service均運行在節點1上(jzh2)
2.6、使用relocate將RAC One Node數據庫切到節點2上(jzh3)
$ srvctl relocate database -d jzh -n jzh3
relocate之后,再次查詢RAC One Node運行情況:
$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
ora.DATA.dg
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
ora.LISTENER.lsnr
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
ora.VOTE.dg
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
ora.asm
ONLINE ONLINE jzh2 Started
ONLINE ONLINE jzh3 Started
ora.gsd
OFFLINE OFFLINE jzh2
OFFLINE OFFLINE jzh3
ora.net1.network
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
ora.ons
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jzh3
ora.cvu
1 OFFLINE OFFLINE
ora.jzh.db
2 ONLINE ONLINE jzh3 Open
ora.jzh.jzhdb.svc
1 ONLINE ONLINE jzh3
ora.jzh2.vip
1 ONLINE ONLINE jzh2
ora.jzh3.vip
1 ONLINE ONLINE jzh3
ora.oc4j
1 ONLINE ONLINE jzh3
ora.scan1.vip
1 ONLINE ONLINE jzh3
此時,數據庫與service切換至節點2上(jzh3)。
2.7、查看數據庫配置信息
[grid@jzh2 ~]$ srvctl config service -d jzh
Service name: jzhdb
Service is enabled
Server pool: jzh
Cardinality: 1
Disconnect: false
Service role: PRIMARY
Management policy: AUTOMATIC
DTP transaction: false
AQ HA notifications: false
Failover type: NONE
Failover method: NONE
TAF failover retries: 0
TAF failover delay: 0
Connection Load Balancing Goal: LONG
Runtime Load Balancing Goal: NONE
TAF policy specification: BASIC
Edition:
Preferred instances: jzh_2
Available instances:
2.8 轉換RAC One Node至RAC
注:以RAC One Node database擁有者執行以下命令:
$ su - oracle
$ srvctl convert database -d jzh -c RAC -n jzh2
$ srvctl config database -d jzh
Database unique name: jzh
Database name: jzh
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +DATA/jzh/spfilejzh.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: jzh
Database instances: jzh_1
Disk Groups: DATA,ARCH
Mount point paths:
Services: jzhdb
Type: RAC
Database is administrator managed
我們可以看到Type類型變成RAC了。
2.9、添加節點2(jzh3)實例
$ srvctl add instance -d jzh -i jzh_2 -n jzh3
$ srvctl config database -d jzh
Database unique name: jzh
Database name: jzh
Oracle home: /u01/app/oracle/product/11.2.0/db_1
Oracle user: oracle
Spfile: +DATA/jzh/spfilejzh.ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: jzh
Database instances: jzh_1,jzh_2
Disk Groups: DATA,ARCH
Mount point paths:
Services: jzhdb
Type: RAC
Database is administrator managed
這里我們看到jzh_2添加進來了。
$ srvctl start database -d jzh
$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
ora.DATA.dg
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
ora.LISTENER.lsnr
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
ora.VOTE.dg
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
ora.asm
ONLINE ONLINE jzh2 Started
ONLINE ONLINE jzh3 Started
ora.gsd
OFFLINE OFFLINE jzh2
OFFLINE OFFLINE jzh3
ora.net1.network
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
ora.ons
ONLINE ONLINE jzh2
ONLINE ONLINE jzh3
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jzh3
ora.cvu
1 OFFLINE OFFLINE
ora.jzh.db
1 ONLINE ONLINE jzh2 Open
2 ONLINE ONLINE jzh3 Open
ora.jzh.jzhdb.svc
1 ONLINE ONLINE jzh2
ora.jzh2.vip
1 ONLINE ONLINE jzh2
ora.jzh3.vip
1 ONLINE ONLINE jzh3
ora.oc4j
1 ONLINE ONLINE jzh3
ora.scan1.vip
1 ONLINE ONLINE jzh3
這里可以看到DB運行在jzh2,jzh3上。
2.10、重新配置服務
$ srvctl stop service -d jzh -s jzhdb
$ srvctl remove service -d jzh -s jzhdb
$ srvctl add service -d jzh -s jzhdb -r jzh_1,jzh_2 -P BASIC
$ srvctl start service -d jzh -s jzhdb
至此,RAC One Node配置完成!
當前題目:Oracle11gRACOnenode安裝與配置-創新互聯
本文地址:http://m.newbst.com/article10/dgipdo.html
成都網站建設公司_創新互聯,為您提供品牌網站建設、響應式網站、網站內鏈、搜索引擎優化、用戶體驗、電子商務
廣告
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源:
創新互聯