Skip to content

ALTER SESSION

ALTER SESSION#

Syntax#

alter_session ::=#

alter_session_image246

set_transaction_clause ::=

alter_session_set_clause ::=#

alter_session_set_clause_image247

replication_mode_set_clause ::=#

replication_mode_set_clause_image248

dblink_session_close_clause_image249

Description#

This statement is used to change the attributes of the current session.

alter_session_set_clause#

For more information on property_name and property_value in alter_session_set_clause, please refer to Chapter 2 of the General Reference, which explains all Altibase properties.

replication_mode_set_clause#

This clause is used to set the replication mode for transactions that are executed in the current session.

If DEFAULT is specified, replication will be performed in the mode that was selected as the default mode when the replication object was created. However, if NONE is specified, none of the DDL, DML, or DCL statements executed in the session will be replicated.

For more detailed information on the replication mode, please refer to the Replication Manual.

When a user connects to a server, a session is created in the server. If Database Link is used in that session, a Database Link session, for use in performing Database Link-related tasks, is created in association with the session allocated to the user. When the user's session is subsequently terminated, the Database Link session is also terminated. However, if the user's session is not terminated after the Database Link operations have been performed, the Database Link session will also needlessly remain open.

In such cases, dblink_session_close_clause can be used to explicitly end the Database Link session.

set_transaction_clause#

The SET TRANSACTION statement is used to set the current transaction as read-only or read/write, or to set its isolation level. For more information on the SET TRANSACTION statement, refer to the description section of the SET TRANSACTION statement.

Example#

<Query> Close the database link session only, keeping the current session alive.

iSQL> ALTER SESSION CLOSE DATABASE LINK ALL;