Saturday, March 2, 2013

ORACLE - Restart

What is ORACLE RESTART in oracle 11gR2 ?

Oracle Restart is the new feature oracle (11gR2) which ensures that various Oracle components gets automatically restarted after hardware or software failures.This feature depends on OHAS daemon.
1. Database instance
2. Database listener
3. Database services
4. Oracle ASM instance
5. Oracle ASM disk group
6. Oracle ONS

These commands are only for use in an  Oracle Restart environment:
crsctl start has       – To manually start the Oracle Restart stack when running disabled/stopping
crsctl stop has [-f] – To manually stop the Oracle Restart stack
crsctl enable has    – To enable the stack for automatic startup at server reboot
crsctl disable has   – To disable the stack for automatic startup at server reboot
crsctl config has     –  To display the configuration of Oracle Restart
crsctl check has     – To check the current status of Restart

crsctl stat res -t      – To check the status of the resources in the Oracle Restart stack managed by OHASD


Example: How to check oracle restart ?

1) Kill the pmon of a ATEST database:
/home/oracle> ps -ef | grep pmon
oracle        4844     1  0 Feb16 ?        00:01:50 asm_pmon_+ASM
oracle       15766  9816  0 23:22 pts/3    00:00:00 grep pmon
oracle       22524     1  0 Feb26 ?        00:00:36 ora_pmon_ATEST
/home/oracle> kill -9 22524

2) After Kill, check the ATEST database again. It is re-stared automatically:
/home/oracle> ps -ef | grep pmon
oracle        4844     1  0 Feb16 ?        00:01:50 asm_pmon_+ASM
oracle       17524     1  0 23:25 ?        00:00:00 ora_pmon_ATEST
oracle       18594  9816  0 23:26 pts/3    00:00:00 grep pmon

3) Check the alert log also:Shutting down instance (abort)
License high water mark = 24
USER (ospid: 17330): terminating the instance
Instance terminated by USER, pid = 17330
Sat Mar 02 23:25:43 2013
Instance shutdown complete
Sat Mar 02 23:25:43 2013
Adjusting the default value of parameter parallel_max_servers
from 640 to 135 due to the value of parameter processes (150)
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 3
Autotune of undo retention is turned on.

No comments:

Post a Comment