skip to main content
Supported SQL statements and extensions : Alter Session (EXT)
  

Try DataDirect Drivers Now

Alter Session (EXT)

Purpose

Changes various attributes of a local or remote session. A local session maintains the state of the overall connection. A remote session maintains the state that pertains to a particular remote data source connection.

Syntax

ALTER SESSION SET attribute_name=value
where:
attribute_name
specifies the name of the attribute to be changed. Attributes apply to either local or remote sessions.
value
specifies the value for that attribute.
The following table lists the local and remote session attributes, and provides descriptions of each.
Table 15. Alter Session Attributes
Attribute Name
Session Type
Description
Current_Schema
Local
Sets the current schema for the local session. The current schema is the schema used when an identifier in a SQL statement is unqualified. The string value must be the name of a schema visible in the local session. For example:
ALTER SESSION SET CURRENT_SCHEMA=JIRA
Stmt_Call_Limit
Local
Sets the maximum number of Web service calls the driver can make in executing a statement. Setting the Stmt_Call_Limit attribute has the same effect as setting the StmtCallLimit connection property. It sets the default Web service call limit used by any statement on the connection. Executing this command on a statement overrides the previously set StmtCallLimit for the connection. The value specified must be a positive integer or 0. The value 0 means that no call limit exists. For example:
ALTER SESSION SET STMT_CALL_LIMIT=150
Ws_Call_Count
Remote
Resets the Web service call count of a remote session to the value specified. The value must be 0 or a positive integer. WS_Call_Count represents the total number of Web service calls made to the remote data source instance for the current session. For example:
ALTER SESSION SET jira.WS_CALL_COUNT=0
The current value of WS_Call_Count can be obtained by referring to the System_Remote_Sessions system table (see SYSTEM_REMOTE_SESSIONS Catalog Table for details). For example:
SELECT * from information_schema.system_remote_sessions WHERE session_id = cursessionid()