IBM Books

Administrative API Reference

sqlepstp - Stop Database Manager

Stops the current database manager instance. Unless explicitly stopped, the database manager continues to be active. This API does not stop the database manager instance if any applications are connected to databases. If there are no database connections, but there are instance attachments, it forces the instance attachments and stops the database manager. This API also deactivates any outstanding database activations before stopping the database manager.

This API can also be used to drop a node from the db2nodes.cfg file (MPP systems only).

This API is not valid on a client.

Scope

In a multi-node environment, this API affects all nodes that are listed in the $HOME/sqllib/db2nodes.cfg file, unless the nodenum parameter is used (see SQLEDBSTOPOPT).

Authorization

One of the following:

Note:On OS/2, no authorization is required if the ss_logon database manager configuration parameter is set to 0.

Required Connection

None

Version

sqlenv.h

C API Syntax



/* File: sqlenv.h */
/* API: Stop Database Manager */
/* ... */
SQL_API_RC SQL_API_FN
  sqlepstp (
    struct sqledbstopopt * pStopOptions,
    struct sqlca * pSqlca);
/* ... */
 

Generic API Syntax



/* File: sqlenv.h */
/* API: Stop Database Manager */
/* ... */
SQL_API_RC SQL_API_FN
  sqlgpstp (
    struct sqledbstopopt * pStopOptions,
    struct sqlca * pSqlca);
/* ... */
 

API Parameters

pStopOptions
A pointer to the sqledbstopopt structure. This structure contains the stop options. The pointer can be null. For more information about this structure, see SQLEDBSTOPOPT.

pSqlca
Output. A pointer to the sqlca structure. For more information about this structure, see SQLCA.

REXX API Syntax

This API can be called from REXX through the SQLDB2 interface. See How the API Descriptions are Organized, or the Application Development Guide. For a description of the syntax, see the Command Reference.

Sample Programs

C
\sqllib\samples\c\dbstop.c

COBOL
\sqllib\samples\cobol\dbstop.cbl

FORTRAN
\sqllib\samples\fortran\dbstop.f

REXX
\sqllib\samples\rexx\dbstop.cmd

Usage Notes

It is not necessary to call this API on a client node. It is provided for compatibility with older clients, but it has no effect on the database manager.

Once started, the database manager instance runs until the user stops it, even if all application programs that were using it have ended.

If the database manager cannot be stopped because application programs are still connected to databases, use sqlefrce - Force Application to disconnect all users first, or call the sqlepstp API again with the FORCE option.

The following information currently applies to multiple node environments only:

See Also

sqle_deactivate_db - Deactivate Database

sqledrpn - Drop Node Verify

sqlefrce - Force Application

sqlepstart - Start Database Manager.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]