ALTER SESSION

statementsupportedAccounts, users, sessions, warehouses

docs.snowflake.com ↗

Sets parameters that change the behavior for the current session.

Syntax

supportedpartialnot supportednot scored

ALTER SESSION SET sessionParams

ALTER SESSION UNSET <param_name> [ , <param_name> , ... ]

Where

sessionParams ::=
  ABORT_DETACHED_QUERY = TRUE | FALSE
  ACTIVE_PYTHON_PROFILER = 'LINE' | 'MEMORY'
  AUTOCOMMIT = TRUE | FALSE
  BINARY_INPUT_FORMAT = <string>
  BINARY_OUTPUT_FORMAT = <string>
  DATE_INPUT_FORMAT = <string>
  DATE_OUTPUT_FORMAT = <string>
  ERROR_ON_NONDETERMINISTIC_MERGE = TRUE | FALSE
  ERROR_ON_NONDETERMINISTIC_UPDATE = TRUE | FALSE
  GEOGRAPHY_OUTPUT_FORMAT = 'GeoJSON' | 'WKT' | 'WKB' | 'EWKT' | 'EWKB'
  HYBRID_TABLE_LOCK_TIMEOUT = <num>
  JSON_INDENT = <num>
  LOG_LEVEL = <string>
  LOCK_TIMEOUT = <num>
  OPT_OUT_ERROR_LOGGING = TRUE | FALSE
  PYTHON_PROFILER_TARGET_STAGE = <string>
  PYTHON_PROFILER_MODULES = <string>
  QUERY_TAG = <string>
  ROWS_PER_RESULTSET = <num>
  S3_STAGE_VPCE_DNS_NAME = <string>
  SEARCH_PATH = <string>
  SIMULATED_DATA_SHARING_CONSUMER = <string>
  STATEMENT_TIMEOUT_IN_SECONDS = <num>
  STRICT_JSON_OUTPUT = TRUE | FALSE
  TIMESTAMP_DAY_IS_ALWAYS_24H = TRUE | FALSE
  TIMESTAMP_INPUT_FORMAT = <string>
  TIMESTAMP_LTZ_OUTPUT_FORMAT = <string>
  TIMESTAMP_NTZ_OUTPUT_FORMAT = <string>
  TIMESTAMP_OUTPUT_FORMAT = <string>
  TIMESTAMP_TYPE_MAPPING = <string>
  TIMESTAMP_TZ_OUTPUT_FORMAT = <string>
  TIMEZONE = <string>
  TIME_INPUT_FORMAT = <string>
  TIME_OUTPUT_FORMAT = <string>
  TRACE_LEVEL = <string>
  TRANSACTION_DEFAULT_ISOLATION_LEVEL = <string>
  TWO_DIGIT_CENTURY_START = <num>
  UNSUPPORTED_DDL_ACTION = <string>
  USE_CACHED_RESULT = TRUE | FALSE
  WEEK_OF_YEAR_POLICY = <num>
  WEEK_START = <num>

Parameters

NameRequiredDescription
SET ...Specifies one (or more) parameters to set for the session (separated by blank spaces, commas, or new lines). For descriptions of each of the parameters you can set for a session, see Parameters.
UNSET ...Specifies one (or more) parameters to unset for the session, which resets them to the defaults. You can reset multiple parameters with a single ALTER statement; however, each property must be separated by a comma. When resetting a property, specify only the name; specifying a value for the property will return an error.

Usage notes

See also