DB2 Version 10.1 for Linux, UNIX, and Windows

DEACTIVATE DATABASE command

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:
  • SYSADM
  • SYSCTRL
  • SYSMAINT

Required connection

None

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-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 in-doubt transactions exist.
Note: An error is returned if you try to deactivate a database without using the FORCE option with existing in-doubt transactions.
USER username
Specifies the user stopping the database.
USING password
Specifies the password for the user name.

Usage notes

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.