Deactivates the specified database and stops all necessary
database services.
Scope
This command deactivates the target
database on all members in the instance or, a specified member. If
one or more of these members encounters an error during deactivation,
a warning is returned. The database remains activated on those members.
Authorization
One of the following authorities:
Command syntax
>>-DEACTIVATE--+-DATABASE-+--database-alias--------------------->
'-DB-------'
>--+--------------------------------+--------------------------->
'-+--------+--identifiers--FORCE-'
'-MEMBER-'
>--+-------------------------------------+---------------------><
'-USER--username--+-----------------+-'
'-USING--password-'
Command parameters
- DATABASE | DB database-alias
- Specifies the alias of the database to be stopped.
- MEMBER
- Specifies one or more members on which to deactivate the database.
- identifiers
- Specifies the numeric identifier of one or more members on which
to deactivate the database. You can use the numeric identifier without
specifying the MEMBER parameter keyword.
- FORCE
- Forces a database to deactivate even if indoubt transactions exist.
Note: An
error is returned if you try to deactivate a database without using
the FORCE option with existing indoubt transactions.
- USER username
- Specifies the user stopping the database.
- USING password
- Specifies the password for the user name.
Usage notes
- An application issuing the DEACTIVATE DATABASE command
cannot have an active database connection to any database.
- Databases initialized by the ACTIVATE DATABASE command
can be shut down by issuing the DEACTIVATE DATABASE or db2stop command.
If a database is initialized by the ACTIVATE DATABASE command,
the last application disconnecting from the database does not shut
down the database, and the DEACTIVATE DATABASE command
must be used.
- In a DB2® pureScale® environment,
an active database on a member can only be deactivated on that member
by issuing the DEACTIVATE DATABASE or db2stop command.
Compatibilities
For compatibility
with previous versions:
- DBPARTITIONNUM can be substituted for MEMBER,
except when the DB2_ENFORCE_MEMBER_SYNTAX registry
variable is set to ON.