1. Shutdown Oracle Home process accessing
database.
2. Shutdown RAC Database Instances on all nodes.
3. Shutdown All ASM instances from all nodes.
4. Shutdown Node applications running on nodes.
5. Shut down the Oracle Cluster ware or CRS.
2. Shutdown RAC Database Instances on all nodes.
3. Shutdown All ASM instances from all nodes.
4. Shutdown Node applications running on nodes.
5. Shut down the Oracle Cluster ware or CRS.
1. Shutdown Oracle Home process accessing
database:
2.
[oracle@database
~]$ emctl stop dbconsole
3.
4.
Oracle
Enterprise Manager 11g Database Control Release 11.2.0.2.0
5.
Copyright
(c) 1996, 2010 Oracle Corporation. All rights reserved.
6.
https://database.example.com:5500/em/console/aboutApplication
7.
Stopping
Oracle Enterprise Manager 11g Database Control ...
8.
...
Stopped.
9.
10.
[grid@node1
bin]$ srvctl stop listener -n
node1
11.
12.
[grid@node1
bin]$ srvctl status listener -n
node1
13.
Listener
LISTENER is enabled on node(s): node1
14.
Listener
LISTENER is not running on node(s): node1
15.
2. Shutdown RAC Database Instances on all nodes: Suppose DBA has two node RAC database,
So he has to stop all instances from all DB nodes. Here, I am taking an example
of two node RAC. First, I am checking on which server database is running and
then stopping and verify for the same.
16.
Syntax: srvctl stop database -d {databasename}
Syntax: srvctl stop database -d {databasename}
17.
[oracle@node2
~]$ srvctl status database -d
oradb
18.
Instance
oradb1 is running on node node1
19.
Instance
oradb2 is running on node node2
20.
[oracle@node2
~]$ srvctl stop database -d
oradb
21.
22.
[oracle@node2
~]$ srvctl status database -d
oradb
23.
Instance
oradb1 is not running on node node1
24.
Instance
oradb2 is not running on node node2
We just need to execute one command from any
one of the server having database and it will stop all database instances on
all servers.
If you have more than one database configured on Nodes, then Database
Administrator has to execute this command for each database.
3. Shutdown All ASM instances from all nodes: Next DBA has to shut down an ASM instance which are used to acess database, enter the following command, where node is the
name of the node where the ASM instance is running
Syntax: srvctl stop asm -n {node}
[grid@node2
oracle]# srvctl stop asm -n node1
-f
[grid@node2
oracle]# srvctl stop asm -n node2
-f
[grid@node2
oracle]# srvctl status asm -n
node1
ASM
is not running on node1
[grid@node2
oracle]# srvctl status asm -n
node2
ASM
is not running on node2
Sometimes, Database administrator face some issues in stopping
ASM instance, In that case use "-f" option to forcefully
shutdown ASM instances.
4. Shutdown
Node applications running on nodes: To stop
node applications running on a node, enter the following command, where
node is the name of the node where the applications are running
[grid@node2
oracle]# srvctl stop
nodeapps -n node1 -f
[grid@node2
oracle]# srvctl status nodeapps -n
node1
VIP
node1-vip is enabled
VIP
node1-vip is running on node: node1
Network
is enabled
Network
is running on node: node1
GSD
is disabled
GSD
is not running on node: node1
ONS
is enabled
ONS
daemon is running on node: node1
Repeat same command for all nodes one by one. If you face any
issue in stopping node applications use "-f" as
force option to stop applications.
5. Shut down the Oracle Clusterware or CRS: In this command all CRS related process will be stopped. This is the only command which needs to be executed by "root" user on all database nodes.
[root@node1
bin]# crsctl check cluster -all
**************************************************************
node1:
CRS-4537:
Cluster Ready Services is online
CRS-4529:
Cluster Synchronization Services is online
CRS-4533:
Event Manager is online
*************************************************************
node2:
CRS-4537:
Cluster Ready Services is online
CRS-4529:
Cluster Synchronization Services is online
CRS-4533:
Event Manager is online
**************************************************************
[root@node1
bin]# crsctl stop crs
CRS-2791:
Starting shutdown of Oracle High Availability Services-managed resources on
'node1'
CRS-2673:
Attempting to stop 'ora.crsd' on 'node1'
CRS-2790:
Starting shutdown of Cluster Ready Services-managed resources on 'node1'
CRS-2673:
Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'node1'
CRS-2673:
Attempting to stop 'ora.LISTENER.lsnr' on 'node1'
CRS-2673:
Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'node1'
CRS-2673:
Attempting to stop 'ora.node2.vip' on 'node1'
-------------------------------------------------
-------------------------------------------------
-------------------------------------------------
CRS-2677:
Stop of 'ora.cssd' on 'node1' succeeded
CRS-2673:
Attempting to stop 'ora.gipcd' on 'node1'
CRS-2677:
Stop of 'ora.gipcd' on 'node1' succeeded
CRS-2673:
Attempting to stop 'ora.gpnpd' on 'node1'
CRS-2677:
Stop of 'ora.gpnpd' 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.
[root@node1
bin]# crsctl check cluster -all
CRS-4639:
Could not contact Oracle High Availability Services
CRS-4000:
Command Check failed, or completed with errors.
DBA can see Now RAC is completely down. Now you can move ahead
with your patching, maintenance activity. Next let's see how to
start Oracle RAC cluster database.
How to Start Oracle Real Application Clusters Database ?
In Starting Real Application Clusters Database, We
will also follow a set of sequence. The order will be just opposite to Shutting
down the Real Application Clusters Database.
1. Start Oracle Clusterware or CRS.
2. Start Node applications running on nodes.
3. Start All ASM instances from all nodes.
4. Start RAC Database Instances on all nodes.
5. Start Oracle Home process accessing database.
1. Start Oracle Clusterware or CRS: CRS starts automatically when you start
or restart Server, but Here DBA has manually shutdown the CRS So, he has to
start it manually. This is the only command which needs to be executed by
"root" user. Database Administrator should execute this
command on all nodes.
[root@node1
bin]# crsctl start crs
CRS-4123:
Oracle High Availability Services has been started
[root@node2
bin]# crsctl check cluster -all
**************************************************************
node1:
CRS-4535:
Cannot communicate with Cluster Ready Services
CRS-4529:
Cluster Synchronization Services is online
CRS-4533:
Event Manager is online
**************************************************************
node2:
CRS-4537:
Cluster Ready Services is online
CRS-4529:
Cluster Synchronization Services is online
CRS-4533:
Event Manager is online
**************************************************************
Here, DBA can see "CRS-4639: Could not contact Oracle High Availability Services" or "CRS-4535: Cannot communicate with Cluster Ready Services" messages. Wait 5 minutes and then again check with "crsctl check cluster -all" command. This time Database administrator will get "CRS-4537: Cluster Ready Services is online". If still same issue DBA can start ora.crsd process to resolve this issue. Below is the command
[root@node1
bin]# crsctl start res ora.crsd
-init
[root@node1
bin]# crsctl check cluster -all
**************************************************************
node1:
CRS-4537:
Cluster Ready Services is online
CRS-4529:
Cluster Synchronization Services is online
CRS-4533:
Event Manager is online
**************************************************************
node2:
CRS-4537:
Cluster Ready Services is online
CRS-4529:
Cluster Synchronization Services is online
CRS-4533:
Event Manager is online
**************************************************************
Now, Cluster is up and running. DBA can also use "ps -ef | grep d.bin" to check cluster status.
2. Start Node applications running on nodes: To start node applications running on a
node, enter the following command, where node is the name of the node where the
applications are running
[grid@node1
bin]$ srvctl start nodeapps -n
node1
[grid@node1
bin]$ srvctl status nodeapps -n
node1
VIP
node1-vip is enabled
VIP
node1-vip is running on node: node1
Network
is enabled
Network
is running on node: node1
GSD
is disabled
GSD
is not running on node: node1
ONS
is enabled
ONS
daemon is running on node: node1
DBA has to execute this command for each node to start Real Application Clusters Cluster database.
3. Start All ASM instances from all nodes: Next DBA has to start all ASM instances
which are used to access database, enter the following command, where node is
the name of the node where the ASM instance has to start.
[grid@node1
bin]$ srvctl start asm -n node1
[grid@node1
bin]$ srvctl status asm -n
node1
ASM
is running on node1
DBA has to start ASM instance on all database nodes.
4. Start RAC Database Instances on all nodes: Now, We will start database instances on
database nodes to access data.
[grid@node1
bin]$ srvctl start database -d
oradb
[grid@node1
bin]$ srvctl status database -d
oradb
Instance
oradb1 is running on node node1
Instance
oradb2 is running on node node2
Now database is up and running on both DB nodes.
5. Start Oracle Home process accessing
database: let's start
listener and OEM to access database and allow users to connect to the database.
[grid@node1
bin]$ srvctl start listener -n
node1
[grid@node1
bin]$ srvctl status listener -n
node1
Listener
LISTENER is enabled on node(s): node1
Listener
LISTENER is running on node(s): node1
[oracle@database
~]$ emctl start dbconsole
Oracle
Enterprise Manager 11g Database Control Release 11.2.0.2.0
Copyright
(c) 1996, 2010 Oracle Corporation. All rights reserved.
https://database.example.com:5500/em/console/aboutApplication
Starting
Oracle Enterprise Manager 11g Database Control ..........................
.
started.
------------------------------------------------------------------
Logs
are generated in directory /etc/oracle/oracle/database.example.com_orcl/sys
99999999999999999999999999999999999999999999999999999
6 Steps to Shutdown or Restart Oracle RAC
Database Server
In this process, we have to follow a order of stopping resources. So when you apply steps given in this post use them in same order as written in the post.
1. Stop Database Instances: The process of shutdown or restart DB server
starts with stopping the database instance running on database node. So, first
of all DBA has to stop database instance running on this node. This
will not make an impact on database since database is accessible
through other instances in RAC env. Before stopping database instance make
sure another instance is running other server.
[grid@db
oracle]$ srvctl status database -d
oradb
Instance
oradb1 is running on node dbnode1
Instance
oradb2 is running on node dbnode2
[grid@
oracle]$ srvctl stop instance -d
oradb -i oradb1
[grid@
oracle]$ srvctl status database -d
oradb
Instance
oradb1 is not running on node dbnode1
Instance
oradb2 is running on node dbnode2
Now Database oradb is running on dbnode2 having instance name
oradb2. If this server has more than one database instance running on this node
use same method to stop each instance.
2. Stop Services on Database Node: If you have configured some node level services on database node, then list and stop them using below:
[grid@
oracle]$ srvctl status service -d
oradb -v
Service
oltp is running on instance(s) dbnode1
[grid@
oracle]$ srvctl stop service -d
oradb -s oltp
[grid@
oracle]$ srvctl status service -d
oradb -v
Service
oltp is not running.
In
the above case, only one service is running on oradb1 instance, which is
stopped now.
3. Stop Node level Applications: If DBA has some node
level application configured then stop them using below:
[grid@
oracle]$ srvctl status nodeapps -n
dbnode1
VIP
dbnode1-vip is enabled
VIP
dbnode1-vip is running on node: dbnode1
Network
is enabled
Network
is running on node: dbnode1
GSD
is disabled
GSD
is not running on node: dbnode1
ONS
is enabled
ONS
daemon is running on node: dbnode1
[grid@
oracle]$ srvctl stop nodeapps -n
dbnode1 -f
PRKO-2426
: ONS is already stopped on node(s): dbnode1
[grid@
oracle]$ srvctl status nodeapps -n
dbnode1
VIP
dbnode1-vip is enabled
VIP
dbnode1-vip is not running
Network
is enabled
Network
is not running on node: dbnode1
GSD
is disabled
GSD
is not running on node: dbnode1
ONS
is enabled
ONS
daemon is not running on node: dbnode1
4. Stop Running ASM Instances: ASM instance is a bridge between
Database instance running on database node and database stored on shared
server. In order to stop DB server DBA has to stop ASM instance as well.
[grid@
oracle]$ srvctl stop asm -n
dbnode1-f
[grid@
oracle]$ srvctl status asm -n
dbnode1
ASM
is not running on dbnode1
5. Stop Listener on Database Server: Listener is used to listen requests
coming for new connections, so before stooping database server we have to stop
listener on the server so that it doesn't take new
connection requests.
[grid@
oracle]$ srvctl status listener -n
dbnode1
Listener
LISTENER is enabled on node(s): dbnode1
Listener
LISTENER is running on node(s): dbnode1
[grid@oracle]$
srvctl stop listener -n
dbnode1
[grid@oracle]$
srvctl status listener -n
dbnode1
Listener
LISTENER is enabled on node(s): dbnode1
Listener
LISTENER is not running on node(s): dbnode1
Now
all components from database side are stopped, DBA can move forward to restart
or shutdown database server.
No comments:
Post a Comment