DB2 Version 10.1 for Linux, UNIX, and Windows

db2SetWriteForDB API - Suspend or resume I/O writes for database

Suspends or resumes the I/O write operations for a database. I/O write operations must be suspended before a split mirror of a database can be taken.

Scope

This API affects only the database partition where the API is run. In DB2® pureScale® environments, this API can be run from any member to suspend I/O write operations for all the members, or to resume I/O write operations for all the suspended members.

Authorization

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

Required connection

Database

API include file

db2ApiDf.h

API and data structure syntax

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

typedef struct db2SetWriteDbStruct
{
   db2int32 iOption;
   char *piTablespaceNames;
} db2SetWriteDbStruct;

db2SetWriteForDB 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 db2SetWriteDbStruct structure.
pSqlca
Output. A pointer to the sqlca structure.

db2SetWriteDbStruct data structure parameters

iOption
Input. Specifies the action. Valid values are:
- DB2_DB_SUSPEND_WRITE
Suspends I/O write operations to disk.
- DB2_DB_RESUME_WRITE
Resumes I/O write operations to disk.
piTablespaceNames
Input. Reserved for future use.