'\" t
.\"     Title: ocf_heartbeat_db2
.\"    Author: ClusterLabs contributors (see the resource agent source for information about individual authors)
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
.\"      Date: 03/20/2024
.\"    Manual: OCF resource agents
.\"    Source: resource-agents UNKNOWN
.\"  Language: English
.\"
.TH "OCF_HEARTBEAT_DB2" "7" "03/20/2024" "resource-agents UNKNOWN" "OCF resource agents"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ocf_heartbeat_db2 \- Resource Agent that manages an IBM DB2 LUW databases in Standard role as primitive or in HADR roles as master/slave configuration\&. Multiple partitions are supported\&.
.SH "SYNOPSIS"
.HP \w'\fBdb2\fR\ 'u
\fBdb2\fR [start | stop | monitor | promote | demote | meta\-data | validate\-all]
.SH "DESCRIPTION"
.PP
Resource Agent that manages an IBM DB2 LUW databases in Standard role as primitive or in HADR roles in master/slave configuration\&. Multiple partitions are supported\&.
.PP
Standard mode:
.PP
An instance including all or selected databases is made highly available\&. Configure each partition as a separate primitive resource\&.
.PP
HADR mode:
.PP
A single database in HADR configuration is made highly available by automating takeover operations\&. Configure a master / slave resource with notifications enabled and an additional monitoring operation with role "Master"\&.
.PP
In case of HADR be very deliberate in specifying intervals/timeouts\&. The detection of a failure including promote must complete within HADR_PEER_WINDOW\&.
.PP
In addition to honoring requirements for crash recovery etc\&. for your specific database use the following relations as guidance:
.PP
"monitor interval" < HADR_PEER_WINDOW \- (appr 30 sec)
.PP
"promote timeout" < HADR_PEER_WINDOW + (appr 20 sec)
.PP
For further information and examples consult http://www\&.linux\-ha\&.org/wiki/db2_(resource_agent)
.SH "SUPPORTED PARAMETERS"
.PP
\fBinstance\fR
.RS 4
The instance of the database(s)\&.
.sp
(unique, required, string, no default)
.RE
.PP
\fBdblist\fR
.RS 4
List of databases to be managed, e\&.g "db1 db2"\&. Defaults to all databases in the instance\&. Specify one db for HADR mode\&.
.sp
(optional, string, no default)
.RE
.PP
\fBadmin\fR
.RS 4
DEPRECATED: The admin user of the instance\&.
.sp
(optional, string, no default)
.RE
.PP
\fBdbpartitionnum\fR
.RS 4
The number of the partition (DBPARTITIONNUM) to be managed\&.
.sp
(optional, string, default "0")
.RE
.SH "SUPPORTED ACTIONS"
.PP
This resource agent supports the following actions (operations):
.PP
\fBstart\fR
.RS 4
Starts the resource\&. Suggested minimum timeout: 120s\&.
.RE
.PP
\fBstop\fR
.RS 4
Stops the resource\&. Suggested minimum timeout: 120s\&.
.RE
.PP
\fBpromote\fR
.RS 4
Promotes the resource to the Master role\&. Suggested minimum timeout: 120s\&.
.RE
.PP
\fBdemote\fR
.RS 4
Demotes the resource to the Slave role\&. Suggested minimum timeout: 120s\&.
.RE
.PP
\fBnotify\fR
.RS 4
Suggested minimum timeout: 10s\&.
.RE
.PP
\fBmonitor\fR
.RS 4
Performs a detailed status check\&. Suggested minimum timeout: 60s\&. Suggested interval: 20s\&.
.RE
.PP
\fBmonitor (Master role)\fR
.RS 4
Performs a detailed status check\&. Suggested minimum timeout: 60s\&. Suggested interval: 22s\&.
.RE
.PP
\fBvalidate\-all\fR
.RS 4
Performs a validation of the resource configuration\&. Suggested minimum timeout: 5s\&.
.RE
.PP
\fBmeta\-data\fR
.RS 4
Retrieves resource agent metadata (internal use only)\&. Suggested minimum timeout: 5s\&.
.RE
.SH "EXAMPLE CRM SHELL"
.PP
The following is an example configuration for a db2 resource using the
\fBcrm\fR(8)
shell:
.sp
.if n \{\
.RS 4
.\}
.nf
primitive p_db2 ocf:heartbeat:db2 \e
  params \e
    instance=\fIstring\fR \e
  op monitor depth="0" timeout="60s" interval="20s" \e
  op monitor depth="0" timeout="60s" role="Master" interval="22s" 
.fi
.if n \{\
.RE
.\}
.sp
.if n \{\
.RS 4
.\}
.nf
ms ms_db2 p_db2 \e
  meta notify="true" interleave="true"
.fi
.if n \{\
.RE
.\}
.SH "EXAMPLE PCS"
.PP
The following is an example configuration for a db2 resource using
\fBpcs\fR(8)
.sp
.if n \{\
.RS 4
.\}
.nf
pcs resource create p_db2 ocf:heartbeat:db2 \e
  instance=\fIstring\fR \e
  op monitor depth="0" timeout="60s" interval="20s" \e
  op monitor depth="0" timeout="60s" role="Master" interval="22s" \-\-master
.fi
.if n \{\
.RE
.\}
.SH "SEE ALSO"
.PP
\m[blue]\fB\%http://clusterlabs.org/\fR\m[]
.SH "AUTHOR"
.PP
\fBClusterLabs contributors (see the resource agent source for information about individual authors)\fR
