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.
If
a database is in the SUSPEND_WRITE state, it cannot be put in quiesced
mode.
Authorization
One of the following authorities:
Required connection
Database
API include file
db2ApiDf.h
API and data structure syntax
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;
db2DatabaseQuiesce 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 db2DbQuiesceStruct structure.
- pSqlca
- Output. A pointer to the sqlca structure.
db2DbQuiesceStruct data structure parameters
- piDatabaseName
- Input. The database name.
- iImmediate
- Input. Valid values are:
- TRUE=1
- Force the applications immediately.
- FALSE=0
- Deferred force. Applications will wait the number of minutes specified
by iTimeout parameter to let their current units
of work be completed, and then will terminate. If this deferred force
cannot be completed within the number of minutes specified by iTimeout parameter,
the quiesce operation will fail.
- iForce
- Input. Reserved for future use.
- iTimeout
- Input. Specifies the time, in minutes, to wait for applications
to commit the current unit of work. If iTimeout is
not specified, in a single-partition database environment, the default
value is 10 minutes. In a partitioned database environment the value
specified by the start_stop_time database manager
configuration parameter will be used.
db2gDbQuiesceStruct data structure specific parameters
- iDatabaseNameLen
- Input. Specifies the length in bytes of piDatabaseName.