OCF_HEARTBEAT_ORACLE(7)
π OCF_HEARTBEAT_ORACLE(7) β the Oracle resource agent, explained by your bestie
okay so this is a page from the OCF resource agents manual set, and it's all about ocf_heartbeat_oracle β yes that's the full name, we're just gonna call it oracle from here on because we're close like that π«Ά
β¨ NAME β¨
ocf_heartbeat_oracle β Manages an Oracle Database instance. that's it. that's the whole job. she manages an Oracle Database instance. main character energy fr π
π SYNOPSIS π
oracle [start | stop | status | monitor | meta-data | validate-all]
like, pick an action bestie. that's the whole interface. iconic.
π¦ DESCRIPTION π¦
So picture this: it's a resource script for oracle, and what it does is manage an Oracle Database instance as an HA resource. That's it. That's the vibe. High availability Oracle. no cap. π₯
π SUPPORTED PARAMETERS π
bestie. there are a LOT of these. buckle up, we're going through every single one, no skipping, periodt. π
sidβ The Oracle SID (akaORACLE_SID). Yeah. That one. (unique, required, string, no default) β so like, you have to give this one. it's not optional. it's giving "required for a reason" πhomeβ The Oracle home directory (akaORACLE_HOME). If you don't specify it, then the SID along with its home should be listed in/etc/oratab. (optional, string, no default) β so if you're lazy about it,/etc/oratabbetter have your back πuserβ The Oracle owner (akaORACLE_OWNER). If not specified, then it gets set to the owner of the file$ORACLE_HOME/dbs/*${ORACLE_SID}.ora. and if that doesn't work for you? just set it explicitely. yes, the original says "explicitely", we're keeping it, it's part of the lore. (optional, string, no default) πΈmonuserβ Monitoring user name. ok so here's the tea: every connection as sysdba gets logged in an audit log, and that can result in a large number of new files being created (not the vibe π). So a new user gets created (if it doesn't exist) in thestartaction, and then it's used inmonitorafterwards. It should have very limited rights. And make sure that the password for this user does not expire β like, fr fr, do not let that happen. (optional, string, default"OCFMON") πmonpasswordβ Password for the monitoring user. Again: make sure that the password for this user does not expire. Set this to avoid using the agent's default password formonuser. (optional, string, default"OCFMON") π₯monprofileβ Profile used by the monitoring user. If the profile doesn't exist, it will be created with a non-expiring password. slay, automatic. (optional, string, default"OCFMONPROFILE") β¨ipcrmβ okay this one is a whole saga, sit down. π
Sometimes IPC objects (shared memory segments and semaphores) belonging to an Oracle instance might get left behind, and that prevents the instance from starting. And it is not easy to figure out which shared segments belong to which instance β especially when more instances are running as the same user. mess. π
What we use here is the "oradebug" feature and its "ipc" trace utility. It's not optimal to parse the debugging information, but the author isn't aware of any other way to find out about the IPC information. And in case the format or wording of the trace report changes, the parsing might fail. There are some precautions though, to prevent stepping on other people's toes. There's also a dumpinstipc option which prints the IPC objects that belong to the instance β use it to see if the trace file is being parsed correctly. π
Three settings are possible:
noneβ don't mess with IPC and hope for the best (beware: you'll probably be out of luck, sooner or later) πinstanceβ try to figure out the IPC stuff which belongs to the instance and remove only those (default; should be safe) βorauserβ remove all IPC belonging to the user which runs the instance (don't use this if you run more than one instance as the same user, or if other apps running as this user use IPC) β οΈ
The default setting "instance" should be safe to use, but in that case there's no guarantee the instance will start. Because if IPC objects were already left around β like, say, someone mercilessly killing Oracle processes β there's no way anymore to find out which IPC objects should be removed. In that case, human intervention is necessary, and probably _all_ instances running as the same user will have to be stopped. π¬
The third setting, "orauser", guarantees IPC object removal, but it does that based only on IPC object ownership β so only use that if every instance runs as a separate user.
Please report any problems. Suggestions/fixes welcome. (we love a humble queen) π«Ά
(optional, string, default "instance")
clear_backupmodeβ The clear of the backup mode of ORACLE. (optional, boolean, default false) πshutdown_methodβ How to stop Oracle is, apparently, a matter of taste. The default method ("checkpoint/abort") is:
alter system checkpoint; shutdown abort;
This should be the fastest safe way to bring the instance down. If you find "shutdown abort" distasteful, set this attribute to "immediate", in which case we will run:
shutdown immediate;
And if you still think there's an even better way to shut down an Oracle instance, they are willing to listen. π (optional, string, default "checkpoint/abort")
π SUPPORTED ACTIONS π
This resource agent supports the following actions (operations). here's the lineup, and yes the timeouts are exact, don't @ me:
startβ Starts the resource. Suggested minimum timeout:120s. β±οΈstopβ Stops the resource. Suggested minimum timeout:120s. β±οΈstatusβ Performs a status check. Suggested minimum timeout:5s. β±οΈmonitorβ Performs a detailed status check. Suggested minimum timeout:30s. Suggested interval:120s. πvalidate-allβ Performs a validation of the resource configuration. Suggested minimum timeout:5s. β±οΈmethodsβ Suggested minimum timeout:5s. β±οΈmeta-dataβ Retrieves resource agent metadata (internal use only). Suggested minimum timeout:5s. π€«
π EXAMPLE CRM SHELL π
here's an example config for an oracle resource using the crm(8) shell, copy it exactly, no typos bestie:
primitive p_oracle ocf:heartbeat:oracle \
params \
sid=string \
op monitor depth="0" timeout="30s" interval="120s"
yeah depth="0". that's what it says. we don't question it. β¨
π§ EXAMPLE PCS π§
and here's the pcs(8) version, for the pcs girlies:
pcs resource create p_oracle ocf:heartbeat:oracle \
sid=string \
op monitor OCF_CHECK_LEVEL="0" timeout="30s" interval="120s"
note the OCF_CHECK_LEVEL="0" here instead of depth. different tool, different energy. iykyk π
π SEE ALSO π
http://clusterlabs.org/β go look, it's giving community π«Ά
πΈ AUTHOR πΈ
ClusterLabs contributors (see the resource agent source for information about individual authors). shoutout to the contributors, absolute icons π
and that's the page!! this whole thing is from resource-agents UNKNOWN, dated 10/01/2026, and it's OCF_HEARTBEAT_ORACLE(7) in case you need to cite your sources. mwah, go manage that database πππ¦
π¦ where this page comes from
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms