知识大全 管理oracle11gRAC
Posted 知
篇首语:少年意气强不羁,虎胁插翼白日飞。本文由小常识网(cha138.com)小编为大家整理,主要介绍了知识大全 管理oracle11gRAC相关的知识,希望对你有一定的参考价值。
管理oracle11gRAC 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!
检查集群状态
[grid@rac ~]$ crsctl check cluster
CRS : Cluster Ready Services is online
CRS : Cluster Synchronization Services is online
CRS : Event Manager is online
所有 Oracle 实例 —(数据库状态):
[grid@rac ~]$ srvctl status database d racdb
Instance racdb is running on node rac
Instance racdb is running on node rac
检查单个实例状态
[grid@rac ~]$ srvctl status instance d racdb i racdb
Instance racdb is running on node rac
节点应用程序状态
[grid@rac ~]$ srvctl status nodeapps
VIP rac vip is enabled
VIP rac vip is running on node: rac
VIP rac vip is enabled
VIP rac vip is running on node: rac
Neork is enabled
Neork is running on node: rac
Neork is running on node: rac
GSD is disabled
GSD is not running on node: rac
GSD is not running on node: rac
ONS is enabled
ONS daemon is running on node: rac
ONS daemon is running on node: rac
eONS is enabled
eONS daemon is running on node: rac
eONS daemon is running on node: rac
列出所有的配置数据库
[grid@rac ~]$ srvctl config database
racdb
数据库配置
[grid@rac ~]$ srvctl config database d racdb a
Database unique name: racdb
Database name: racdb
Oracle home: /u /app/oracle/product/ /dbhome_
Oracle user: oracle
Spfile: +RACDB_DATA/racdb/spfileracdb ora
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: racdb
Database instances: racdb racdb
Disk Groups: RACDB_DATA FRA
Services:
Database is enabled
Database is administrator managed
ASM状态以及ASM配置
[grid@rac ~]$ srvctl status asm
ASM is running on rac rac
[grid@rac ~]$ srvctl config asm a
ASM home: /u /app/ /grid
ASM listener: LISTENER
ASM is enabled
TNS监听器状态以及配置
[grid@rac ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): rac rac
[grid@rac ~]$ srvctl config listener a
Name: LISTENER
Neork: Owner: grid
Home: <CRS home>
/u /app/ /grid on node(s) rac rac
End points: TCP:
SCAN状态以及配置
[grid@rac ~]$ srvctl status scan
SCAN VIP scan is enabled
SCAN VIP scan is running on node rac
[grid@rac ~]$ srvctl config scan
SCAN name: r Neork: / / /eth
SCAN VIP name: scan IP: /r/
VIP各个节点的状态以及配置
[grid@rac ~]$ srvctl status vip n rac
VIP rac vip is enabled
VIP rac vip is running on node: rac
[grid@rac ~]$ srvctl status vip n rac
VIP rac vip is enabled
VIP rac vip is running on node: rac
[grid@rac ~]$ srvctl config vip n rac
VIP exists :rac
VIP exists : /rac vip/ / /eth
[grid@rac ~]$ srvctl config vip n rac
VIP exists :rac
VIP exists : /rac vip/ / /eth
节点应用程序配置 —(VIP GSD ONS 监听器)
[grid@rac ~]$ srvctl config nodeapps a g s l
l option has been deprecated and will be ignored
VIP exists :rac
VIP exists : /rac vip/ / /eth
VIP exists :rac
VIP exists : /rac vip/ / /eth
GSD exists
ONS daemon exists Local port remote port
Name: LISTENER
Neork: Owner: grid
Home: <CRS home>
/u /app/ /grid on node(s) rac rac
End points: TCP:
验证所有集群节点间的时钟同步:
[grid@rac ~]$ cluvfy p clocksync verbose
Verifying Clock Synchronization across the cluster nodes
Checking if Clusterware is installed on all nodes
Check of Clusterware install passed
Checking if CTSS Resource is running on all nodes
Check: CTSS Resource running on all nodes
Node Name Status
rac passed
Result: CTSS resource check passed
Querying CTSS for time offset on all nodes
Result: Query of CTSS for time offset passed
Check CTSS state started
Check: CTSS state
Node Name State
rac Active
CTSS is in Active state Proceeding with check of clock time offsets on all nodes
Reference Time Offset Limit: msecs
Check: Reference Time Offset
Node Name Time Offset Status
rac passed
Time offset is within the specified limits on the following set of nodes:
[rac ]
Result: Check of clock time offsets passed
Oracle Cluster Time Synchronization Services check passed
Verification of Clock Synchronization across the cluster nodes was successful
集群中所有正在运行的实例 — (SQL):
SELECT inst_id instance_number inst_no instance_name inst_name parallel status database_status db_status active_state state host_name host FROM gv$instance ORDER BY inst_id;
所有数据库文件及它们所在的 ASM 磁盘组 — (SQL):
ASM 磁盘卷:
启动和停止集群
以下操作需用root用户执行
( ) 在本地服务器上停止Oracle Clusterware 系统
[root@rac ~]# /u /app/ /grid/bin/crsctl stop cluster
CRS : Attempting to stop ora crsd on rac
CRS : Starting shutdown of Cluster Ready Services managed resources on rac
CRS : Attempting to stop ora LISTENER lsnr on rac
CRS : Attempting to stop ora CRS dg on rac
CRS : Attempting to stop ora racdb db on rac
CRS : Attempting to stop ora registry acfs on rac
CRS : Stop of ora LISTENER lsnr on rac succeeded
CRS : Attempting to stop ora rac vip on rac
CRS : Stop of ora rac vip on rac succeeded
CRS : Attempting to start ora rac vip on rac
CRS : Stop of ora registry acfs on rac succeeded
CRS : Start of ora rac vip on rac succeeded
CRS : Stop of ora CRS dg on rac succeeded
CRS : Stop of ora racdb db on rac succeeded
CRS : Attempting to stop ora FRA dg on rac
CRS : Attempting to stop ora RACDB_DATA dg on rac
CRS : Stop of ora FRA dg on rac succeeded
CRS : Stop of ora RACDB_DATA dg on rac succeeded
CRS : Attempting to stop ora asm on rac
CRS : Stop of ora asm on rac succeeded
CRS : Attempting to stop ora ons on rac
CRS : Attempting to stop ora eons on rac
CRS : Stop of ora ons on rac succeeded
CRS : Attempting to stop work on rac
CRS : Stop of work on rac succeeded
CRS : Stop of ora eons on rac succeeded
CRS : Shutdown of Cluster Ready Services managed resources on rac has pleted
CRS : Stop of ora crsd on rac succeeded
CRS : Attempting to stop ora cssdmonitor on rac
CRS : Attempting to stop ora ctssd on rac
CRS : Attempting to stop ora evmd on rac
CRS : Attempting to stop ora asm on rac
CRS : Stop of ora cssdmonitor on rac succeeded
CRS : Stop of ora evmd on rac succeeded
CRS : Stop of ora ctssd on rac succeeded
CRS : Stop of ora asm on rac succeeded
CRS : Attempting to stop ora cssd on rac
CRS : Stop of ora cssd on rac succeeded
CRS : Attempting to stop ora diskmon on rac
CRS : Stop of ora diskmon on rac succeeded
注 在运行 crsctl stop cluster 命令之后 如果 Oracle Clusterware 管理的资源中有任何一个还在运行 则整个命令失败 使用 f 选项无条件地停止所有资源并停止 Oracle Clusterware 系统
另请注意 可通过指定 all 选项在集群中所有服务器上停止 Oracle Clusterware 系统 如下所示 在rac 和rac 上停止oracle clusterware系统
[root@rac ~]# /u /app/ /grid/bin/crsctl stop cluster –all
在本地服务器上启动oralce clusterware系统
[root@rac ~]# /u /app/ /grid/bin/crsctl start cluster
注 可通过指定 all 选项在集群中所有服务器上启动 Oracle Clusterware 系统
[root@rac ~]# /u /app/ /grid/bin/crsctl start cluster –all
还可以通过列出服务器(各服务器之间以空格分隔)在集群中一个或多个指定的服务器上启动 Oracle Clusterware 系统
[root@rac ~]# /u /app/ /grid/bin/crsctl start cluster n rac rac
使用 SRVCTL 启动/停止所有实例:
[oracle@rac ~]#srvctl stop database d racdb
[oracle@rac ~]#srvctl start database d racdb
安装的后置任务
.官方建议的两个安装后置任务
( ) 备份 root sh 脚本
官方建议在完成安装后要备份root sh脚本文件 如果在Oracle Home目录中又安装其它的产品 安装时OUI会升级已存在的root sh文件 如果需要root sh内的原始信息 就可以在备份中找到
cd $ORACLE_HOME;cp root sh root sh bak
( )重新编译无效对象
运行 utlrp sql 脚本立即重新编译所有无效的 PL/SQL 程序包 而不是在首次访问它们时再重新编译 这是个可选步骤 但建议您选择该步骤
[oracle@racnode ~]$ sqlplus / as sysdba
SQL> @?/rdbms/admin/utlrp sql
在 RAC 环境中启用存档日志
( ) 以 oracle 用户身份登录到一个节点(即 racnode ) 通过在当前实例中将 cluster_database 设置为 FALSE 来禁用集群实例参数
[oracle@rac ~]$ sqlplus / as sysdba
SQL> alter system set cluster_database=false scope=spfile sid= racdb ;
System altered
( ) 以 oracle 用户身份关闭所有 访问集群化数据库的实例
[oracle@rac ~]$ srvctl stop database d racdb
( ) 使用本地实例 挂载数据库
[oracle@rac ~]$ sqlplus / as sysdba
SQL*Plus: Release Production on Sat Nov : : Copyright (c) Oracle All rights reserved Connected to an idle instance
SQL> startup mount
ORACLE instance started
Total System Global Area bytes
Fixed Size bytes
Variable Size bytes
Database Buffers bytes
Redo Buffers bytes
( ) 启用存档功能
SQL> alter database archivelog;
Database altered
( ) 通过在当前实例中将实例参数 cluster_database 修改为 TRUE 重新启用对集群的支持
SQL> alter system set cluster_database=true scope=spfile sid= racdb ;
System altered
( ) 关闭本地实例
SQL> shutdown immediate
ORA : database not open
Database dismounted
ORACLE instance shut down
( ) 以 oracle 帐户身份使用 srvctl 命令重启所有实例
[oracle@rac ~]$ srvctl start database d racdb
( ) 登录到本地实例 验证存档日志模式已启用
[oracle@rac ~]$ sqlplus / as sysdba
SQL*Plus: Release Production on Sat Nov : : Copyright (c) Oracle All rights reserved Connected to: Oracle Database g Enterprise Edition Release bit Production With the Partitioning Real Application Clusters Automatic Storage Management OLAP Data Mining and Real Application Testing options
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence
Next log sequence to archive
Current log sequence
在两个RAC节点都备份spfile初始化参数文件:创建一个备份目录
[oracle@rac ~]$ mkdir $ORACLE_HOME/spfile_bak
cha138/Article/program/Oracle/201311/17619相关参考
知识大全 oracle10Grac+redhat4的详细配置
oracle10Grac+redhat4的详细配置 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!
知识大全 Oracle 11g RAC环境下单实例非缺省监听及端口配置
Oracle11gRAC环境下单实例非缺省监听及端口配置 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下
知识大全 10gRAC系列之使用srvctl管理RAC数据库
10gRAC系列之使用srvctl管理RAC数据库 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!
Oracle发布最新CRM管理软件11i.10版 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!
Oracle10gRAC网络设置 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!lishixinzh
Oracle10gRAC常用维护命令 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! 所有实例和服
ORACLE11iGL设置逻辑 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! ORACLE财务系
知识大全 Oracle11gSQLPerformanceAnalyzer感受
Oracle11gSQLPerformanceAnalyzer感受 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一
Oracle内存数据库11g和高速缓存11g上市 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧!北京
Oracle11g默认目录结构 以下文字资料是由(全榜网网www.cha138.com)小编为大家搜集整理后发布的内容,让我们赶快一起来看一下吧! Oracleg主流