Oracle 12.1.0.2 RAC crsctl系统命令手册

前言:添加root的环境变量

[root@oracle1 /]# cd ~

[root@oracle1 ~]# vim .bash_profile

export GRID_BASE=/u01/app/grid/

export GRID_HOME=/u01/app/12.1.0/grid_1/

export PATH=$PATH:$GRID_HOME/bin

1      crsctl add

1.1    crsctl add crs administrator -u <user_name> [-f]

where

   user_name     User name to be added to the admin list or "*"

   -f            Override user name validity check

 

 

2      crsctl check

用法

[root@oracle1 ~]# crsctl check

Usage:

  crsctl check crs

     Check status of OHAS and CRS stack

 

  crsctl check cluster [[-all]|[-n <server>[...]]]

     Check status of CRS stack

 

  crsctl check ctss

    Check status of Cluster Time Synchronization Services

 

  crsctl check resource {<resName> [...]|-w <filter>} [-n <server>] [-k <cid>] [-d <did>]

     Check status of resources

 

  crsctl check css

     Check status of Cluster Synchronization Services

 

  crsctl check evm

     Check status of Event Manager

 

2.1    crsctl check crs

 

[root@oracle1 ~]#  crsctl check crs

CRS-4638: Oracle High Availability Services is online

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager is online

2.2    crsctl check cluster

crsctl check cluster [[-all]|[-n <server>[...]]]

 

[root@oracle1 ~]# crsctl check cluster -all

**************************************************************

oracle1:

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager is online

**************************************************************

oracle2:

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager is online

**************************************************************

 

 

2.3    crsctl check ctss

 

[root@oracle1 ~]#   crsctl check ctss

CRS-4701: The Cluster Time Synchronization Service is in Active mode.

CRS-4702: Offset (in msec): 0

2.4    crsctl check resource

 

[root@oracle1 ~]# crsctl check resource appsvip

CRS-2613: Could not find resource 'appsvip'.

2.5    crsctl check css

 

 

[root@oracle1 ~]# crsctl check css

CRS-4529: Cluster Synchronization Services is online

2.6    crsctl check evm

 

[root@oracle1 ~]#   crsctl check evm

CRS-4533: Event Manager is online

3      crsctl config

Usage:

  crsctl config crs

     Display OHAS autostart config on this server

 

3.1    crsctl config crs

[root@oracle1 ~]# crsctl config crs

CRS-4622: Oracle High Availability Services autostart is enabled.

4      crsctl create

Usage:

  crsctl create policyset -file <filePath>

where

     filePath        Policy set file to create.

 

4.1    crsctl create policyset -file ~/policyFile.txt

[root@oracle1 ~]# crsctl create policyset -file ~/policyFile.txt

[root@oracle1 ~]# vim policyFile.txt

 

SERVER_POOL_NAMES=Free

POLICY

  NAME=Default

 

 

 

5      crsctl debug

Usage:

  crsctl debug statedump {crs|css|evm}

 where

   crs           Cluster Ready Services

   css           Cluster Synchronization Services

   evm           Event Manager

5.1    crsctl debug statedump crs

 

[root@oracle1 ~]# crsctl debug statedump crs

Dumping State for crs objects

6      crsctl delete

 

[root@oracle1 ~]# crsctl delete

Usage:

  crsctl delete resource {<resName> [...]|-w <filter>} [-f] [-i]

where

    resName [...]  One or more resource names to be deleted

    -w             Resource filter (e.g., "TYPE = ora.database.type")

    -f             Force option

    -i             Fail if request cannot be processed immediately

 

  crsctl delete type {<typeName> [...]|-w <filter>} [-i]

where

    typeName [...]  One or more blank-separated resource type names

    -w              Type filter (e.g., "TYPE_NAME = test_type")

    -i              Fail if request cannot be processed immediately

 

  crsctl delete wallet -type <wallet_type> [-name <name>] [-user <user_name>]

     Delete the designated wallet or user from wallet

where

     wallet_type     Type of wallet i.e. APPQOSADMIN, APPQOSUSER, APPQOSDB, MGMTDB, OSUSER or CVUDB.

     name            Name is required for APPQOSDB and CVUDB wallets.

     user_name       User to be deleted from wallet.

 

  crsctl delete category {<categoryName> [...]|-w <filter>} [-i]

where

    categoryName [...]    One or more server categories to be deleted

    -w                    Category filter (e.g., "NAME = myCateg")

    -i                    Fail if request cannot be processed immediately

 

  crsctl delete serverpool {<spName> [...]|-w <filter>} [-i]

where

    spName [...]    One or more server pool names to be deleted

    -w              Serverpool filter (e.g., "NAME = pool1")

    -i              Fail if request cannot be processed immediately

 

  crsctl delete crs administrator -u <user_name> [-f]

where

    user_name       User name to be deleted from the admin list or "*"

    -f              Override user name validity check

 

  crsctl delete css votedisk {<vdiskGUID>[...]|<vdisk>[...]|+<diskgroup>}

where

    vdiskGUID [...]     One or more blank-separated voting file GUIDs

    vdisk [...]         One or more blank-separated voting file paths

    diskgroup           The name of a diskgroup containing voting files;

                        allowed only when clusterware is in exclusive mode

 

  crsctl delete node -n <nodename>

where

    nodename     Node to be deleted

 

  crsctl delete credentials -target <target> [-path <path>] [-id <ID>] [-local]

where

    target    Target listed by 'crsctl query credentials targetlist'

    path      Path, relative to the target, of a credentials domain

    ID        Credential member ID to delete

    -local    Delete credential information from OLR rather than OCR

6.1    crsctl delete resource {<resName> [...]|-w <filter>} [-f] [-i]

6.2    crsctl delete type {<typeName> [...]|-w <filter>} [-i]

6.3    crsctl delete wallet -type <wallet_type> [-name <name>] [-user <user_name>]

6.4    crsctl delete category {<categoryName> [...]|-w <filter>} [-i]

6.5    crsctl delete serverpool {<spName> [...]|-w <filter>} [-i]

6.6    crsctl delete crs administrator -u <user_name> [-f]

6.7    crsctl delete css votedisk {<vdiskGUID>[...]|<vdisk>[...]|+<diskgroup>}

6.8    crsctl delete node -n <nodename>

6.9    crsctl delete credentials -target <target> [-path <path>] [-id <ID>] [-local]

7      crsctl disable

7.1    crsctl config crs

[root@oracle1 ~]# crsctl disable crs

CRS-4621: Oracle High Availability Services autostart is disabled.

 

 

[root@oracle1 ~]# crsctl config crs

CRS-4621: Oracle High Availability Services autostart is disabled.

 

 

 

8      crsctl discover

Usage:

  crsctl discover dhcp -clientid <clientid> [-port <port>] [-subnet <subnet>]

     Discover DHCP server

where

      clientid         client ID for which discovery will be attempted

      port             The port on which the discovery packets will be sent

      subnet           The subnet on which DHCP discover packets will be sent

8.1      crsctl discover dhcp -clientid <clientid> [-port <port>] [-subnet <subnet>]

 

9      crsctl enable

9.1    crsctl enable crs

[root@oracle1 ~]# crsctl enable crs

CRS-4622: Oracle High Availability Services autostart is enabled.

10    crsctl eval

评估执行的可行性

 

 [root@oracle1 ~]# crsctl eval

Usage:

  crsctl eval start resource {<resname>|-w <filter>}[-n server] [-f]

    Evaluate start of specified resources

 

where

     resname        Name of a resource

     -w             Resource filter

     -n             Server Name

     -f             Evaluate as with force option

 

 

  crsctl eval stop resource {<resname>|-w <filter>} [-f]

    Evaluate stop of specified resources

 

where

     resname        Name of a resource

     -w             Resource filter

     -f             Evaluate as with force option

 

 

  crsctl eval relocate resource {<resName> | {<resName>|-all} -s <server> | -w <filter>} {-n <server>} [-f]

    Evaluate relocate of specified resource

 

 

where

     resName        Name of a resource

     -all           Relocate all resources

     -s             Source server

     -w             Resource filter (e.g., "TYPE = ora.database.type")

     -n             Destination server

     -f             Evaluate as with force option

 

 

  crsctl eval add serverpool <spName> [-file <filePath> | -attr  "<attrName>=<value>[,...]"] [-f] [-admin [-l <level>] [-x] [-a]]

    Evaluate addition of specified serverpool

 

where

     spName         Name of the serverpool

     -file          File containing attributes

     -attr          Attributes for the serverpool

     -f             Evaluate as with force option

     -admin         Cluster Administrator view

     level          Output display level ('serverpools' for server pools, 'resources' for resources or 'all' for all)

     -x             Show differences only

     -a             Show all resources

 

 

  crsctl eval modify serverpool <spName> {-file <filePath> | -attr  "<attrName>=<value>[,...]"} [-f] [-admin [-l <level>] [-x] [-a]]

    Evaluate modification of specified serverpool

 

where

     spName         Name of the serverpool

     -file          File containing attributes

     -attr          Attributes for the serverpool

     -f             Evaluate as with force option

     -admin         Cluster Administrator view

     level          Output display level ('serverpools' for server pools, 'resources' for resources or 'all' for all)

     -x             Show differences only

     -a             Show all resources

 

 

  crsctl eval delete serverpool <spName>  [-admin [-l <level>] [-x] [-a]]

    Evaluate deletion of specified server pool

 

where

     spName         Name of the server pool

     -admin         Cluster Administrator view

     level          Output display level ('serverpools' for server pools, 'resources' for resources or 'all' for all)

     -x             Show differences only

     -a             Show all resources

 

 

  crsctl eval add server <serverName> [-file <filePath> | -attr  "<attrName>=<value>[,...]"] [-admin [-l <level>] [-x] [-a]]

    Evaluate addition of server

 

where

     serverName     Name of the server

     -file          File containing attributes

     -attr          Attributes for the server

     -admin         Cluster Administrator view

     level          Output display level ('serverpools' for server pools, 'resources' for resources or 'all' for all)

     -x             Show differences only

     -a             Show all resources

 

 

  crsctl eval relocate server <serverName> -to <toPool> [-f] [-admin [-l <level>] [-x] [-a]]

    Evaluate relocation of specified server

 

where

     serverName     Name of the server

     -admin         Cluster Administrator view

     level          Output display level ('serverpools' for server pools, 'resources' for resources or 'all' for all)

     -x             Show differences only

     -a             Show all resources

     toPool         ServerPool to add the server to

 

 

  crsctl eval delete server <serverName> [-admin [-l <level>] [-x] [-a]]

    Evaluate deletion of specified server

 

where

     serverName     Name of the server

     -admin         Cluster Administrator view

     level          Output display level ('serverpools' for server pools, 'resources' for resources or 'all' for all)

     -x             Show differences only

     -a             Show all resources

 

 

  crsctl eval add resource <resName> -type <typeName> [-file <filePath> | -attr  "<attrName>=<value>[,...]"]  [-f]

    Evaluate add of specified resource

 

where

     resName         Name of the resource

     type            Resource type

     attrName        Attribute name

     value           Attribute value

     -f              Evaluate as with force option

 

 

  crsctl eval modify resource <resName> -attr "<attrName>=<value>[,...]" [-f]

    Evaluate modification of specified resource

 

where

     resName         Name of the resource

     attrName        Attribute name

     value           Attribute value

     -f              Evaluate as with force option

 

 

  crsctl eval fail resource {<resname> | -w <filter>} [-n <server>] [-env "<attr>=<val>[,...]"]

    Evaluate failure of specified resource

 

where

     resName         Name of the resource

     filter          Resource filter

     server          Server Name

     -env            Attribute overrides for this command

 

 

  crsctl eval activate policy <policyName> [-f] [-admin {[-l <level>]|[-x]|[-a]}]

    Evaluate activation of specified policy

 

where

     policyName     Name of policy

     -f             Evaluate as with force option

     -admin         Cluster Administrator view

     level          Output display level ('serverpools' for server pools, 'resources' for resources or 'all' for all)

     -x             Show differences only

     -a             Show all resources

10.1    crsctl eval start resource {<resname>|-w <filter>}[-n server] [-f]

10.2    crsctl eval stop resource {<resname>|-w <filter>} [-f]

10.3    crsctl eval relocate resource {<resName> | {<resName>|-all} -s <server> | -w <filter>} {-n <server>} [-f]

10.4    crsctl eval add serverpool <spName> [-file <filePath> | -attr  "<attrName>=<value>[,...]"] [-f] [-admin [-l <level>] [-x] [-a]]

10.5    crsctl eval modify serverpool <spName> {-file <filePath> | -attr  "<attrName>=<value>[,...]"} [-f] [-admin [-l <level>] [-x] [-a]]

10.6    crsctl eval delete serverpool <spName>  [-admin [-l <level>] [-x] [-a]]

10.7    crsctl eval add server <serverName> [-file <filePath> | -attr  "<attrName>=<value>[,...]"] [-admin [-l <level>] [-x] [-a]]

10.8    crsctl eval relocate server <serverName> -to <toPool> [-f] [-admin [-l <level>] [-x] [-a]]

10.9    crsctl eval delete server <serverName> [-admin [-l <level>] [-x] [-a]]

10.10   crsctl eval add resource <resName> -type <typeName> [-file <filePath> | -attr  "<attrName>=<value>[,...]"]  [-f]

10.11   crsctl eval modify resource <resName> -attr "<attrName>=<value>[,...]" [-f]

10.12   crsctl eval fail resource {<resname> | -w <filter>} [-n <server>] [-env "<attr>=<val>[,...]"]

10.13   crsctl eval activate policy <policyName> [-f] [-admin {[-l <level>]|[-x]|[-a]}]

11    crsctl get

Usage:

  crsctl get {log|trace} {mdns|gpnp|css|crf|crs|ctss|evm|gipc} "<name1>,..."

    Get the log/trace levels for specific modules

 

  crsctl get log res <resname>

    Get the log level for an agent

 

  crsctl get hostname

    Displays the host name

 

  crsctl get nodename

    Displays the node name

 

  crsctl get cluster mode {config|status}

    Get the cluster mode

 

  crsctl get clientid dhcp -cluname <cluster_name> -viptype <vip_type> [-vip <VIPResName>] [-n <nodename>]

    Generate client ID's as used by RAC agents for configured cluster resources

where

    cluster_name    name of the cluster to be configured

 

    vip_type        Type of VIP resource: HOSTVIP, SCANVIP, or APPVIP

    VIPResName      User defined application VIP name (required for APPVIP vip_type)

    nodename        Node for which the client ID is required (required for HOSTVIP vip_type)

 

  crsctl get node role {config|status} [-node <nodename> | -all]

    Gets the current role of nodes in the cluster

 

  crsctl get cluster hubsize

    Gets the current configured value for the maximum number of Hub nodes in the cluster

 

  crsctl get credentials <options>

    Exports the specified credentials to an XML file

 

  crsctl get css <parameter>

    Displays the value of a Cluster Synchronization Services parameter

 

    clusterguid

    diagwait

    disktimeout

    misscount

    reboottime

    priority

    logfilesize

    leafmisscount

 

  crsctl get css ipmiaddr

    Displays the IP address of the local IPMI device as set in the Oracle registry.

 

  crsctl get {css <parameter>|hostname|nodename}

 

  crsctl get cpu equivalency

    Gets the current configured value for server attribute CPU_EQUIVALENCY

 

  crsctl get resource use

    Gets the current configured value for server attribute RESOURCE_USE_ENABLED

 

  crsctl get server label

    Gets the current configured value for server attribute SERVER_LABEL

 

 

11.1    crsctl get {log|trace} {mdns|gpnp|css|crf|crs|ctss|evm|gipc} "<name1>,..."

11.2    crsctl get log res <resname>

11.3    crsctl get hostname

 

[root@oracle1 ~]# crsctl get hostname

oracle1

11.4    crsctl get nodename

 

[root@oracle1 ~]# crsctl get nodename

oracle1

11.5    crsctl get cluster mode {config|status}

 

[root@oracle1 ~]# crsctl get cluster mode config

Cluster is configured as type "standard"

 

 

[root@oracle1 ~]# crsctl get cluster mode status

Cluster is running in "standard" mode

11.6    crsctl get clientid dhcp -cluname <cluster_name> -viptype <vip_type> [-vip <VIPResName>] [-n <nodename>]

11.7    crsctl get node role {config|status} [-node <nodename> | -all]

 

[root@oracle1 ~]# crsctl get node role config -all

Node 'oracle1' configured role is 'hub'

Node 'oracle2' configured role is 'hub'

11.8    crsctl get cluster hubsize

 

[root@oracle1 ~]# crsctl get cluster hubsize

CRS-4950: Current hubsize parameter value is 32

11.9    crsctl get credentials <options>

11.10   crsctl get css <parameter>

11.11   crsctl get css ipmiaddr

 

[root@oracle1 ~]# crsctl get css ipmiaddr

CRS-4205: Failed to open the IPMI credentials wallet. The wallet does not exist.

11.12   crsctl get {css <parameter>|hostname|nodename}

11.13   crsctl get cpu equivalency

[root@oracle1 ~]# crsctl get cpu equivalency

CRS-4963: Current cpu equivalency parameter value is 1000

11.14   crsctl get resource use

00

[root@oracle1 ~]# crsctl get resource use

CRS-4966: Current resource use parameter value is 1

11.15   crsctl get server label

 

[root@oracle1 ~]# crsctl get server label

CRS-4972: Current SERVER_LABEL parameter value is

12    crsctl getperm

Usage:

  crsctl getperm resource <resName> [-u <user_name>|-g <group_name>]

where

    resName    Get permissions for named resource

    -u         Get permissions for user name

    -g         Get permissions for group name

 

  crsctl getperm type <typeName> [-u <user_name>|-g <group_name>]

where

    typeName   Get permissions for named resource type

    -u         Get permissions for user name

    -g         Get permissions for group name

 

  crsctl getperm serverpool <spName> [-u <user_name>|-g <group_name>]

where

    spName     Get permissions for named server pool

    -u         Get permissions for user name

    -g         Get permissions for group name

 

  crsctl getperm category <categoryName> [-u <user_name>|-g <group_name>]

where

    categoryName     Get permissions for named server category

    -u               Get permissions for user name

    -g               Get permissions for group name

 

  crsctl getperm policyset [-u <user_name>|-g <group_name>]

    -u         Get permissions for user name

    -g         Get permissions for group name

13    crsctl lsmodules

Usage:

  crsctl lsmodules {mdns|gpnp|css|crf|crs|ctss|evm|gipc}

 where

   mdns  multicast Domain Name Server

   gpnp  Grid Plug-n-Play Service

   css   Cluster Synchronization Services

   crf   Cluster Health Monitor

   crs   Cluster Ready Services

   ctss  Cluster Time Synchronization Service

   evm   EventManager

   gipc  Grid Interprocess Communications

13.1  crsctl lsmodules mdns 

 

[root@oracle1 ~]# crsctl lsmodules mdns

List MDNSD Debug Module: MDNS

13.2   crsctl lsmodules gpnp 

 

[root@oracle1 ~]# crsctl lsmodules gpnp

List GPNPD Debug Module: CLSINET

List GPNPD Debug Module: CLSNS

List GPNPD Debug Module: CLSXSEC

List GPNPD Debug Module: CLSXSIG

List GPNPD Debug Module: GIPC

List GPNPD Debug Module: GPNP

List GPNPD Debug Module: OCRAPI

List GPNPD Debug Module: OCRCLI

List GPNPD Debug Module: OCRMSG

List GPNPD Debug Module: RD

13.3   crsctl lsmodules css 

 

[root@oracle1 ~]# crsctl lsmodules css

List CSSD Debug Module: CLSF

List CSSD Debug Module: CLSFA

List CSSD Debug Module: CLSINET

List CSSD Debug Module: CSSD

List CSSD Debug Module: CSSDBCM

List CSSD Debug Module: CSSDBCMC

List CSSD Debug Module: CSSDGMCC

List CSSD Debug Module: CSSDGMPC

List CSSD Debug Module: CSSDNMC

List CSSD Debug Module: GPNP

List CSSD Debug Module: SKGFD

13.4   crsctl lsmodules crf  

 

[root@oracle1 ~]# crsctl lsmodules crf

List MOND Debug Module: CLSINET

List MOND Debug Module: CRFCLI

List MOND Debug Module: CRFLDREP

List MOND Debug Module: CRFLOGD

List MOND Debug Module: CRFM

List MOND Debug Module: CRFMOND

List MOND Debug Module: CRFPROXY

List MOND Debug Module: CSSCLNT

List MOND Debug Module: OCLUMON

List MOND Debug Module: OCRAPI

List MOND Debug Module: OCRCLI

List MOND Debug Module: OCRMSG

13.5   crsctl lsmodules crs  

 

[root@oracle1 ~]# crsctl lsmodules crs

List CRSD Debug Module: AGENT

List CRSD Debug Module: AGFW

List CRSD Debug Module: CLSCEVT

List CRSD Debug Module: CLSFRAME

List CRSD Debug Module: CLSINET

List CRSD Debug Module: CLSO

List CRSD Debug Module: CLSVER

List CRSD Debug Module: CLUCLS

List CRSD Debug Module: COMMCRS

List CRSD Debug Module: COMMNS

List CRSD Debug Module: CRSAPP

List CRSD Debug Module: CRSCCL

List CRSD Debug Module: CRSCEVT

List CRSD Debug Module: CRSCOMM

List CRSD Debug Module: CRSD

List CRSD Debug Module: CRSEVT

List CRSD Debug Module: CRSMAIN

List CRSD Debug Module: CRSOCR

List CRSD Debug Module: CRSPE

List CRSD Debug Module: CRSPLACE

List CRSD Debug Module: CRSRES

List CRSD Debug Module: CRSRPT

List CRSD Debug Module: CRSRTI

List CRSD Debug Module: CRSSE

List CRSD Debug Module: CRSSEC

List CRSD Debug Module: CRSTIMER

List CRSD Debug Module: CRSUI

List CRSD Debug Module: CSSCLNT

List CRSD Debug Module: OCRAPI

List CRSD Debug Module: OCRASM

List CRSD Debug Module: OCRCAC

List CRSD Debug Module: OCRCLI

List CRSD Debug Module: OCRMAS

List CRSD Debug Module: OCRMSG

List CRSD Debug Module: OCROSD

List CRSD Debug Module: OCRRAW

List CRSD Debug Module: OCRSRV

List CRSD Debug Module: OCRUTL

List CRSD Debug Module: SuiteTes

List CRSD Debug Module: UiServer

13.6   crsctl lsmodules ctss 

 

[root@oracle1 ~]# crsctl lsmodules ctss

List CTSSD Debug Module: CLSINET

List CTSSD Debug Module: CLUCLS

List CTSSD Debug Module: CRSCCL

List CTSSD Debug Module: CSSCLNT

List CTSSD Debug Module: CTSS

List CTSSD Debug Module: OCRAPI

List CTSSD Debug Module: OCRCLI

List CTSSD Debug Module: OCRMSG

13.7   crsctl lsmodules evm 

 

[root@oracle1 ~]# crsctl lsmodules evm

List EVMD Debug Module: CLSVER

List EVMD Debug Module: CLUCLS

List EVMD Debug Module: COMMCRS

List EVMD Debug Module: COMMNS

List EVMD Debug Module: CRSCCL

List EVMD Debug Module: CRSOCR

List EVMD Debug Module: CSSCLNT

List EVMD Debug Module: EVMAGENT

List EVMD Debug Module: EVMAPP

List EVMD Debug Module: EVMCOMM

List EVMD Debug Module: EVMD

List EVMD Debug Module: EVMEVT

List EVMD Debug Module: EVMMAIN

List EVMD Debug Module: OCRAPI

List EVMD Debug Module: OCRCLI

List EVMD Debug Module: OCRMSG

13.8  crsctl lsmodules gipc 

 

[root@oracle1 ~]# crsctl lsmodules gipc

List GIPCD Debug Module: CLNTCOMM

List GIPCD Debug Module: CLSINET

List GIPCD Debug Module: GIPCD

List GIPCD Debug Module: GIPCDCLT

List GIPCD Debug Module: GIPCDMON

List GIPCD Debug Module: GIPCDNDE

List GIPCD Debug Module: MONTCOMM

List GIPCD Debug Module: NODECOMM

14    crsctl modify

Usage:

  crsctl modify {resource|type|serverpool|policy|policyset} <name> <options>

where

    name         Name of the CRS entity

    options      Options to be passed to the modify command

 

    See individual CRS entity help for more details

 

  crsctl modify wallet -type <wallet_type> <options>

where

    wallet_type   Type of wallet i.e. , APPQOSADMIN, APPQOSUSER, APPQOSDB, MGMTDB, OSUSER or CVUDB.

    options       Options to be passed to the modify command

 

  crsctl modify policyset {-attr "<attrName>=<value>[,...]" | -file <fileName>} [-ksp] [-f]

where

    attrName   Name of the policy set attribute, e.g. SERVER_POOL_NAMES, etc.

    value      Value of the attribute

    fileName   Name of text file containing policy set definition

    -ksp       Keep server pools in the system

    -f         Force option

 

  crsctl modify category <categoryName> -attr "<attrName>=<value>[,...]" [-f] [-i]

where

    categoryName Name of server category to be modified

    attrName     Attribute name

    value        Attribute value

    -f           Force option

    -i           Fail if request cannot be processed immediately

 

14.1    crsctl modify {resource|type|serverpool|policy|policyset} <name> <options>

14.2    crsctl modify wallet -type <wallet_type> <options>

14.3    crsctl modify policyset {-attr "<attrName>=<value>[,...]" | -file <fileName>} [-ksp] [-f]

14.4    crsctl modify category <categoryName> -attr "<attrName>=<value>[,...]" [-f] [-i]

15    crsctl pin

Use the crsctl pin css command to pin many specific nodes. Pinning a node means that the association of a node name with a node number is fixed. If a node is not pinned, its node number may change if the lease expires while it is down. The lease of a pinned node never expires.

 

 

[root@oracle1 ~]# crsctl pin

Usage:

  crsctl pin css -n <node1>[...]

 Pin the nodes (make leases non-expiring).

 

16    crsctl query

 

[root@oracle1 ~]# crsctl query

Usage:

  crsctl query crs administrator

     Display admin list

 

  crsctl query crs autostart

    Gets the value of automatic start delay and server count

 

  crsctl query crs activeversion [-f]

     Lists the Oracle Clusterware operating version

where

     -f              List the cluster state and active patch level

 

  crsctl query crs releaseversion

     Lists the Oracle Clusterware release version

 

  crsctl query crs softwareversion [<nodename>| -all]

     Lists the version of Oracle Clusterware software installed

where

     Default         List software version of the local node

     nodename        List software version of named node

     -all            List software version for all the nodes in the cluster

 

  crsctl query crs releasepatch

     Lists the Oracle Clusterware release patch level

 

  crsctl query crs softwarepatch [<host>]

     Lists the patch level of Oracle Clusterware software installed

where

     Default         List software patch level of the local host

     host            List software path level of the named host

 

  crsctl query css ipmiconfig

     Checks whether Oracle Clusterware has been configured for IPMI

 

  crsctl query css ipmidevice

     Checks whether the IPMI device/driver is present

 

  crsctl query css votedisk

     Lists the voting files used by Cluster Synchronization Services

 

  crsctl query wallet -type <wallet_type> [-name <name>] [-user <user_name> | -all]

     Check if the designated wallet or user exists

where

     wallet_type     Type of wallet i.e. APPQOSADMIN, APPQOSUSER, APPQOSDB, MGMTDB, OSUSER or CVUDB.

     name            Name is required for APPQOSDB and CVUDB wallets.

     user_name       User to be queried from wallet.

     all             List all users in wallet

 

  crsctl query dns -servers

     Lists the system configured DNS server, search paths, attempt and timeout values

 

  crsctl query dns -name <name> [-dnsserver <DNS_server_address>] [-port <port>] [-attempts <attempts>] [-timeout <timeout>] [-v]

    Returns a list of addresses returned by DNS lookup of the name with the specified DNS server

Where

    name                Fully qualified domain name to lookup

    DNS_server_address  Address of the DNS server on which name needs to be looked up

    port                Port on which DNS server is listening

    attempts            Number of retry attempts

    timeout             Timeout in seconds

 

  crsctl query socket udp [-address <address>] [-port <port>]

     Verifies that a daemon can listen on specified address and port

Where

       address             IP address on which socket needs to be created

       port                port on which socket needs to be created

 

  crsctl query credentials targetlist

     Lists the valid credentials targets to be used with credentials commands

 

  crsctl query credentials -target <target>

     Lists the valid credentials under a specific target

16.1    crsctl query crs administrator

16.2    crsctl query crs autostart

16.3    crsctl query crs activeversion [-f]

16.4    crsctl query crs releaseversion

16.5    crsctl query crs softwareversion [<nodename>| -all]

16.6    crsctl query crs releasepatch

16.7    crsctl query crs softwarepatch [<host>]

16.8    crsctl query css ipmiconfig

16.9    crsctl query css ipmidevice

16.10   crsctl query css votedisk

16.11   crsctl query wallet -type <wallet_type> [-name <name>] [-user <user_name> | -all]

16.12   crsctl query dns -servers

16.13   crsctl query dns -name <name> [-dnsserver <DNS_server_address>] [-port <port>] [-attempts <attempts>] [-timeout <timeout>] [-v]

16.14   crsctl query socket udp [-address <address>] [-port <port>]

16.15   crsctl query credentials targetlist

16.16   crsctl query credentials -target <target>

 

[root@oracle1 ~]#   crsctl query crs administrator

  crsctl query crs autostart

  crsctl query crs activeversion

  crsctl query crs releaseversion

  crsctl query crs softwareversion -all

  crsctl query crs releasepatch

  crsctl query crs softwarepatch oracle1

  crsctl query css ipmiconfig

  crsctl query css ipmidevice

  crsctl query css votedisk

  crsctl query dns -servers

  crsctl query dns -name oracle1.rac.occ -dnsserver 192.168.10.254

  crsctl query socket udp

  crsctl query credentials targetlistCRS Administrator List: grid root

[root@oracle1 ~]#   crsctl query crs autostart

'Autostart delay':       0

'Autostart servercount': 1

[root@oracle1 ~]#   crsctl query crs activeversion

Oracle Clusterware active version on the cluster is [12.1.0.2.0]

[root@oracle1 ~]#   crsctl query crs releaseversion

Oracle High Availability Services release version on the local node is [12.1.0.2.0]

[root@oracle1 ~]#   crsctl query crs softwareversion -all

Oracle Clusterware version on node [oracle1] is [12.1.0.2.0]

Oracle Clusterware version on node [oracle2] is [12.1.0.2.0]

[root@oracle1 ~]#   crsctl query crs releasepatch

Oracle Clusterware release patch level is [0] and no patches have been applied on the local node.

[root@oracle1 ~]#   crsctl query crs softwarepatch oracle1

Oracle Clusterware patch level on node oracle1 is [0].

[root@oracle1 ~]#   crsctl query css ipmiconfig

CRS-4237: Oracle Clusterware is not fully configured to use IPMI

[root@oracle1 ~]#   crsctl query css ipmidevice

CRS-4218: Unable to access an IPMI device on this system

[root@oracle1 ~]#   crsctl query css votedisk

##  STATE    File Universal Id                File Name Disk group

--  -----    -----------------                --------- ---------

 1. ONLINE   d2643c711c754f82bfa4df1bc9de1773 (/dev/oracleasm/disks/DISK01) [DATA]

Located 1 voting disk(s).

[root@oracle1 ~]#   crsctl query dns -servers

CRS-10018: the following configuration was found on the system:

CRS-10019: There are 1 domains in search order. They are:

rac.occ

CRS-10022: There are 1 name servers. They are:

192.168.10.254

CRS-10020: number of retry attempts for name lookup is: 4

CRS-10021: timeout for each name lookup is: 5

[root@oracle1 ~]#   crsctl query dns -name oracle1.rac.occ -dnsserver 192.168.10.254

CRS-10024: DNS server returned oracle1.rac.occ for name oracle1.rac.occ

[root@oracle1 ~]#   crsctl query socket udp

CRS-10026: successfully created socket on port 53 on local node

[root@oracle1 ~]#   crsctl query credentials targetlist

Target                        Credtype

 

 

 

[root@oracle1 ~]#

17    crsctl release

[root@oracle1 ~]# crsctl release

Usage:

  crsctl release dhcp -clientid <clientid> [-port <port>] [-subnet <subnet>]

     Release DHCP lease for the client ID specified

where

      clientid         client ID for which DHCP lease release request will be attempted

      port             The port on which the DHCP lease release packets will be sent

      subnet           The subnet on which DHCP release lease packets will be sent

 

 

18    crsctl relocate

 

[root@oracle1 ~]# crsctl relocate

Usage:

  crsctl relocate resource {<resName> [-k <cid>]| -all|-w <filter>} -s <server> [-n <server>] [-env "env1=val1,env2=val2,..."] [-f] [-i]

     Relocate designated resources

where

     resName        Resource named resource

     -all           Relocate all resources

     -s             Source server

     -w             Resource filter (e.g., "TYPE = ora.database.type")

     -n             Destination server

     -k             Cardinality ID

     -env           Attribute overrides for this command

     -f             Force option

     -i             Fail if request cannot be processed immediately

 

  crsctl relocate server <server> [...] -c <spName> [-f] [-i]

     Relocate designated servers

where

     server [...]   One or more blank-separated server names

     -c             Destination server pool name

     -f             Force option

     -i             Fail if request cannot be processed immediately

19    crsctl replace

 

[root@oracle1 ~]# crsctl replace

Usage:

  crsctl replace {discoverystring "<ds_string>"| votedisk [<+diskgroup>|<vdisk> ... <vdisk>]}

where

    ds_string   comma-separated voting file paths without spaces and enclosed in double quotation marks

    diskgroup   disk group where the voting files will be located in ASM

    vdisk       location of the voting files outside of ASM separated by space

20    crsctl request

 

[root@oracle1 ~]# crsctl request

Usage:

  crsctl request dhcp -clientid <clientid> [-port <port>] [-subnet <subnet>]

     Request DHCP lease for the client ID specified

where

      clientid         client ID for which DHCP lease request will be attempted

      port             The port on which the DHCP lease request packets will be sent

      subnet           The subnet on which DHCP lease request packets will be sent

 

 crsctl request action <actionName> {-r <resName>[...]|-w <filter>} [-env] [-i]

     Request the specified action

where

      actionName       Action to be requested

      resName [...]    One or more blank-separated resource names

      -w               Resource filter

      -env             Attribute overrides for this command

      -i               Fail if request cannot be processed immediately

21    crsctl set

 

[root@oracle1 ~]# crsctl set

Usage:

  crsctl set crs activeversion [<version>] [-force]

    Sets the Oracle Clusterware operating version

 

  crsctl set {log|trace} {mdns|gpnp|css|crf|crs|ctss|evm|gipc} "<name1>=<lvl1>,..."

    Set the log/trace levels for specific modules within daemons

 

  crsctl set log res <resname>=<lvl>

    Set the log levels for agents

 

  crsctl set css <parameter> <value>

    Sets the value of a Cluster Synchronization Services parameter

 

  crsctl set css {ipmiaddr|ipmiadmin} <value>

    Sets IPMI configuration data in the Oracle registry

 

  crsctl set css votedisk asm <diskgroup>[...]

    Defines the set of voting disks to be used by CRS

 

  crsctl set crs autostart [delay <delayTime>] [servercount <count>]

    Sets the Oracle Clusterware automatic resource start criteria

 

  crsctl set cluster mode flex

    Set the cluster mode

 

  crsctl set node role {hub|leaf} [-node <nodename>]

    Sets the configured role of the node in the cluster

 

  crsctl set cluster hubsize <value>

    Sets the configuration value for the maximum number of Hub nodes in the cluster

 

  crsctl set credentials <options>

    Imports the specified credentials from an XML file

 

  crsctl set cpu equivalency

    Sets the configuration value for server attribute CPU_EQUIVALENCY

 

  crsctl set resource use

    Sets the configuration value for server attribute RESOURCE_USE_ENABLED

 

  crsctl set server label

    Sets the configuration value for server attribute SERVER_LABEL

 

 

21.1    crsctl set crs activeversion [<version>] [-force]

21.2    crsctl set {log|trace} {mdns|gpnp|css|crf|crs|ctss|evm|gipc} "<name1>=<lvl1>,..."

21.3    crsctl set log res <resname>=<lvl>

21.4    crsctl set css <parameter> <value>

21.5    crsctl set css {ipmiaddr|ipmiadmin} <value>

21.6    crsctl set css votedisk asm <diskgroup>[...]

21.7    crsctl set crs autostart [delay <delayTime>] [servercount <count>]

21.8    crsctl set cluster mode flex

21.9    crsctl set node role {hub|leaf} [-node <nodename>]

21.10   crsctl set cluster hubsize <value>

21.11   crsctl set credentials <options>

21.12   crsctl set cpu equivalency

21.13   crsctl set resource use

21.14   crsctl set server label

22    crsctl setperm

 

[root@oracle1 ~]# crsctl setperm

Usage:

  crsctl setperm {resource|type|serverpool|category|policyset} <name> {-u <aclstring>|-x <aclstring>|-o <user_name>|-g <group_name>}

where

     -u           Update entity ACL

     -x           Delete entity ACL

     -o           Change entity owner

     -g           Change entity primary group

 

   ACL (Access Control List) string:

 

   { user:<user_name>[:<readPerm><writePerm><execPerm>]   |

     group:<group_name>[:<readPerm><writePerm><execPerm>] |

     other[::<readPerm><writePerm><execPerm>] }

where

   user         User ACL

   group        Group ACL

   other        Other ACL

   readPerm     Read permission ("r" grants, "-" forbids)

   writePerm    Write permission ("w" grants, "-" forbids)

   execPerm     Execute permission ("x" grants, "-" forbids)

 

 

 

23    crsctl start

 

[root@oracle1 ~]# crsctl start

Usage:

  crsctl start resource {<resName> [...]|-w <filter>]|-all} [-n <server> | -s <server_pools>] [-k <cid>] [-d <did>] [-env "env1=val1,env2=val2,..."] [-begin|-end] [-f] [-i] [-l]

     Start designated resources

where

     resName [...]    One or more blank-separated resource names

     -w               Resource filter (e.g., "TYPE = ora.database.type")

     -all             All resources

     -n               Server name

     -k               Resource cardinality ID

     -d               Resource degree ID

     -env             Attribute overrides for this command

     -f               Force option

     -i               Fail if request cannot be processed immediately

     -l               Leave affected resources as-is if request fails

 

     -begin           Start transparent HA action

     -end             End transparent HA action

 

     -s               Server pool names (e.g. -s  pool1 pool2)

 

 

  crsctl start crs [-excl [-nocrs] [-cssonly]] | [-wait | -waithas | -nowait] | [-noautostart]

     Start OHAS on this server

where

     -excl        Start Oracle Clusterware in exclusive mode

     -nocrs       Start Oracle Clusterware in exclusive mode without starting CRS

     -nowait      Do not wait for OHAS to start

     -wait        Wait until startup is complete and display all progress and status messages

     -waithas     Wait until startup is complete and display OHASD progress and status messages

     -cssonly     Start only CSS

     -noautostart Start only OHAS

 

  crsctl start cluster [[-all]|[-n <server>[...]]]

    Start CRS stack

where

    Default         Start local server

    -all            Start all servers

    -n              Start named servers

    server [...]    One or more blank-separated server names

 

 

 

  crsctl start rollingpatch

    Transition Oracle Clusterware and Oracle ASM to rolling patch mode

 

 

 

  crsctl start rollingupgrade <version>

    Transition Oracle Clusterware and Oracle ASM to rolling upgrade mode

 

 

 

  crsctl start ip -A {<IP_name>|<IP_address>}/<net_mask>/<interface_name>

    Start an IP on the given interface with specified net mask

Where

    IP_name              Name which resolves to an IP. If it is not a fully qualified domain name then standard name search will be used.

    IP_address           IP address

    net_mask             Subnet mask for the IP to start

    interface_name       Interface on which to start the IP

 

  crsctl start testdns [-address <IP_address>] [-port <port>][-domain <GNS_domain>] [-once][-v]

    Start a test DNS listener that listens on the given address at the given port and for specified domain

Where

    IP_address          IP address to be used by the listener (defaults to hostname)

    port                The port on which the listener will listen. Default value is 53.

    domain              The domain query for which to listen. By default, all domain queries are processed.

 

    -once               Flag indicating that DNS listener should exit after one DNS query packet is received

    -v                  Verbose output

 

 

23.1    crsctl start resource {<resName> [...]|-w <filter>]|-all} [-n <server> | -s <server_pools>] [-k <cid>] [-d <did>] [-env "env1=val1,env2=val2,..."] [-begin|-end] [-f] [-i] [-l]

23.2    crsctl start crs [-excl [-nocrs] [-cssonly]] | [-wait | -waithas | -nowait] | [-noautostart]

23.3    crsctl start cluster [[-all]|[-n <server>[...]]]

 

[root@oracle1 ~]# crsctl start cluster -all

CRS-4690: Oracle Clusterware is already running on 'oracle1'

CRS-4690: Oracle Clusterware is already running on 'oracle2'

CRS-4000: Command Start failed, or completed with errors.

23.4    crsctl start rollingpatch

23.5    crsctl start rollingupgrade <version>

23.6    crsctl start ip -A {<IP_name>|<IP_address>}/<net_mask>/<interface_name>

23.7    crsctl start testdns [-address <IP_address>] [-port <port>][-domain <GNS_domain>] [-once][-v]

24    crsctl status

用法

crsctl status {resource|type|serverpool|server} [<name>|-w <filter>] [-g]

where

    name   CRS entity name

    -w     CRS entity filter

    -g     Check if CRS entities are registered

 

  crsctl status ip -A {<IP_name>|<IP_address>}

     Check if the IP is alive

Where

     IP_name        Name which resolves to an IP. If name is not fully qualified domain name then standard name search will be used.

     IP_address     IP address

 

  crsctl status testdns [-address <IP_address>] [-port <port>] [-v]

     Check status of DNS server for specified domain

Where

     IP_address          DNS server address (defaults to hostname)

     port                The port on which the DNS server is listening. Default value for the port is 53.

     -v                  Verbose output

 

  crsctl status category [<categoryName>[...] | -w <filter> | -server <serverName>]

     Check status of designated server categories

where

     categoryName [...] One or more blank-separated category names

     -w                 Server Category filter

     -server            Used to list all the categories that a particular server matches

 

  crsctl status policyset [-file <fileName>]

     Show the current policies in the policy set

where

     fileName   Name with which to create a text file that can be used with the 'crsctl modify policyset -file' command

 

  crsctl status policy [<policy_name>[...] | -w <filter> | -active]

     Check status of designated policies

where

     policy_name [...]  One or more blank-separated policy names

     -w                 Policy filter

     -active            Used to display the active policy

24.1  crsctl status ip

[root@oracle1 ~]#  crsctl status ip -A 192.168.10.101

CRS-10003: IP address 192.168.10.101 could be reached from current node

[root@oracle1 ~]#  crsctl status ip -A 192.168.10.102

CRS-10003: IP address 192.168.10.102 could be reached from current node

[root@oracle1 ~]#  crsctl status ip -A 192.168.10.103

^[[ACRS-10004: unable to reach 192.168.10.103 address from local node

CRS-4000: Command Status failed, or completed with errors.

 

 

 

[root@oracle1 ~]#  crsctl status ip -A oracle1

CRS-10003: IP address 192.168.10.101 could be reached from current node

[root@oracle1 ~]#  crsctl status ip -A oracle2

CRS-10003: IP address 192.168.10.102 could be reached from current node

[root@oracle1 ~]#  crsctl status ip -A oracle1-vip

CRS-10003: IP address 192.168.10.111 could be reached from current node

[root@oracle1 ~]#  crsctl status ip -A oracle2-vip

CRS-10003: IP address 192.168.10.112 could be reached from current node

[root@oracle1 ~]#  crsctl status ip -A oracle-scan

CRS-10003: IP address 192.168.10.6 could be reached from current node

 

[root@oracle1 ~]#  crsctl status ip -A oracle1-private

CRS-10003: IP address 192.168.100.101 could be reached from current node

[root@oracle1 ~]#  crsctl status ip -A oracle2-private

CRS-10003: IP address 192.168.100.102 could be reached from current node

 

 

——————————

24.2  crsctl status testdns

 

[root@oracle1 ~]# crsctl status testdns -address dns.rac.occ -port 53

 

——————————

24.3  crsctl status category

[root@oracle1 ~]# crsctl status category

NAME=ora.hub.category

ACL=owner:root:rwx,pgrp:root:r-x,other::r--

ACTIVE_CSS_ROLE=hub

EXPRESSION=

 

NAME=ora.leaf.category

ACL=owner:root:rwx,pgrp:root:r-x,other::r--

ACTIVE_CSS_ROLE=leaf

EXPRESSION=

——————————

 

 

24.4  crsctl status policyset

 

 

[root@oracle1 ~]# crsctl status policyset

ACL=owner:grid:rwx,pgrp:oinstall:rwx,other::r--

LAST_ACTIVATED_POLICY=

SERVER_POOL_NAMES=Free

POLICY

  NAME=Current

  DESCRIPTION=This policy is built-in and managed automatically to reflect current configuration

  SERVERPOOL

    NAME=Free

    IMPORTANCE=0

    MAX_SIZE=-1

    MIN_SIZE=0

    SERVER_CATEGORY=

    SERVER_NAMES=

  SERVERPOOL

    NAME=Generic

    IMPORTANCE=0

    MAX_SIZE=-1

    MIN_SIZE=0

    SERVER_CATEGORY=

    SERVER_NAMES=

 

——————————

 

 

25    crsctl stop

 

[root@oracle1 ~]# crsctl stop

Usage:

  crsctl stop resource {<resName>[...]|-w <filter>|-all} [-n <server> | -s <server_pools>] [-k <cid>] [-d <did>] [-env "env1=val1,env2=val2,..."] [-begin|-end] [-f] [-i] [-l]

     Stop designated resources

where

     resName [...]    One or more blank-separated resource names

     -w               Resource filter (e.g., "TYPE = ora.database.type")

     -all             All resources

     -n               Server name

     -k               Resource cardinality ID

     -d               Resource degree ID

     -env             Attribute overrides for this command

     -f               Force option

     -i               Fail if request cannot be processed immediately

     -l               Leave affected resources as-is if request fails

     -begin           Start transparent HA action

     -end             End transparent HA action

     -s               Server pool names (e.g. -s  pool1 pool2)

 

  crsctl stop crs [-f]

    Stop OHAS on this server

where

    -f              Force option

 

  crsctl stop cluster [[-all]|[-n <server>[...]]] [-f]

    Stop CRS stack

where

    Default         Stop local server

    -all            Stop all servers

    -n              Stop named servers

    server [...]    One or more blank-separated server names

    -f              Force option

 

  crsctl stop rollingpatch

    Transition Oracle Clusterware and Oracle ASM out of rolling patch mode

 

  crsctl stop ip -A {<IP_name>|<IP_address>}/<interface_name>

     Stop the designated IP address

Where

     IP_name              Name which resolves to an IP. If it is not fully qualified domain name then standard name search will be performed

     IP_address           IP address

     interface_name       Interface on which IP was started

 

  crsctl stop testdns [-address <IP_address>] [-port <port>] [-v]

    Stop the test DNS listener that listens on the given address and at the given port

Where

    IP_address          IP address on which testdns was started (defaults to hostname)

    -port               The port on which the listener is listening. Default value for the port is 53.

    -v                  Verbose output

25.1    crsctl stop resource {<resName>[...]|-w <filter>|-all} [-n <server> | -s <server_pools>] [-k <cid>] [-d <did>] [-env "env1=val1,env2=val2,..."] [-begin|-end] [-f] [-i] [-l]

25.2    crsctl stop crs [-f]

25.3    crsctl stop cluster [[-all]|[-n <server>[...]]] [-f]

25.4    crsctl stop rollingpatch

25.5    crsctl stop ip -A {<IP_name>|<IP_address>}/<interface_name>

25.6    crsctl stop testdns [-address <IP_address>] [-port <port>] [-v]

26    crsctl unpin

 

[root@oracle1 ~]# crsctl unpin

Usage:

  crsctl unpin css -n <node1>[...]

 Unpin the nodes (allow leases to expire).

27    crsctl unset

 

[root@oracle1 ~]# crsctl unset

Usage:

  crsctl unset css <parameter>

    Unsets the value of a Cluster Synchronization Services parameter, restoring its default value

 

    diagwait

    disktimeout

    misscount

    reboottime

    priority

    logfilesize

    leafmisscount

 

  crsctl unset css ipmiconfig

    Unsets the IPMI configuration and deletes the associated Oracle Registry entries.

 

  crsctl unset cluster hubsize

    Unsets the configuration value for the maximum number of Hub nodes in the cluster