Oracle DB restart
- Last Updated 3/31/2023, 12:34:01 PM UTC
- About 3 min read
Plugin info
name: ora-db-start
Starts oracle instances when down and emits events for the start process result.
WARNING: This plugin should not be used on
RAC
deployments. You should install and use Oracle Restart and its associated utilities.
# Prerequisites
- Linux
- User Groups:
oinstall
,dba
- User Groups:
- Windows
- Group Memeberships:
ORA_HOMENAME_DBA
- Group Memeberships:
Important, the connection to the database/ASM takes place over BEQ. This means that the process resource limits for
myrmex-ad
must match those set for the oracle database/ASM processes. Set these limits in thesystemd
unit file formyrmex-ad
and then reload and restart themyrmex-ad
service. Refer to https://www.man7.org/linux/man-pages/man5/systemd.exec.5.html#PROCESS_PROPERTIES (opens new window) for the process limit directives and theirulimit
equivalents.
# Event Subscriptions
myrmex/ora-db-status/sid/down
# Events
myrmex/ora-db-start/sid/already_running
set to 1 when instance was found to be running while attempting to start it- Dimensions
sid
the database SID
- Dimensions
myrmex/ora-db-start/sid/started
set to 1 when instance was successfully started- Dimensions:
sid
the database SID
- Dimensions:
myrmex/ora-db-start/sid/error
set ot 1 when instance failed to start- Dimensions:
sid
the database SID
- Dimensions:
myrmex/plugins/error/plugin/msg
set to error message on plugin execution failure- Dimensions
plugin
the name of the plugin that failed
- Dimensions
# Configuration
Plugin is configured with a yaml
file:
instances
: list of databases start confs that this plugin can startsource
: the value that will appear as the source of metrics generated by this configuration. defaults to plugin hostnametimeout
: execution timeout in duration format (opens new window). Defaults to2m
oracle_home
: path to database sidORACLE_HOME
sid
: the database SIDconnect_as
: (optional) one ofsysdba
,sysoper
,sysasm
. Default issysdba
role
: primary or standbystandby_type
: dataguard, manual. if role is standbyASM
: if using ASM set the oracle_home and sid of the ASM instanceoracle_home
: path to ASMORACLE_HOME
sid
: ASM SIDconnect_as
: (optional) one ofsysdba
,sysoper
,sysasm
. Default issysdba
# Example Configuration
# list of databases start confs that this plugin can start
instances:
# path to oracle_home for this sid
- oracle_home: /u01/app/oracle/product/12.2.0.1/dbhome_1
sid: suwpdb1
# primary or standby. default is primary
role: primary
# dataguard, manual. if role is standby
#standby_type:
# if using ASM set the oracle_home and sid of the ASM instance
ASM:
oracle_home: /u01/app/12.2.0.1/grid
sid: +ASM1
# Validate Configuration
ora-db-start --run-conf /path/to/config/file.yaml --validate
# Testing
Run the plugin from the command line to start one or more instances
ora-db-start --run-conf /path/to/config/file.yaml --run-events/path/to/sid/down/events.json
# Example test event file
[
{
"namespace": [
{
"value": "myrmex"
},
{
"value": "ora-db-status"
},
{
"name": "sid",
"value": "suwpdb1"
},
{
"value": "down"
}
],
"timestamp": "2019-05-10T18:25:43.511Z",
"data": 1
}
]
# List events emmited by this plugin
ora-db-start --events