DB2 Version 10.1 for Linux, UNIX, and Windows

sqleintr API - Interrupt application requests

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

API and data structure syntax

SQL_API_RC SQL_API_INTR
        sqleintr ( void );

SQL_API_RC SQL_API_FN
  sqlgintr (
        void);

sqleintr API parameters

None

Usage notes

No database manager APIs should be called from an interrupt handler except sqleintr. 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 operation on other APIs:

Table 1. INTERRUPT actions
Database activity Action
BACKUP Utility cancelled. Data on media may be incomplete.
BIND Binding cancelled. Package creation rolled back.
COMMIT None. COMMIT completes.
CREATE DATABASE/CREATE DATABASE AT NODE/ADD NODE/DROP NODE VERIFY After a certain point, these APIs are not interruptible. If the interrupt call is received before this point, the database is not created. If the interrupt call is received after this point, it is ignored.
DROP DATABASE/DROP DATABASE AT NODE None. The APIs complete.
EXPORT/IMPORT/RUNSTATS Utility cancelled. Database updates rolled back.
FORCE APPLICATION None. FORCE APPLICATION completes.
LOAD Utility cancelled. Data in table may be incomplete.
PREP Precompile cancelled. Package creation rolled back.
REORGANIZE TABLE The interrupt will be delayed until the copy is complete. The recreation of the indexes will be resume on the next attempt to access the table.
RESTORE Utility cancelled. DROP DATABASE performed. Not applicable to table space level restore.
ROLLBACK None. ROLLBACK completes.
Directory services Directory left in consistent state. Utility function may or may not be performed.
SQL data definition statements Database transactions are set to the state existing before invocation of the SQL statement.
Other SQL statements Database transactions are set to the state existing before invocation of the SQL statement.

REXX API syntax

INTERRUPT

Examples

call SQLDBS 'INTERRUPT'