TIP 98#: Oracle Restart

I was working on a database maintenance couple days ago and interesting enough, as it is shown in below, I noticed that after killing listener, it is started up somehow...
Environment has 11202 standalone database on Linux 32bit using ASM.

[oracle@localhost bin]$ ps -ef |grep tns
oracle 4365 1 0 15:29 ? 00:00:00 /home/oracle/app/oracle/product/11.2.0/grid/bin/tnslsnr LISTENER -inherit
oracle 4370 3513 0 15:29 pts/1 00:00:00 grep tns
[oracle@localhost bin]$ kill 4365
[oracle@localhost bin]$ ps -ef |grep tns
oracle 4373 3513 0 15:29 pts/1 00:00:00 grep tns
[oracle@localhost bin]$ ps -ef |grep tns
oracle 4375 3513 0 15:29 pts/1 00:00:00 grep tns
[oracle@localhost bin]$ ps -ef |grep tns
oracle 4385 1 0 15:30 ? 00:00:00 /home/oracle/app/oracle/product/11.2.0/grid/bin/tnslsnr LISTENER -inherit
oracle 4394 3513 0 15:31 pts/1 00:00:00 grep tns

This turned out to be due to Oracle Restart
For those of you who are not familiar, starting 11gR2, ASM as well as Oracle Restart are installed out of Grid Infrastructure home.
Oracle Restart provides managed startup and restart of a single-instance (non-clustered) Oracle Database, Oracle ASM instance, service, listener, and any other
process running on the server.Oracle Restart is used in standalone server (non-clustered) environments only. For RAC, Clusterware provides this functionality.

This explains why listener was started up automatically, So now that we know why, the question is how to stop different components in 11gR2 for single instance DB ?

Oracle recommends to use srvctl to stop/start different components.
However, tools such as sqlplus, lsnrctl, ascmd are integrated with Oracle Restart and in other words, if any component is stopped/started via these tools, Oracle Restart will not try to intervene.
Also if there is a case like maintenance/patch which DBA wants to keep some components down and does not want Oracle Restart to intervene, the best option is to disable Oracle Restart before starting maintenance. To do so, following below steps:

-------- To stop/disable Oracle Restart --------
cd $GI_HOME/bin
./crsctl stop has
./crsctl disable has
-------- To start/enable Oracle Restart --------
cd $GI_HOME/bin
./crsctl enable has
./crsctl start has

For more information about Oracle Restart and how to bounce DB in 11g, please check out : Oracle® Database Administrator's Guide,11g Release 2 (11.2),Part Number E25494-02111

1 comment:

Anonymous said...

Dear Sir,

I m planning to write oracle certification exam but confused to choose between 10g or 11g, please suggest me, which exam should i take...
i m also using certification dumps so please review the questions or provide me latest dumps...

1z0-054 dumps oracle database