ALTER SESSION RESET
Resets the session state of the current connection to its initial values
ALTER SESSION RESET
Resetting the session can be useful for reusing the connection by a client application (for example, by a client-side connection pool).When this statement is executed, all user context variables are cleared, contents of global temporary tables are cleared, and all session-level settings are reset to their initial values.
It is possible to execute ALTER SESSION RESET
without a transaction.
Execution of ALTER SESSION RESET
performs the following steps:
Error isc_ses_reset_err (335545206
) is raised if any transaction is active in the current session other than the current transaction (the one executing ALTER SESSION RESET
) and two-phase transactions in the prepared state.
System variable RESETTING
is set to TRUE.
ON DISCONNECT
database triggers are fired, if present and if database triggers are not disabled for the current connection.
The current transaction (the one executing ALTER SESSION RESET
), if present, is rolled back.A warning is reported if this transaction modified data before resetting the session.
Session configuration is reset to their initial values.This includes, but is not limited to:
DECFLOAT
parameters (TRAP
and ROUND
) are reset to the initial values defined using the DPB at connect time, or otherwise the system default.
Session and statement timeouts are reset to zero.
The current role is restored to the initial value defined using DPB at connect time, and — if the role changed — the security classes cache is cleared.
The session time zone is reset to the initial value defined using the DPB at connect time, or otherwise the system default.
The bind configuration is reset to the initial value defined using the DPB at connect time, or otherwise the database or system default.
In general, configuration values should revert to the values configured using the DPB at connect time, or otherwise the database or system default.
Context variables defined for the USER_SESSION
namespace are removed (USER_TRANSACTION
was cleared earlier by the transaction roll back).
Global temporary tables defined as ON COMMIT PRESERVE ROWS
are truncated (their contents is cleared).
ON CONNECT
database triggers are fired, if present and if database triggers are not disabled for the current connection.
A new transaction is implicitly started with the same parameters as the transaction that was rolled back (if there was a transaction)
System variable RESETTING
is set to FALSE.
Note
|
|