How to Shutdown or Restart Oracle RAC Database Server in 6 Steps ?
Sometimes DBA has to either Shutdown Oracle RAC Database Server or Restart Oracle RAC Database Server because of scheduled maintenance,OS patching, OS Upgrade and Hardware replacement etc. Since, Oracle products has evolved a lot so now there are many things to take care by Database Administrator before restarting or shutting down Database Server.An Oracle Database Server can have following Oracle Components.
1. Oracle Database Running.
2. If RAC is configured. A cluster stack will also be running at the server.
3. If DBA is using ASM instance for Shared storage device. You will find an running ASM instance on the server.
4. A listener will be running there.
5. OEM Control, this is an optional component.
If you have all these components running on Database Server, then before restart or shutdown Database server you have to stop all these resource to avoid any corruption or inconsistency into database.
Here I will discuss about restarting or shutting down only single server for Real Application cluster environment. So that Database is accessible through other nodes. Though DBA can also easily shutdown whole clusterware but this will make database unavailable So make sure you really need that.
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 dbnode15. 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): dbnode1Now all components from database side are stopped, DBA can move forward to restart or shutdown database server. 6. Restart or shutdown database server: To shutdown or restart database server, DBA has to have root user login credentials. To Restart Linux Database Server. [root@oracle]$ /sbin/shutdown -r now To Shutdown database server. [root@oracle]$ shutdown -h nowIf you not using RAC environment and want's to shutdown or Restart DB server, then just shutdown the database instance using "shutdown immediate" and stop listener using "lsnrctl stop {listener_name}" and execute step 6 given in this post.
No comments:
Post a Comment