在 Oracle Clusterware 11g 第 2 版 (11.2) 中,有许多子程序和命令已不再使用:
    crs_stat
    crs_register
    crs_unregister
    crs_start
    crs_stop
    crs_getperm
    crs_profile
    crs_relocate
    crs_setperm
    crsctl check crsd
    crsctl check cssd
    crsctl check evmd
    crsctl debug log
    crsctl set css votedisk
    crsctl start resources
    crsctl stop resources

检查集群的运行状况 —(集群化命令)

以 grid 用户身份运行以下命令。

[grid@racnode1 ~]$ crsctl check cluster 
    CRS-4537: Cluster Ready Services is online 
    CRS-4529: Cluster Synchronization Services is online 
    CRS-4533: Event Manager is online

所有 Oracle 实例 —(数据库状态)

[oracle@racnode1 ~]$ srvctl status database -d racdb 
    Instance racdb1 is running on node racnode1 
    Instance racdb2 is running on node racnode2

单个 Oracle 实例 —(特定实例的状态)

[oracle@racnode1 ~]$ srvctl status instance -d racdb -i racdb1 
    Instance racdb1 is running on node racnode1

节点应用程序 —(状态)

[oracle@racnode1 ~]$ srvctl status nodeapps 
    VIP racnode1-vip is enabled 
    VIP racnode1-vip is running on node: racnode1 
    VIP racnode2-vip is enabled VIP racnode2-vip is running on node: racnode2 
    Network is enabled Network is running on node: racnode1 
    Network is running on node: racnode2 GSD is disabled 
    GSD is not running on node: racnode1 
    GSD is not running on node: racnode2 
    ONS is enabled 
    ONS daemon is running on node: racnode1 
    ONS daemon is running on node: racnode2 
    eONS is enabled eONS daemon is running on node: racnode1 
    eONS daemon is running on node: racnode2

节点应用程序 —(配置)

[oracle@racnode1 ~]$ srvctl config nodeapps 
    VIP exists.:racnode1 VIP exists.: /racnode1-vip/192.168.1.251/255.255.255.0/eth0 
    VIP exists.:racnode2 
    VIP exists.: /racnode2-vip/192.168.1.252/255.255.255.0/eth0 
    GSD exists. 
    ONS daemon exists. Local port 6100, remote port 6200 
    eONS daemon exists. Multicast port 24057, multicast IP address 234.194.43.168, 
    listening port 2016

数据库 —(配置)

[oracle@racnode1 ~]$ srvctl config database -d racdb -a 
    Database unique name: racdb 
    Database name: racdb 
    Oracle home: /u01/app/oracle/product/11.2.0/dbhome_1 
    Oracle user: oracle 
    Spfile: +RACDB_DATA/racdb/spfileracdb.ora 
    Domain: idevelopment.info 
    Start options: open 
    Stop options: immediate 
    Database role: PRIMARY 
    Management policy: AUTOMATIC 
    Server pools: racdb 
    Database instances: racdb1,racdb2 
    Disk Groups: RACDB_DATA,FRA 
    Services:  
    Database is enabled 
    Database is administrator managed

ASM —(状态)

[oracle@racnode1 ~]$ srvctl status asm 
    ASM is running on racnode1,racnode2

ASM —(配置)

$ srvctl config asm -a 
    ASM home: /u01/app/11.2.0/grid 
    ASM listener: LISTENER 
    ASM is enabled.

TNS 监听器 —(状态)

[oracle@racnode1 ~]$ srvctl status listener 
    Listener LISTENER is enabled 
    Listener LISTENER is running on node(s): racnode1,racnode2

TNS 监听器 —(配置)

[oracle@racnode1 ~]$ srvctl config listener -a 
    Name: LISTENER 
    Network: 1, Owner: grid 
    Home: <crs>  
     /u01/app/11.2.0/grid on node(s) racnode2,racnode1 
    End points: TCP:1521

SCAN —(状态)

[oracle@racnode1 ~]$ srvctl status scan 
    SCAN VIP scan1 is enabled 
    SCAN VIP scan1 is running on node racnode1

SCAN —(配置)

[oracle@racnode1 ~]$ srvctl config scan 
    SCAN name: racnode-cluster-scan, Network: 1/192.168.1.0/255.255.255.0/eth0 
    SCAN VIP name: scan1, IP: /racnode-cluster-scan/192.168.1.187

VIP —(特定节点的状态)

[oracle@racnode1 ~]$ srvctl status vip -n racnode1 
    VIP racnode1-vip is enabled 
    VIP racnode1-vip is running on node: racnode1

[oracle@racnode1 ~]$ srvctl status vip -n racnode2 
    VIP racnode2-vip is enabled 
    VIP racnode2-vip is running on node: racnode2

VIP —(特定节点的配置)

[oracle@racnode1 ~]$ srvctl config vip -n racnode1 
    VIP exists.:racnode1 
    VIP exists.: /racnode1-vip/192.168.1.251/255.255.255.0/eth0

[oracle@racnode1 ~]$ srvctl config vip -n racnode2 
    VIP exists.:racnode2 
    VIP exists.: /racnode2-vip/192.168.1.252/255.255.255.0/eth0

节点应用程序配置 —(VIP、GSD、ONS、监听器)

[oracle@racnode1 ~]$ srvctl config nodeapps -a -g -s -l 
    -l option has been deprecated and will be ignored. 
    VIP exists.:racnode1 
    VIP exists.: /racnode1-vip/192.168.1.251/255.255.255.0/eth0 
    VIP exists.:racnode2 
    VIP exists.: /racnode2-vip/192.168.1.252/255.255.255.0/eth0 
    GSD exists. 
    ONS daemon exists. Local port 6100, remote port 6200 
    Name: LISTENER 
    Network: 1, Owner: grid 
    Home: <crs>  
     /u01/app/11.2.0/grid on node(s) racnode2,racnode1 
    End points: TCP:1521

验证所有集群节点间的时钟同步

[oracle@racnode1 ~]$ cluvfy comp 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                     
      ------------------------------------  ------------------------ 
      racnode1                              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                    
      ------------------------------------  ------------------------ 
      racnode1                              Active                   
    CTSS is in Active state. Proceeding with check of clock time offsets on all nodes... 
    Reference Time Offset Limit: 1000.0 msecs 
    Check: Reference Time Offset 
      Node Name     Time Offset               Status                   
      ------------  ------------------------  ------------------------ 
      racnode1      0.0                       passed

Time offset is within the specified limits on the following set of nodes:  "[racnode1]"  
    Result: Check of clock time offsets passed

Oracle Cluster Time Synchronization Services check passed

Verification of Clock Synchronization across the cluster nodes was successful.

以下停止/启动操作需要以 root 身份来执行。

在本地服务器上停止 Oracle Clusterware 系统

在 racnode1 节点上使用 crsctl stop cluster 命令停止 Oracle Clusterware 系统:

[root@racnode1 ~]# /u01/app/11.2.0/grid/bin/crsctl stop cluster 
CRS-2673: Attempting to stop 'ora.crsd' on 'racnode1' 
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 
'racnode1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'racnode1'
CRS-2673: Attempting to stop 'ora.CRS.dg' on 'racnode1'
CRS-2673: Attempting to stop 'ora.racdb.db' on 'racnode1'
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'racnode1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'racnode1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'racnode1' succeeded
CRS-2673: Attempting to stop 'ora.racnode1.vip' on 'racnode1'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'racnode1' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'racnode1'
CRS-2677: Stop of 'ora.scan1.vip' on 'racnode1' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'racnode2'
CRS-2677: Stop of 'ora.racnode1.vip' on 'racnode1' succeeded
CRS-2672: Attempting to start 'ora.racnode1.vip' on 'racnode2'
CRS-2677: Stop of 'ora.registry.acfs' on 'racnode1' succeeded
CRS-2676: Start of 'ora.racnode1.vip' on 'racnode2' succeeded            
                                
<-- Notice racnode1 VIP moved to racnode2
CRS-2676: Start of 'ora.scan1.vip' on 'racnode2' succeeded               
                                
<-- Notice SCAN moved to racnode2
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'racnode2'
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'racnode2' succeeded     
                                
<-- Notice LISTENER_SCAN1 moved to racnode2
CRS-2677: Stop of 'ora.CRS.dg' on 'racnode1' succeeded
CRS-2677: Stop of 'ora.racdb.db' on 'racnode1' succeeded
CRS-2673: Attempting to stop 'ora.FRA.dg' on 'racnode1'
CRS-2673: Attempting to stop 'ora.RACDB_DATA.dg' on 'racnode1'
CRS-2677: Stop of 'ora.RACDB_DATA.dg' on 'racnode1' succeeded
CRS-2677: Stop of 'ora.FRA.dg' on 'racnode1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'racnode1'
CRS-2677: Stop of 'ora.asm' on 'racnode1' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'racnode1'
CRS-2673: Attempting to stop 'ora.eons' on 'racnode1'
CRS-2677: Stop of 'ora.ons' on 'racnode1' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'racnode1'
CRS-2677: Stop of 'ora.net1.network' on 'racnode1' succeeded
CRS-2677: Stop of 'ora.eons' on 'racnode1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'racnode1' has 
completed
CRS-2677: Stop of 'ora.crsd' on 'racnode1' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'racnode1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'racnode1'
CRS-2673: Attempting to stop 'ora.evmd' on 'racnode1'
CRS-2673: Attempting to stop 'ora.asm' on 'racnode1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'racnode1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'racnode1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'racnode1' succeeded
CRS-2677: Stop of 'ora.asm' on 'racnode1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'racnode1'
CRS-2677: Stop of 'ora.cssd' on 'racnode1' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'racnode1'
CRS-2677: Stop of 'ora.diskmon' on 'racnode1' succeeded

注:在运行“ crsctl stop cluster”命令之后,如果 Oracle Clusterware 管理的资源中有任何一个还在运行,则整个命令失败。使用 -f 选项无条件地停止所有资源并停止 Oracle Clusterware 系统。

另请注意,可通过指定 -all 选项在集群中所有服务器上停止 Oracle Clusterware 系统。以下命令将在 racnode1 和 racnode2 上停止 Oracle Clusterware 系统:

[root@racnode1 ~]# /u01/app/11.2.0/grid/bin/crsctl stop cluster -all

在本地服务器上启动 Oracle Clusterware 系统

在 racnode1 节点上使用 crsctl start cluster 命令启动 Oracle Clusterware 系统:

[root@racnode1 ~]# /u01/app/11.2.0/grid/bin/crsctl start cluster 
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'racnode1' 
CRS-2676: Start of 'ora.cssdmonitor' on 'racnode1' succeeded 
CRS-2672: Attempting to start 'ora.cssd' on 'racnode1' 
CRS-2672: Attempting to start 'ora.diskmon' on 'racnode1' 
CRS-2676: Start of 'ora.diskmon' on 'racnode1' succeeded 
CRS-2676: Start of 'ora.cssd' on 'racnode1' succeeded 
CRS-2672: Attempting to start 'ora.ctssd' on 'racnode1' 
CRS-2676: Start of 'ora.ctssd' on 'racnode1' succeeded 
CRS-2672: Attempting to start 'ora.evmd' on 'racnode1' 
CRS-2672: Attempting to start 'ora.asm' on 'racnode1' 
CRS-2676: Start of 'ora.evmd' on 'racnode1' succeeded 
CRS-2676: Start of 'ora.asm' on 'racnode1' succeeded 
CRS-2672: Attempting to start 'ora.crsd' on 'racnode1' 
CRS-2676: Start of 'ora.crsd' on 'racnode1' succeeded

注:可通过指定 -all 选项在集群中所有服务器上启动 Oracle Clusterware 系统。

[root@racnode1 ~]# /u01/app/11.2.0/grid/bin/crsctl start cluster -all

还可以通过列出服务器(各服务器之间以空格分隔)在集群中一个或多个指定的服务器上启动 Oracle Clusterware 系统:

[root@racnode1 ~]# /u01/app/11.2.0/grid/bin/crsctl start cluster -n 
racnode1 racnode2

使用 SRVCTL 启动/停止所有实例

最后,可使用以下命令来启动/停止所有实例及相关服务:

[oracle@racnode1 ~]$ srvctl stop database -d racdb  
[oracle@racnode1 ~]$ srvctl start database -d racdb

http://blog.itpub.net/29337971/viewspace-1079546/

管理11gRAC基本命令 (转载) 很详细的更多相关文章

  1. 管理11gRAC基本命令 (转载)

    在 Oracle Clusterware 11g 第 2 版 (11.2) 中,有许多子程序和命令已不再使用:    crs_stat    crs_register    crs_unregiste ...

  2. 转载自鸿燕藏锋-ETL讲解(很详细!!!)

    ETL讲解(很详细!!!)   ETL讲解(很详细!!!) ETL是将业务系统的数据经过抽取.清洗转换之后加载到数据仓库的过程,目的是将企业中的分散.零乱.标准不统一的数据整合到一起,为企业的决策提供 ...

  3. [转]很详细的devexpress应用案例

    很详细的devexpress应用案例,留着以后参考. 注:转载自http://***/zh-CN/App/Feature.aspx?AppId=50021 UPMS(User Permissions ...

  4. 很详细的SpringBoot整合UEditor教程

    很详细的SpringBoot整合UEditor教程 2017年04月10日 20:27:21 小宝2333 阅读数:21529    版权声明:本文为博主原创文章,未经博主允许不得转载. https: ...

  5. 一个很详细的web.xml讲解(转)

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "- ...

  6. 很详细、很移动的Linux makefile教程:介绍,总述,书写规则,书写命令,使用变量,使用条件推断,使用函数,Make 的运行,隐含规则 使用make更新函数库文件 后序

    很详细.很移动的Linux makefile 教程 内容如下: Makefile 介绍 Makefile 总述 书写规则 书写命令 使用变量 使用条件推断 使用函数 make 的运行 隐含规则 使用m ...

  7. ASP.NET MVC+EF框架+EasyUI实现权限管理系列(15)-用户登录详细错误和权限数据库模型设计

    原文:ASP.NET MVC+EF框架+EasyUI实现权限管理系列(15)-用户登录详细错误和权限数据库模型设计     ASP.NET MVC+EF框架+EasyUI实现权限管系列 (开篇)    ...

  8. SecureCRT的安装与破解(过程很详细!!!)

    SecureCRT的安装与破解(过程很详细!!!) 使用SecureCRT可以方便用户在windows环境下对linux主机进行管理,这里为大家讲一下SecureCRT的破解方法,仅供大家参考学习: ...

  9. 00-01.PHP 网站假设win7配置自己的IIS服务器亲自做的图文很详细 [转 - 赞 ]

    win7配置自己的IIS服务器亲自做的图文很详细 分步阅读 跟人网站爱好初学者必看的win7系统配置自己的IIS,可以在你自己的电脑上配置网站服务器发不到网上,下面就跟着我的步骤一起做吧100%成功. ...

随机推荐

  1. invalid derived query的解决办法

    标签: eclipse / invalid / derived / 解决办法 / 校验功能 479 在Eclipse的运行过程中,突然有一个接口跳出如下错误: invalid derived quer ...

  2. Spring_HelloWorld

    目录: 各个类文件: pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="h ...

  3. [POI2012] BEZ-Minimalist Security

    一张n个点m条边的无向图,有点权有边权都是非负,且每条边的权值小于等于两个顶点的权值和,现在要将每个点减一个非负整数使得每条边权等于两个顶点的点权和,问最大修改代价和最小修改代价 思路神的一匹,完全想 ...

  4. 利用ECharts开发的步骤

    引入Echarts的相关库文件,以及自定义的js文件 <script src="${pageContext.request.contextPath}/js/echarts/source ...

  5. spring半自动代理

    1.被代理类接口Person.java package com.xiaostudy; /** * @desc 被代理类接口 * * @author xiaostudy * */ public inte ...

  6. 关于Jupyter Notebook默认起始目录设置无效的解决方法

    一.问题描述 今天折腾jupyter的时候,突然觉得起始目录是用户根目录很麻烦,想着把他改成自己的某个文件,按照网上方法折腾半天也还是无效.东点点西看看才发现端倪. [win10以下好像没这个问题,修 ...

  7. python之list,tuple,str,dic简单记录(二)

    切片对象:例子:In [13]: l = [1,23,4,5,5,6,8]In [14]: l[::1]Out[14]: [1, 23, 4, 5, 5, 6, 8] In [15]: l[::2]O ...

  8. 5.8 页面对象(Page Object)模式

    页面对象(Page Object)模式是目前自动化测试领域普遍使用的设计模式之一,此模式可以大大提高测试代码的复用率,提高测试脚本的编写效率和维护效率,是中级自动化测试工程师的必备技能之一. 1.页面 ...

  9. shell基础复习笔记

    变量的设置 以等号连接,等号两边不能有空格 变量名首个字符必须是英文,可以使用下划线,不能使用标点符号,不能使用bash里的关键字 可以使用转义字符\将特殊符号(如Enter.$.空格.!等)变成一般 ...

  10. iOS-证书真机调试

    开发者账号分类 个人的 99$  申请简单,付钱就行,688人民币   企业的 99$  申请复杂,需要“邓白氏”认证,可以确认企业是合法有效的 可以管理团队开发   商业的 299$  也需要邓白氏 ...