Quantcast
Channel: Oracle Database&EBS General – HELIOS BLOG
Viewing all articles
Browse latest Browse all 138

How to manage CRS and RAC services

$
0
0

In this post We will see how to check CRS related info and also how to stop/start RAC components.

Here is the my system details:

My db version : 11.2.0.4
My Operating System : Linux 7
My servers hostname : node1-node2
My database name : ORCL01
My instance name : ORCL011-ORCL012

Here is the some basic commands, for commands more details&options please review References docs

1. How to Checking CRS Status

[oracle@node1] 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

[oracle@node2] 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. How to Checking Node Status

[oracle@node1] srvctl status nodeapps

VIP node1-vip is enabled
VIP node1-vip is running on node: node1
VIP 192.168.100.101 is enabled
VIP 192.168.100.101 is running on node: node2
Network is enabled
Network is running on node: node1
Network is running on node: node2
GSD is disabled
GSD is not running on node: node1
GSD is not running on node: node2
ONS is enabled
ONS daemon is running on node: node1
ONS daemon is running on node: node2

[oracle@node2] srvctl status nodeapps

VIP node1-vip is enabled
VIP node1-vip is running on node: node1
VIP 192.168.100.101 is enabled
VIP 192.168.100.101 is running on node: node2
Network is enabled
Network is running on node: node1
Network is running on node: node2
GSD is disabled
GSD is not running on node: node1
GSD is not running on node: node2
ONS is enabled
ONS daemon is running on node: node1
ONS daemon is running on node: node2

3. How toChecking Clusterware Resource Status
[oracle@node1] crsctl status resource -t

I will not paste result because output is not clear in that page

You can use below command which is not recommended for 11g and which is depreciated

[oracle@node1] crs_stat -t
Name Type Target State Host
————————————————————
ora….DATA.dg ora….up.type ONLINE ONLINE node1
ora….ER.lsnr ora….er.type ONLINE ONLINE node1
ora….N1.lsnr ora….er.type ONLINE ONLINE node1
ora.scan2.vip ora….ip.type ONLINE ONLINE node2

4. How toOracle High Availability Services

— disable/enable Oracle HAS.
Use the “crsctl enable/disable has” command to disable automatic startup of the Oracle High Availability Services stack when the server boots up.

To can see current settings for Oracle High Availability Services stack when the server boots up, follow:

[root@node1]crsctl config has
CRS-4622: Oracle High Availability Services autostart is enabled.

or

[root@node1]cat /etc/oracle/scls_scr/node1/root/ohasdstr
enable

So as you can see my current setting is enable.If your system shown disable than :

For Disable:
[root@node1]crsctl disable has
CRS-4621: Oracle High Availability Services autostart is disabled.

[root@node1] crsctl config has
CRS-4621: Oracle High Availability Services autostart is disabled.

cat /etc/oracle/scls_scr/node1/root/ohasdstr

disable

To make it Enable:
[root@node1]crsctl enable has
CRS-4621: Oracle High Availability Services autostart is enabled.

Check new setting:

[root@node1] crsctl config has
CRS-4621: Oracle High Availability Services autostart is enabled.

[root@node1] cat /etc/oracle/scls_scr/node1/root/ohasdstr
enabl

5. How to Stop the Oracle clusterware stack

You can use below commands:

With root user:

crsctl stop crs or crsctl stop has

[root@node1]crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on ‘node1’
CRS-2673: Attempting to stop ‘ora.crsd’ on ‘node1’
CRS-2673: Attempting to stop ‘ora.gipcd’ on ‘node1’
CRS-2677: Stop of ‘ora.gipcd’ on ‘node1’ succeeded
CRS-2677: Stop of ‘ora.diskmon’ on ‘node1’ succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on ‘node1’ has completed
CRS-4133: Oracle High Availability Services has been stopped.

6. How to Start the Oracle clusterware stack

You can use below commands:

With root user:
crsctl start crs or crsctl start has

[root@node1] crsctl start crs
CRS-4123: Oracle High Availability Services has been started.

7. How to Start/Stop the Oracle Database
To start all Oracle RAC instances for a database:
[oracle@node1] $ORACLE_HOME/bin/srvctl start database -d db_name

PS: db_name is the name of the database. This command is starting all the instances

—— Stop the Oracle Database
To shut down all Oracle RAC instances for a database:

[oracle@node1] $ORACLE_HOME/bin/srvctl stop database -d db_name

PS: db_name is the name of the database. This command is starting all the instances

—- Start the Oracle Instance:

[oracle@node1] $ORACLE_HOME/bin/srvctl start instance –d db_name –i instance_name

PS: db_name is the name of the database. This command is starting all the instances

—– Stop the Oracle Instance:

[oracle@node1] $ORACLE_HOME/bin/srvctl stop instance –d db_name –i instance_name

—– Stop/Start Listener-SCAN_LISTENER

srvctl stop/start listener -n node1
srvctl stop/start listener -n node2
srvctl stop scan_listener

—– Stop ASM

srvctl stop asm [-o stop_options] [-f]
srvctl stop asm -n node1

Reference:
10gR2, 11gR1 and 11gR2 Oracle Clusterware (CRS / Grid Infrastructure) & RAC Command (crsctl, srvctl, cluvfy etc) Syntax and Reference [ID 1332452.1]
11gR2 Clusterware and Grid Home – What You Need to Know [ID 1053147.1]
http://download.oracle.com/docs/cd/E11882_01/rac.112/e16795.pdf


Viewing all articles
Browse latest Browse all 138

Trending Articles