Oracle 11g RAC One node 安装与配置
发表于:2025-01-19 作者:千家信息网编辑
千家信息网最后更新 2025年01月19日,一、RAC One Node介绍1、rac one node数据库可以转换成RAC数据库,转换过程可以在线,无需停止RAC one node数据库;2、rac one node可以创建多个rac on
千家信息网最后更新 2025年01月19日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@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配置完成!
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配置完成!
数据
数据库
节点
运行
配置
信息
实例
切换
平台
情况
文档
时间
类型
过程
支持
查询
不同
一致
业务
事件
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
服务器事件查看日志
软件开发公司项目合作
北邮网络技术研究院复试结果
服务器带内管理作用
开展儿童网络安全教育
推荐网络技术培训费用
我国网络安全管理
小枫免流量服务器软件
青岛计算机软件开发服务
数据库获取用户名密码
软件开发学习什么好呢
中国网络安全和信息产业峰会
数据库九个核心动词
数据库用圆柱体表示
如何做到网络安全
太原星之梦互联网科技有限公司
家庭网络技术基础详解
浪潮服务器光盘启动
无锡博世集团软件开发
四川数据软件开发推广
建德天气预报软件开发
菜籽互联网科技媒体
打印机服务器格式
办公电脑网络安全
数据库查询实现隔n行取数据
监控录像软件开发
云服务器100m
最常见的中英文摘数据库是
神武服务器人数
金税盘安全服务器地址福建省