Categories:

Account & Session DDL

ALTER ACCOUNT

Modifies parameters for your account. Can be used to modify any type of parameter (account, session, or object) at the account level. The command can only be executed by:

  • Users with the ACCOUNTADMIN role (i.e. account administrators), who can use the command to set:

    • Account parameters, which cannot be changed by any other users.

    • Session and object parameters, which serve as the parameter defaults for users, sessions, and the relevant objects. These defaults can be overridden at any time.

  • Users with the SECURITYADMIN role (i.e. security administrators), who can use the command to set the NETWORK_POLICY account parameter.

For more information about setting parameters at the account level, see Parameter Management. For parameter details, see Parameters.

Syntax

ALTER ACCOUNT SET { [ accountParams ] [ sessionParams ] [ objectParams ] }

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

Where:

accountParams ::=
    CLIENT_ENCRYPTION_KEY_SIZE = <integer>
    NETWORK_POLICY = <string>
    PERIODIC_DATA_REKEYING = TRUE | FALSE
    RESOURCE_MONITOR = <monitor_name>
    SAML_IDENTITY_PROVIDER = <json_object>
    SSO_LOGIN_PAGE = TRUE | FALSE
sessionParams ::=
    ABORT_DETACHED_QUERY = TRUE | FALSE
    AUTOCOMMIT = TRUE | FALSE
    DATE_INPUT_FORMAT = <string>
    DATE_OUTPUT_FORMAT = <string>
    ERROR_ON_NONDETERMINISTIC_MERGE = TRUE | FALSE
    ERROR_ON_NONDETERMINISTIC_UPDATE = TRUE | FALSE
    LOCK_TIMEOUT = <num>
    QUERY_TAG = <string>
    ROWS_PER_RESULTSET = <num>
    STATEMENT_TIMEOUT_IN_SECONDS = <num>
    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>
    TRANSACTION_DEFAULT_ISOLATION_LEVEL = <string>
    TWO_DIGIT_CENTURY_START = <num>
    UNSUPPORTED_DDL_ACTION = <string>
    USE_CACHED_RESULT = TRUE | FALSE
objectParams ::=
    DATA_RETENTION_TIME_IN_DAYS = <num>
    MAX_CONCURRENCY_LEVEL = <num>
    STATEMENT_QUEUED_TIMEOUT_IN_SECONDS = <num>
    STATEMENT_TIMEOUT_IN_SECONDS = <num>

Parameters

SET ...

Specifies one (or more) account, session, and object parameters to set for your account (separated by blank spaces, commas, or new lines):

  • Account parameters cannot be changed by any other users.

  • Session and object parameters set at the account level serve only as defaults and can be changed by other users.

For descriptions of the parameters you can set for your account, see Parameters.

UNSET ...

Specifies one (or more) account, session, and object parameters to unset for your account, which resets them to the system defaults.

You can reset multiple properties 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

  • Account parameters can be set only at the account level.

  • Session and object parameters that are set using this command serve only as defaults:

    • Session parameters can be overridden at the individual user and session level.

    • Object parameters can be overridden at the individual object level.

  • Setting a resource monitor at the account level controls the credit usage for all virtual warehouses created in the account, but does not impact the credit usage for any of the Snowflake-provided warehouses. For more details, see Working with Resource Monitors.

Examples

Associate a network policy named mypolicy with your account:

ALTER ACCOUNT SET NETWORK_POLICY = mypolicy;

Remove the network policy association from your account:

ALTER ACCOUNT UNSET NETWORK_POLICY;