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:

  • Account administrators (i.e. users with the ACCOUNTADMIN role) to set and unset:

    • 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.

  • Security administrators (i.e. users with the SECURITYADMIN role) to set and unset the NETWORK_POLICY account parameter.

Can also be used to specify a resource monitor for controlling credit usage for all virtual warehouses created in the account.

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

Syntax

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

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

ALTER ACCOUNT SET RESOURCE_MONITOR = <monitor_name>

Where:

accountParams ::=
    ALLOW_ID_TOKEN = TRUE | FALSE
    CLIENT_ENCRYPTION_KEY_SIZE = <integer>
    INITIAL_REPLICATION_SIZE_LIMIT_IN_TB = <num>
    NETWORK_POLICY = <string>
    PERIODIC_DATA_REKEYING = TRUE | FALSE
    PREVENT_UNLOAD_TO_INLINE_URL = TRUE | FALSE
    REQUIRE_STORAGE_INTEGRATION_FOR_STAGE_CREATION = TRUE | FALSE
    REQUIRE_STORAGE_INTEGRATION_FOR_STAGE_OPERATION = TRUE | FALSE
    SAML_IDENTITY_PROVIDER = <json_object>
    SSO_LOGIN_PAGE = TRUE | FALSE
objectParams ::=
    DATA_RETENTION_TIME_IN_DAYS = <num>
    DEFAULT_DDL_COLLATION = '<collation_specification>'
    MAX_CONCURRENCY_LEVEL = <num>
    NETWORK_POLICY = <string>
    PIPE_EXECUTION_PAUSED = TRUE | FALSE
    STATEMENT_QUEUED_TIMEOUT_IN_SECONDS = <num>
    STATEMENT_TIMEOUT_IN_SECONDS = <num>
sessionParams ::=
    ABORT_DETACHED_QUERY = TRUE | FALSE
    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
    JSON_INDENT = <num>
    LOCK_TIMEOUT = <num>
    QUERY_TAG = <string>
    ROWS_PER_RESULTSET = <num>
    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>
    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>

Note

For readability, the complete list of session parameters that can be set for an account is not included here. For a complete list of all session parameters, with their descriptions, as well as account and object parameters, see Parameters.

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.

SET RESOURCE_MONITOR ...

Special parameter that specifies the name of the resource monitor used to control all virtual warehouses created in the account.

Values

Any existing resource monitor.

Default

None

Important

Setting a resource monitor at the account level does not impact any of the Snowflake-provided warehouses that Snowflake uses for Snowpipe, automatic reclustering, or materialized views. The credits consumed by these warehouses do not count towards the credit quota for an account-level resource monitor.

For more details, see Working with Resource Monitors.

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;