Oracle 11g RAC One node 安裝與配置
一、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@jzh1 ~]$ 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: jzh1,jzh2
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資料庫中例項一般為jzh1,而在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 jzh1
ONLINE ONLINE jzh2
ora.DATA.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.LISTENER.lsnr
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.VOTE.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.asm
ONLINE ONLINE jzh1 Started
ONLINE ONLINE jzh2 Started
ora.gsd
OFFLINE OFFLINE jzh1
OFFLINE OFFLINE jzh2
ora.net1.network
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.ons
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jzh2
ora.cvu
1 OFFLINE OFFLINE
ora.jzh.db
1 ONLINE ONLINE jzh1 Open
ora.jzh.jzhdb.svc
1 ONLINE ONLINE jzh1
ora.jzh1.vip
1 ONLINE ONLINE jzh1
ora.jzh2.vip
1 ONLINE ONLINE jzh2
ora.oc4j
1 ONLINE ONLINE jzh2
ora.scan1.vip
1 ONLINE ONLINE jzh2
資料庫與service均執行在節點1上(jzh1)
2.6、使用relocate將RAC One Node資料庫切到節點2上(jzh2)
$ srvctl relocate database -d jzh -n jzh2
relocate之後,再次查詢RAC One Node執行情況:
$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.DATA.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.LISTENER.lsnr
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.VOTE.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.asm
ONLINE ONLINE jzh1 Started
ONLINE ONLINE jzh2 Started
ora.gsd
OFFLINE OFFLINE jzh1
OFFLINE OFFLINE jzh2
ora.net1.network
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.ons
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jzh2
ora.cvu
1 OFFLINE OFFLINE
ora.jzh.db
2 ONLINE ONLINE jzh2 Open
ora.jzh.jzhdb.svc
1 ONLINE ONLINE jzh2
ora.jzh1.vip
1 ONLINE ONLINE jzh1
ora.jzh2.vip
1 ONLINE ONLINE jzh2
ora.oc4j
1 ONLINE ONLINE jzh2
ora.scan1.vip
1 ONLINE ONLINE jzh2
此時,資料庫與service切換至節點2上(jzh2)。
2.7、檢視資料庫配置資訊
[grid@jzh1 ~]$ 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 jzh1
$ 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(jzh2)例項
$ srvctl add instance -d jzh -i jzh_2 -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,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 jzh1
ONLINE ONLINE jzh2
ora.DATA.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.LISTENER.lsnr
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.VOTE.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.asm
ONLINE ONLINE jzh1 Started
ONLINE ONLINE jzh2 Started
ora.gsd
OFFLINE OFFLINE jzh1
OFFLINE OFFLINE jzh2
ora.net1.network
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.ons
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jzh2
ora.cvu
1 OFFLINE OFFLINE
ora.jzh.db
1 ONLINE ONLINE jzh1 Open
2 ONLINE ONLINE jzh2 Open
ora.jzh.jzhdb.svc
1 ONLINE ONLINE jzh1
ora.jzh1.vip
1 ONLINE ONLINE jzh1
ora.jzh2.vip
1 ONLINE ONLINE jzh2
ora.oc4j
1 ONLINE ONLINE jzh2
ora.scan1.vip
1 ONLINE ONLINE jzh2
這裡可以看到DB執行在jzh1,jzh2上。
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配置完成!
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@jzh1 ~]$ 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: jzh1,jzh2
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資料庫中例項一般為jzh1,而在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 jzh1
ONLINE ONLINE jzh2
ora.DATA.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.LISTENER.lsnr
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.VOTE.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.asm
ONLINE ONLINE jzh1 Started
ONLINE ONLINE jzh2 Started
ora.gsd
OFFLINE OFFLINE jzh1
OFFLINE OFFLINE jzh2
ora.net1.network
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.ons
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jzh2
ora.cvu
1 OFFLINE OFFLINE
ora.jzh.db
1 ONLINE ONLINE jzh1 Open
ora.jzh.jzhdb.svc
1 ONLINE ONLINE jzh1
ora.jzh1.vip
1 ONLINE ONLINE jzh1
ora.jzh2.vip
1 ONLINE ONLINE jzh2
ora.oc4j
1 ONLINE ONLINE jzh2
ora.scan1.vip
1 ONLINE ONLINE jzh2
資料庫與service均執行在節點1上(jzh1)
2.6、使用relocate將RAC One Node資料庫切到節點2上(jzh2)
$ srvctl relocate database -d jzh -n jzh2
relocate之後,再次查詢RAC One Node執行情況:
$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.DATA.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.LISTENER.lsnr
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.VOTE.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.asm
ONLINE ONLINE jzh1 Started
ONLINE ONLINE jzh2 Started
ora.gsd
OFFLINE OFFLINE jzh1
OFFLINE OFFLINE jzh2
ora.net1.network
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.ons
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jzh2
ora.cvu
1 OFFLINE OFFLINE
ora.jzh.db
2 ONLINE ONLINE jzh2 Open
ora.jzh.jzhdb.svc
1 ONLINE ONLINE jzh2
ora.jzh1.vip
1 ONLINE ONLINE jzh1
ora.jzh2.vip
1 ONLINE ONLINE jzh2
ora.oc4j
1 ONLINE ONLINE jzh2
ora.scan1.vip
1 ONLINE ONLINE jzh2
此時,資料庫與service切換至節點2上(jzh2)。
2.7、檢視資料庫配置資訊
[grid@jzh1 ~]$ 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 jzh1
$ 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(jzh2)例項
$ srvctl add instance -d jzh -i jzh_2 -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,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 jzh1
ONLINE ONLINE jzh2
ora.DATA.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.LISTENER.lsnr
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.VOTE.dg
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.asm
ONLINE ONLINE jzh1 Started
ONLINE ONLINE jzh2 Started
ora.gsd
OFFLINE OFFLINE jzh1
OFFLINE OFFLINE jzh2
ora.net1.network
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
ora.ons
ONLINE ONLINE jzh1
ONLINE ONLINE jzh2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE jzh2
ora.cvu
1 OFFLINE OFFLINE
ora.jzh.db
1 ONLINE ONLINE jzh1 Open
2 ONLINE ONLINE jzh2 Open
ora.jzh.jzhdb.svc
1 ONLINE ONLINE jzh1
ora.jzh1.vip
1 ONLINE ONLINE jzh1
ora.jzh2.vip
1 ONLINE ONLINE jzh2
ora.oc4j
1 ONLINE ONLINE jzh2
ora.scan1.vip
1 ONLINE ONLINE jzh2
這裡可以看到DB執行在jzh1,jzh2上。
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配置完成!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10271187/viewspace-1463637/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 11G RAC叢集安裝(3)——安裝OracleOracle
- Oracle 11G RAC One Node's Instance Arise ORA-01105 ORA-01606Oracle
- Oracle 11G RAC叢集安裝(2)——安裝gridOracle
- Oracle:Redhat 7 + Oracle RAC 11g 安裝 bug 總結OracleRedhat
- oracle 11g RAC 安裝前準備指令碼Oracle指令碼
- 通過ORACLE VM virtualbox環境安裝oracle 11G RAC(ASM)OracleASM
- Oracle 11G RAC叢集安裝(1)——安裝前的準備Oracle
- Oracle 11g RAC SCAN ip的原理及配置Oracle
- oracle 11g rac配置em dbconsole ORA-12514Oracle
- rhel7 安裝11g rac
- Node.js安裝與配置Node.js
- Oracle 11g RAC安裝--基於openfiler儲存+多路徑+udev方式Oracledev
- Oracle 11G 安裝文件Oracle
- Oracle RAC Cache Fusion 系列十四:Oracle RAC CR Server Part OneOracleServer
- Oracle 11G 安裝 bbed 工具Oracle
- Oracle 11g RAC Silent Install For NFSOracleNFS
- 11g rac監聽配置解析
- oracle rac資料庫的安裝Oracle資料庫
- vgant 安裝oracle資料庫racOracle資料庫
- centos7 安裝ORACLE 11.2.0.4.0 RACCentOSOracle
- Solaris下Oracle RAC 11.2.0.4 安裝方法Oracle
- oracle安裝配置Oracle
- Oracle 11g RAC 監聽日常管理Oracle
- Oracle 11g RAC手動新增serviceOracle
- Oracle Linux 6.7 靜預設安裝Oracle 11gOracleLinux
- Windows 11.2.0.4 RAC安裝配置以及RAC新增節點Windows
- redhat7 搭建oracle 11g RAC 問題與處理RedhatOracle
- CentOS 7.5靜默安裝Oracle 11gCentOSOracle
- Oracle RAC叢集解除安裝步驟Oracle
- Linux下Oracle 11.2.0.1 RAC安裝筆記LinuxOracle筆記
- Oracle 11g RAC重新新增節點Oracle
- Tuning CPU 100% in Oracle 11g rac-20220215Oracle
- Node.js 下載安裝與環境配置Node.js
- Oracle Linux 7.1 靜默安裝Oracle 18c RACOracleLinux
- 11. Oracle for Linux安裝和配置—11.3. Oracle安裝和配置—11.3.3. Oracle net配置OracleLinux
- 11. Oracle for Linux安裝和配置—11.3. Oracle安裝和配置—11.3.1. Oracle軟體安裝OracleLinux
- centos7.3上安裝oracle xe 11gCentOSOracle
- 靜默方式安裝oracle 11g 完整攻略Oracle
- 靜默安裝Oracle資料庫11gOracle資料庫