1OCF_HEARTBEAT_SAPDAT(7) OCF resource agents OCF_HEARTBEAT_SAPDAT(7)
2
3
4
6 ocf_heartbeat_SAPDatabase - Manages a SAP database instance as an HA
7 resource.
8
10 SAPDatabase [start | stop | status | monitor | meta-data |
11 validate-all]
12
14 Resource script for SAP databases. It manages a SAP database of any
15 type as an HA resource.
16
17 The purpose of the resource agent is to start, stop and monitor the
18 database instance of a SAP system. Together with the RDBMS system it
19 will also control the related network service for the database. Like
20 the Oracle Listener and the xserver of MaxDB. The resource agent
21 expects a standard SAP installation of the database and therefore needs
22 less parameters to configure. The resource agent supports the following
23 databases:
24
25 - Oracle 10.2, 11.2 and 12
26
27 - DB/2 UDB for Windows and Unix 9.x
28
29 - SAP-DB / MaxDB 7.x
30
31 - Sybase ASE 15.7
32
33 - SAP HANA Database since 1.00 - with SAP note 1625203
34 (http://sdn.sap.com)
35
36 In fact this resource agent does not run any database commands
37 directly. It uses the SAP standard process SAPHostAgent to control the
38 database. The SAPHostAgent must be installed on each cluster node
39 locally. It will not work, if you try to run the SAPHostAgent also as a
40 HA resource. Please follow SAP note 1031096 for the installation of
41 SAPHostAgent. The required minimum version of SAPHostAgent is: Release:
42 7.20 Patch Number: 90 or compile time after: Dec 17 2011
43
44 To exemplify the usage, for a HANA database with SID "TST" and instance
45 number "10", the resource configuration using crmsh syntax looks like:
46
47 primitive rsc_SAPDatabase_TST_HDB10 ocf:heartbeat:SAPDatabase \ params
48 DBTYPE="HDB" SID="TST" \ op start interval="0" timeout="3600" \ op
49 monitor interval="120" timeout="700" \ op stop interval="0"
50 timeout="600"
51
52 Make sure to tune the operations timeout values accordingly with your
53 chosen Database and available infrastructure.
54
55 Note that the same configuration can be achieved using any other CLI
56 tool for cluster configuration available, like pcs or cibadmin.
57
59 SID
60 The unique database system identifier. e.g. P01
61
62 (unique, required, string, no default)
63
64 DIR_EXECUTABLE
65 The full qualified path where to find saphostexec and saphostctrl.
66 Usually you can leave this empty. Then the default:
67 /usr/sap/hostctrl/exe is used.
68
69 (optional, string, default "/usr/sap/hostctrl/exe")
70
71 DBTYPE
72 The name of the database vendor you use. Set either: ADA, DB6, ORA,
73 SYB, HDB
74
75 (required, string, no default)
76
77 DBINSTANCE
78 Must be used for special database implementations, when database
79 instance name is not equal to the SID (e.g. Oracle DataGuard)
80
81 (unique, optional, string, no default)
82
83 DBOSUSER
84 The parameter can be set, if the database processes on operating
85 system level are not executed with the default user of the used
86 database type. Defaults: ADA=taken from /etc/opt/sdb, DB6=db2SID,
87 ORA=oraSID and oracle, SYB=sybSID, HDB=SIDadm
88
89 (unique, optional, string, no default)
90
91 NETSERVICENAME
92 Deprecated - do not use anymore. This parameter will be deleted in
93 one of the next releases.
94
95 (optional, string, no default)
96
97 DBJ2EE_ONLY
98 Deprecated - do not use anymore. This parameter will be deleted in
99 one of the next releases.
100
101 (optional, boolean, default false)
102
103 JAVA_HOME
104 Deprecated - do not use anymore. This parameter will be deleted in
105 one of the next releases.
106
107 (optional, string, no default)
108
109 STRICT_MONITORING
110 This controls how the resource agent monitors the database. If set
111 to true, it will use 'saphostctrl -function GetDatabaseStatus' to
112 test the database state. If set to false, only operating system
113 processes are monitored.
114
115 (optional, boolean, default false)
116
117 AUTOMATIC_RECOVER
118 If you set this to true, 'saphostctrl -function StartDatabase' will
119 always be called with the '-force' option.
120
121 (optional, boolean, default false)
122
123 MONITOR_SERVICES
124 Defines which services are monitored by the SAPDatabase resource
125 agent. Service names must correspond with the output of the
126 'saphostctrl -function GetDatabaseStatus' command. The default
127 MONITOR_SERVICES value is derived from the database type DBTYPE.
128 For reference:
129
130 - DBTYPE "ORA" sets MONITOR_SERVICES="Instance|Database|Listener";
131
132 - DBTYPE "HDB" sets
133 MONITOR_SERVICES="hdbindexserver|hdbnameserver";
134
135 - DBTYPE "ADA" sets MONITOR_SERVICES="Database";
136
137 - DBTYPE "DB6" sets MONITOR_SERVICES="{SID}|{db2sid}";
138
139 - DBTYPE "SYB" sets MONITOR_SERVICES="Server".
140
141 This parameter should be set ONLY if is needed to monitor different
142 services than the ones listed above.
143
144 (optional, string, no default)
145
146 DIR_BOOTSTRAP
147 Deprecated - do not use anymore. This parameter will be deleted in
148 one of the next releases.
149
150 (optional, string, no default)
151
152 DIR_SECSTORE
153 Deprecated - do not use anymore. This parameter will be deleted in
154 one of the next releases.
155
156 (optional, string, no default)
157
158 DB_JARS
159 Deprecated - do not use anymore. This parameter will be deleted in
160 one of the next releases.
161
162 (optional, string, no default)
163
164 PRE_START_USEREXIT
165 The full qualified path where to find a script or program which
166 should be executed before this resource gets started.
167
168 (optional, string, no default)
169
170 POST_START_USEREXIT
171 The full qualified path where to find a script or program which
172 should be executed after this resource got started.
173
174 (optional, string, no default)
175
176 PRE_STOP_USEREXIT
177 The full qualified path where to find a script or program which
178 should be executed before this resource gets stopped.
179
180 (optional, string, no default)
181
182 POST_STOP_USEREXIT
183 The full qualified path where to find a script or program which
184 should be executed after this resource got stopped.
185
186 (optional, string, no default)
187
189 This resource agent supports the following actions (operations):
190
191 start
192 Starts the resource. Suggested minimum timeout: 1800s.
193
194 stop
195 Stops the resource. Suggested minimum timeout: 1800s.
196
197 status
198 Performs a status check. Suggested minimum timeout: 60s.
199
200 monitor
201 Performs a detailed status check. Suggested minimum timeout: 60s.
202 Suggested interval: 120s.
203
204 validate-all
205 Performs a validation of the resource configuration. Suggested
206 minimum timeout: 5s.
207
208 meta-data
209 Retrieves resource agent metadata (internal use only). Suggested
210 minimum timeout: 5s.
211
212 methods
213 Suggested minimum timeout: 5s.
214
216 The following is an example configuration for a SAPDatabase resource
217 using the crm(8) shell:
218
219 primitive p_SAPDatabase ocf:heartbeat:SAPDatabase \
220 params \
221 SID=string \
222 DBTYPE=string \
223 op monitor depth="0" timeout="60s" interval="120s"
224
226 The following is an example configuration for a SAPDatabase resource
227 using pcs(8)
228
229 pcs resource create p_SAPDatabase ocf:heartbeat:SAPDatabase \
230 SID=string \
231 DBTYPE=string \
232 op monitor depth="0" timeout="60s" interval="120s"
233
235 http://clusterlabs.org/
236
238 ClusterLabs contributors (see the resource agent source for information
239 about individual authors)
240
241
242
243resource-agents UNKNOWN 10/23/2019 OCF_HEARTBEAT_SAPDAT(7)