在 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. 用 Excel 生成和管理 Markdown 表格--转载

    Markdown 作为一种轻量级的标记语言,用来进行简单的文本排版,确实方便快捷.但 Markdown 标记语言的属性,也使得其在表格处理上略显繁琐且不直观.而 Excel 几乎就是表格的代名词,借助 ...

  3. glusterFS系统中文管理手册(转载)

    GlusterFS系统中文管理手册       1文档说明 该文档主要内容出自 www.gluster.org 官方提供的英文系统管理手册<Gluster File System 3.3.0 A ...

  4. .Net Core下如何管理配置文件(转载)

    原文地址:http://www.cnblogs.com/yaozhenfa/p/5408009.html 一.前言 根据该issues来看,System.Configuration在.net core ...

  5. KbmMW 认证管理器说明(转载)

    这是kbmmw 作者关于认证管理器的说明,我懒得翻译了,自己看吧. There are 5 parts of setting up an authorization manager: A) Defin ...

  6. linux磁盘管理与分区 转载

    原文:http://zhengjianglong.leanote.com/post/linux%E7%A3%81%E7%9B%98%E5%88%86%E5%8C%BA 一.基础知识 一块磁盘可以分为多 ...

  7. vim基本命令(转载自网络)

    来源于<Unix初级教程(第四版)>. 命令模式切换到文本输入模式: 键 功能 i 在光标左侧输入文本 I 在当前行的行首输入文本 a 在光标右侧输入文本 A 在当前行的行尾输入文本 o ...

  8. linux文件和目錄管理的基本命令命令

    ls命令 作用:顯示目標列表或目錄的內容 語法:ls[選項][目錄或文件] -a:顯示指定目錄下所有子目錄與文件,包括隱藏文件 -l:顯示文件的詳細信息 -d: 顯示目錄 例:ls -dl cd命令 ...

  9. liunx用户管理的基本命令

    1.passwd   修改用户密码 2.useradd 用户组名         增加用户组 3.su 用户名     切换用户名 4.usermod   用户更改 5.userdel    用户删除

随机推荐

  1. PAT 天梯赛 是否同一棵二叉搜索树   (25分)(二叉搜索树 指针)

    给定一个插入序列就可以唯一确定一棵二叉搜索树.然而,一棵给定的二叉搜索树却可以由多种不同的插入序列得到.例如分别按照序列{2, 1, 3}和{2, 3, 1}插入初始为空的二叉搜索树,都得到一样的结果 ...

  2. 【linux】wifi不能使用的问题

    Worked solution (Requirements: kernel >=4.11) : Download driver directory from this repo:https:// ...

  3. LightOJ 1355 :Game of CS(树上green博弈)

    Jolly and Emily are two bees studying in Computer Science. Unlike other bees they are fond of playin ...

  4. 【JVM】jvm的jps命令

    jps -- Java Virtual Machine Process Status Tool 可以列出本机所有java进程的pid jps [ options ] [ hostid ] 选项 -q ...

  5. 干了2个月java开发最深的体会

    综上为JQuery中ajax的操作,感觉使用多了,和form表单的处理还是非常相似的,只不过实现的功能不一样罢了.学习编程,其实就是学习对数据的流转处理,也即是程序的运行流程,如何从前台获取,传输到服 ...

  6. dbt 包依赖简单测试

    dbt 包含一个自己的包管理,可以使用git 等工具,还是很方便的,可以方便的进行代码共享,实现复用 创建简单包 实际上就是一个简单的dbt 项目,参考项目 https://gitlab.com/da ...

  7. MongoDB初试备份及恢复

    MongoDB作为文档数据库,有 1.登录MongoDB官网,地址:https://www.mongodb.com/download-center#community  , 根据自己操作系统下载相应版 ...

  8. 电路交换vs分组交换

    电路交换 交换:动态分配传输线路资源. 须经过:建立连接 -> 通话 -> 释放连接. 特点:传输效率低(大部分时间空闲). 分组交换 位于网络边缘的主机&位于网络核心的路由器都是 ...

  9. 进程表/文件表/inode/vnode

    一般我们讲,都说进程有文件描述符表,文件描述符表中的指针指向某个inode,这中间省略了file,dentry对象,对准确理解VFS结构无益,本文结合网络所查,并根据APUE8.3和LKD13.11章 ...

  10. Fix Visual Studio 2013 Razor CSHTML Intellisense in Class Library or Console Application

    https://mhusseini.wordpress.com/2015/02/05/fix-visual-studio-2013-razor-cshtml-intellisense-in-class ...