DB2 Version 10.1 for Linux, UNIX, and Windows

db2HADRStop API - Stop high availability disaster recovery (HADR) operations

Stops HADR operations on a database.

Authorization

One of the following authorities:
  • SYSADM
  • SYSCTRL
  • SYSMAINT

Required connection

Instance. The API establishes a database connection if one does not exist, and closes the database connection when the API completes.

API include file

db2ApiDf.h

API and data structure syntax

SQL_API_RC SQL_API_FN
  db2HADRStop (
       db2Uint32 versionNumber,
       void * pParmStruct,
       struct sqlca * pSqlca);

typedef SQL_STRUCTURE db2HADRStopStruct
{
   char *piDbAlias;
   char *piUserName;
   char *piPassword;
} db2HADRStopStruct;

SQL_API_RC SQL_API_FN
  db2gHADRStop (
       db2Uint32 versionNumber,
       void * pParmStruct,
       struct sqlca * pSqlca);

typedef SQL_STRUCTURE db2gHADRStopStruct
{
   char *piDbAlias;
   db2Uint32 iAliasLen;
   char *piUserName;
   db2Uint32 iUserNameLen;
   char *piPassword;
   db2Uint32 iPasswordLen;
} db2gHADRStopStruct;

db2HADRStop API parameters

versionNumber
Input. Specifies the version and release level of the structure passed as the second parameter pParmStruct.
pParmStruct
Input. A pointer to the db2HADRStopStruct structure.
pSqlca
Output. A pointer to the sqlca structure.

db2HADRStopStruct data structure parameters

piDbAlias
Input. A pointer to the database alias.
piUserName
Input. A pointer to the user name under which the command will be executed.
piPassword
Input. A pointer to a string containing the password.

db2gHADRStopStruct data structure specific parameters

iAliasLen
Input. Specifies the length in bytes of the database alias.
iUserNameLen
Input. Specifies the length in bytes of the user name.
iPasswordLen
Input. Specifies the length in bytes of the password.