IBM Books

API Reference

sqleintr - Interrupt

Stops a request. This API is called from a control break signal handler in an application. The control break signal handler can be the default, installed by sqleisig - Install Signal Handler, or a routine supplied by the programmer and installed using an appropriate operating system call.

Authorization

None

Required Connection

None

API Include File

sqlenv.h

C API Syntax



/* File: sqlenv.h */
/* API: Interrupt */
/* ... */
SQL_API_RC SQL_API_FN
  sqleintr (
    void);
/* ... */

Generic API Syntax



/* File: sqlenv.h */
/* API: Interrupt */
/* ... */
SQL_API_RC SQL_API_FN
  sqlgintr (
    void);
/* ... */

API Parameters

The INTERRUPT API does not accept any parameters.

REXX API Syntax



INTERRUPT

Example

call SQLDBS 'INTERRUPT'

Usage Notes

No database manager APIs should be called from an interrupt handler except the INTERRUPT API. However, the system will not prevent it.

Any database transaction in a state of committing or rollback cannot be interrupted.

An interrupted database manager request returns a code indicating that it was interrupted.

The following table summarizes the effect of an interrupt on other APIs:

Table 5. INTERRUPT Actions
Database Activity Action
IMPORT/EXPORT
Utility cancelled. Database updates rolled back.
REORGANIZE TABLE Utility cancelled. Table is left in its previous state.
BACKUP Utility cancelled. Data on media may be incomplete.
RESTORE Utility cancelled. DROP DATABASE performed. Not applicable to table space level restore.
LOAD Utility cancelled. Data in table may be incomplete.
PREP Precompile cancelled. Package creation rolled back.
BIND Binding cancelled. Package creation rolled back.
COMMIT None. COMMIT completes.
FORCE APPLICATION None. FORCE APPLICATION completes.
ROLLBACK None. ROLLBACK completes.
CREATE DATABASE/CREATE DATABASE AT NODE/ADD NODE/DROP NODE VERIFY After a certain point, these APIs are not interruptible. If the interrupt is received before this point, the database is not created. If the interrupt is received after this point, the interrupt is ignored.
DROP DATABASE/DROP DATABASE AT NODE None. These APIs complete.
Directory Services Directory left in consistent state. Utility function may or may not be performed.
SQL Data Definition statements Database transactions set to state existing prior to the SQL statement.
Other SQL statements Database transactions set to state existing prior to the SQL statement.

See Also

sqleisig - Install Signal Handler.


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

[ DB2 List of Books | Search the DB2 Books ]