Making objects unavailable

You can make databases, table spaces, and index spaces unavailable by using the STOP DATABASE command.

Before you begin

If an object is in STOP-pending (STOPP) status, you must issue the START DATABASE command to remove the STOPP status.

About this task

When you issue the STOP DATABASE command for a table space, the data sets that contain that table space are closed and deallocated.

You also can stop Db2 subsystem databases (catalog, directory, and work file). After the directory is stopped, installation SYSADM authority is required to restart it.

Procedure

Begin general-use programming interface information.To stop databases, table spaces, or index spaces:

Issue the STOP DATABASE command with the appropriate options.
Type of object that you want to stop How to issue the STOP DATABASE command
To stop a physical partition of a table space: Use the PART option.
To stop a physical partition of an index space: Use the PART option.
To stop a logical partition within a nonpartitioning index that is associated with a partitioned table space: Use the PART option.
To stop any object as quickly as possible: Use the AT(COMMIT) option.
To stop user-defined databases:

Start database DSNDB01 and table spaces DSNDB01.DBD01, DSNDB01.SYSDBDXA, and DSNDB01.SYSLGRNX before you stop user-defined databases. If you do not do start these objects, you receive message DSNI003I. Resolve the problem and run the job again.

To stop the work file database:

Start database DSNDB01 and table spaces DSNDB01.DBD01 DSNDB01.SYSDBDXA, and DSNDB01.SYSLGRNX before you stop the work file database. If you do not do start these objects, you receive message DSNI003I. Resolve the problem and run the job again.

End general-use programming interface information.