db_stop_engine Function

Stops execution of the database server.

Syntax

unsigned int db_stop_engine( SQLCA * sqlca, char * parms );

Parameters

Returns

Non-zero if successful; 0 otherwise.

Remarks

The steps carried out by this function are:

By default, this function does not stop a database server that has existing connections. If the Unconditional=yes connection parameter is specified, the database server is stopped regardless of existing connections.

A C program can use this function instead of spawning dbstop. A return value of TRUE indicates that there were no errors.

The use of db_stop_engine is subject to the privileges set with the -gk server option.