Forces all users off the database, immediately rolls back all active transactions or waits for them to complete their current units of work within the number of minutes specified (if they cannot be completed within the specified number of minutes, the operation will fail), and puts the database into quiesce mode. This API provides exclusive access to the database. During this quiesced period, system administration can be performed on the database by users with appropriate authority. After administration is complete, you can unquiesce the database, using the db2DatabaseUnquiesce API. The db2DatabaseUnquiesce API allows other users to connect to the database, without having to shut down and perform another database start. In this mode only groups or users with QUIESCE CONNECT authority and sysadm, sysmaint, or sysctrl will have access to the database and its objects.
Database
db2ApiDf.h
SQL_API_RC SQL_API_FN
db2DatabaseQuiesce (
db2Uint32 versionNumber,
void * pParmStruct,
struct sqlca * pSqlca);
typedef SQL_STRUCTURE db2DbQuiesceStruct
{
char *piDatabaseName;
db2Uint32 iImmediate;
db2Uint32 iForce;
db2Uint32 iTimeout;
} db2DbQuiesceStruct;
SQL_API_RC SQL_API_FN
db2gDatabaseQuiesce (
db2Uint32 versionNumber,
void * pParmStruct,
struct sqlca * pSqlca);
typedef SQL_STRUCTURE db2gDbQuiesceStruct
{
db2Uint32 iDatabaseNameLen;
char *piDatabaseName;
db2Uint32 iImmediate;
db2Uint32 iForce;
db2Uint32 iTimeout;
} db2gDbQuiesceStruct;