DB2 Version 9.7 for Linux, UNIX, and Windows

Stopping instances (Windows)

You might need to stop the current instance of the database manager.

About this task

Note: When you run commands to start or stop an instance's database manager, the database manager applies the command to the current instance. For more information, see Setting the current instance environment variables.

The db2stop command can only be run at the server. No database connections are allowed when running this command; however, if there are any instance attachments, they are forced off before the DB2 database service is stopped.

When you are using the database manager in a partitioned database environment, each database partition server is started as a service. Each service must be stopped.

Before you begin

To stop an instance on your system, you must do the following:
  1. The user account stopping the DB2® database service must have the correct privilege as defined by the Windows operating system. The user account can be a member of the Administrators, Server Operators, or Power Users group.
  2. Display all applications and users that are connected to the specific database that you want to stop. To ensure that no vital or critical applications are running, list applications. You need SYSADM, SYSCTRL, or SYSMAINT authority for this.
  3. Force all applications and users off the database. You require SYSADM or SYSCTRL authority to force users.
  4. If command line processor sessions are attached to an instance, you must run the TERMINATE command to end each session before running the db2stop command.

Procedure

To stop the instance: