Alter Session (EXT)
- Last Updated: June 14, 2020
- 1 minute read
- DataDirect Connectors
- JDBC
- Oracle Service Cloud 5.1
- Documentation
Purpose
The Alter Session statement changes various attributes of a database session or a remote session. A database 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 database sessions or remote sessions.
- value
- refers to the specific value setting for that attribute.
The following table lists the database and remote session attributes, and provides their descriptions.
| Attribute Name | Session Type | Description |
|---|---|---|
| Current_Schema | Database | Sets the current schema for the database 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 database
session. For example:
|
| Stmt_Call_Limit | Database | Sets the maximum number of Web service calls the
driver can make when executing a statement. Setting the Stmt_Call_Limit attribute
has the same effect as setting the StmtCallLimit connection option. 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 for this attribute can be -1, 0, or a positive integer: If -1 is specified, the limit is the default value configured in the service when connected to a site whose version is August 2014 or later. When connected to a site whose version is prior to August 2014, the driver sets the maximum number of calls to 100. If 0 is specified, the limit is the maximum number of calls allowed by the service when connected to sites whose version is August 2014 or later. For versions prior to August 2014, there is no limit. For example, the following statement sets the statement call limit to 10 Web service calls:
Note: If you specify a value that is greater than the maximum value allowed by the
service when connecting to a site whose version is August 2014 or later, the
driver returns a warning indicating that it will use the service defined maximum
instead of the value specified.
|
| Ws_Call_Count | Remote | Resets the Web service call count of a remote
session to the value specified. The value must be zero 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:
|