Stopping instances (Windows)
You might need to stop the current instance of the database manager.
Before you begin
- 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.
- 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, use the LIST APPLICATIONS command.
- Force all applications and users off the database by using the FORCE APPLICATION command.
- 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.
About this task
Note: When you run commands to start or stop an instance,
the database manager applies the command to the current instance.
For more information, see Setting the current instance environment
variables.
Restrictions
The db2stop command can be run only 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. To stop an instance, all services must be stopped.
Procedure
To stop the instance:
- From the command line, enter the db2stop command. The Db2 database manager applies the command to the current instance.
- From the command line, enter the NET STOP command.
- From IBM Data Studio, open the task assistant for stopping the instance.