Previous Topic: SET TRANSACTIONNext Topic: TRANSFER OWNERSHIP


SUSPEND SESSION

The SUSPEND SESSION management statement suspends an SQL session and any transaction currently active within the session. You use the SUSPEND SESSION statement primarily in pseudoconversational programming. It is also a CA IDMS extension of the SQL standard.

Authorization

None required.

Syntax
►►─── SUSPEND SESSION ────────────────────────────────────────────────────────►◄
Usage

Effect of SUSPEND SESSION

When you suspend an SQL session, CA IDMS releases all resources except those required to re-establish the session. Resources required to re-establish the session include locks held by any currently active transaction, cursor currencies, and temporary tables, and dynamically prepared statements.

The SUSPEND SESSION statement does not cause a commit or rollback of changes to the database.

Valid SQL Statement After SUSPEND SESSION

The first SQL statement you issue after SUSPEND SESSION must be RESUME SESSION.

Example

Suspending a Session

The following SUSPEND SESSION statement suspends the current SQL session:

EXEC SQL
   SUSPEND SESSION
END-EXEC
More Information