Monday, April 11, 2016

Disable/Enable Automatic Startup Oracle HAS

Disable/Enable Automatic Startup Oracle HAS

On 11gR2, Oracle Clusterware consists of two separate stacks: an upper stack anchored by the Cluster Ready Services (CRS) daemon (crsd) and a lower stack anchored by the Oracle High Availability Services daemon (ohasd).

So.. How to disable/enable Oracle HAS.
Use the crsctl disable has command to disable automatic startup of the Oracle High Availability Services stack when the server boots up.
# crsctl config has
CRS-4622: Oracle High Availability Services autostart is enabled.
How to know Oracle HAS is enabled(if doesn't use "crsctl config has")
# cat /etc/oracle/scls_scr/rhel5-test/root/ohasdstr
enable

# crsctl disable has
CRS-4621: Oracle High Availability Services autostart is disabled.

# crsctl config has
CRS-4621: Oracle High Availability Services autostart is disabled.

# cat /etc/oracle/scls_scr/rhel5-test/root/ohasdstr
disable
Use the crsctl enable has command to enable automatic startup of the Oracle High Availability Services stack when the server boots up.
# crsctl enable has
CRS-4622: Oracle High Availability Services autostart is enabled.

# cat /etc/oracle/scls_scr/rhel5-test/root/ohasdstr
enable
If We just check HAS Disable/Enable status, that uses "crsctl config has" command, it's easier than "ohasdstr" file checking.

How about "crsctl disable/enable crs" on 11gR2?
They disable/enable automatic startup of Oracle HAS.

I posted "check enable/disable the startup of CRS".. that show Oracle Clusterware version <= 11gR1, we can check from "crsstart" file. On 11gR2, crsstart file is not used ??? 

Use the crsctl disable crs command to prevent the automatic startup of Oracle High Availability Services when the server boots.


Use the crsctl enable crs command to enable automatic startup of Oracle High Availability Services when the server boots.
# crsctl config has
CRS-4622: Oracle High Availability Services autostart is enabled.

# crsctl config crs
CRS-4622: Oracle High Availability Services autostart is enabled.

# ls -ltr /etc/oracle/scls_scr/rhel5-test/root/
-rw-r--r-- 1 root root 7 Sep 7 00:56 crsstart
-rw-r--r-- 1 root oinstall 5 Nov 22 17:04 ohasdrun
-rw-r--r-- 1 root oinstall 7 Nov 22 17:10 ohasdstr
# cat /etc/oracle/scls_scr/rhel5-test/root/crsstart
enable

# cat /etc/oracle/scls_scr/rhel5-test/root/ohasdstr
enable

# crsctl disable crs
CRS-4621: Oracle High Availability Services autostart is disabled.

# crsctl config crs
CRS-4621: Oracle High Availability Services autostart is disabled.

# crsctl config has
CRS-4621: Oracle High Availability Services autostart is disabled.

# ls -ltr /etc/oracle/scls_scr/rhel5-test/root/
-rw-r--r-- 1 root root 7 Sep 7 00:56 crsstart
-rw-r--r-- 1 root oinstall 5 Nov 22 17:04 ohasdrun
-rw-r--r-- 1 root oinstall 8 Nov 22 17:12 ohasdstr

# cat /etc/oracle/scls_scr/rhel5-test/root/crsstart
enable

# cat /etc/oracle/scls_scr/rhel5-test/root/ohasdstr
disable
However, check CRSCTL Utility Reference

4 COMMENTS:

Coskan Gundogar said...
Hi Surachart,

Is there a typo or am I missing something. I am expecting

cat /etc/oracle/scls_scr/rhel5-test/root/crsstart
disable

for the last execution because you disable it but your post says it is

cat /etc/oracle/scls_scr/rhel5-test/root/crsstart
enable

Am I missing something ?
Surachart said...
Thank You for your commend.

I'll check again...

But In my Test System, It's "enable" status in /etc/oracle/scls_scr/rhel5-test/root/crsstart file.
Surachart said...
Hi Again...

After test installation Grid Infrastructure for a Standalone Server (solaris)

$ crsctl check has
CRS-4638: Oracle High Availability Services is online

$ crsctl config has
CRS-4622: Oracle High Availability Services autostart is enabled.

$ cat /var/opt/oracle/scls_scr/sundb/root/crsstart
enable

$ cat /var/opt/oracle/scls_scr/sundb/oracle/ohasdstr
enable

$ crsctl disable has
CRS-4621: Oracle High Availability Services autostart is disabled.

$ cat /var/opt/oracle/scls_scr/sundb/root/crsstart
enable

$ cat /var/opt/oracle/scls_scr/sundb/oracle/ohasdstr
disable

$ crsctl enable has
CRS-4622: Oracle High Availability Services autostart is enabled.

$ cat /var/opt/oracle/scls_scr/sundb/root/crsstart
enable

$ cat /var/opt/oracle/scls_scr/sundb/oracle/ohasdstr
enable

That show... crsstart file not use anymore...

and if uses Grid Infrastructure for a Standalone Server "crsctl ... crs" can not use ...

$ crsctl disable crs
CRS-4013: This command is not supported in a single-node configuration.
CRS-4000: Command Disable failed, or completed with errors.

No comments:

Post a Comment

  How to Change Instance Type & Security Group of EC2 in AWS By David Taylor Updated April 29, 2023 EC2 stands for Elastic Compute Cloud...