ALTER ACCOUNT¶
Modifies an account. The ALTER ACCOUNT command has two purposes:
Allows account administrators (that is, users with the ACCOUNTADMIN role) to modify parameters and other settings at the account level. For example, the account administrator can set the resource monitor or enable a security feature for an account. For these actions, the account administrator executes ALTER ACCOUNT from the account being modified.
Allows organization administrators (that is, users with the ORGADMIN role) to modify core characteristics of an account. For example, the organization administrator can rename an account. For these actions, the organization administrator executes ALTER ACCOUNT from a different account than the one being modified.
Note
While ALTER ACCOUNT is primarily executed by account administrators and organization administrators, users with the SECURITYADMIN role can use it to set the network policy for the account.
Syntax¶
The syntax for ALTER ACCOUNT varies depending on whether you are modifying the current account or a different account.
Altering the current account¶
ALTER ACCOUNT SET { [ accountParams ] | [ objectParams ] | [ sessionParams ] }
ALTER ACCOUNT UNSET <param_name> [ , ... ]
ALTER ACCOUNT SET RESOURCE_MONITOR = <monitor_name>
ALTER ACCOUNT SET { AUTHENTICATION | PASSWORD | SESSION } POLICY <policy_name>
ALTER ACCOUNT UNSET { AUTHENTICATION | PASSWORD | SESSION } POLICY
ALTER ACCOUNT SET PACKAGES POLICY <policy_name> [ FORCE ]
ALTER ACCOUNT UNSET { PACKAGES | PASSWORD | SESSION } POLICY
ALTER ACCOUNT SET TAG <tag_name> = '<tag_value>' [ , <tag_name> = '<tag_value>' ... ]
ALTER ACCOUNT UNSET TAG <tag_name> [ , <tag_name> ... ]
Where:
accountParams ::= ALLOW_ID_TOKEN = TRUE | FALSE CLIENT_ENCRYPTION_KEY_SIZE = <integer> CORTEX_ENABLED_CROSS_REGION = { 'DISABLED' | 'ANY_REGION' | '<list_of_regions>' } ENABLE_INTERNAL_STAGES_PRIVATELINK = TRUE | FALSE ENFORCE_NETWORK_RULES_FOR_INTERNAL_STAGES = TRUE | FALSE EXTERNAL_OAUTH_ADD_PRIVILEGED_ROLES_TO_BLOCKED_LIST = TRUE | FALSE INITIAL_REPLICATION_SIZE_LIMIT_IN_TB = <num> NETWORK_POLICY = <string> OAUTH_ADD_PRIVILEGED_ROLES_TO_BLOCKED_LIST = TRUE | FALSE PERIODIC_DATA_REKEYING = TRUE | FALSE PREVENT_UNLOAD_TO_INLINE_URL = TRUE | FALSE PREVENT_UNLOAD_TO_INTERNAL_STAGES = 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 | FALSEobjectParams ::= DATA_RETENTION_TIME_IN_DAYS = <integer> ENABLE_PERSONAL_DATABASE = { TRUE | FALSE } ENABLE_UNREDACTED_QUERY_SYNTAX_ERROR = TRUE | FALSE MAX_DATA_EXTENSION_TIME_IN_DAYS = <integer> EXTERNAL_VOLUME = <external_volume_name> CATALOG = <catalog_integration_name> DEFAULT_DDL_COLLATION = '<collation_specification>' MAX_CONCURRENCY_LEVEL = <num> NETWORK_POLICY = <string> PIPE_EXECUTION_PAUSED = TRUE | FALSE REPLACE_INVALID_CHARACTERS = TRUE | FALSE STATEMENT_QUEUED_TIMEOUT_IN_SECONDS = <num> STATEMENT_TIMEOUT_IN_SECONDS = <num> STORAGE_SERIALIZATION_POLICY = COMPATIBLE | OPTIMIZEDsessionParams ::= 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> 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> 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.
Altering a different account¶
ALTER ACCOUNT <name> SET IS_ORG_ADMIN = { TRUE | FALSE }
ALTER ACCOUNT <name> RENAME TO <new_name> [ SAVE_OLD_URL = { TRUE | FALSE } ]
ALTER ACCOUNT <name> DROP OLD URL
ALTER ACCOUNT <name> DROP OLD ORGANIZATION URL
Parameters for altering the current account¶
Use the following parameters when modifying the current account.
For more information about setting parameters at the account level, see Parameter management. For details about a particular parameter, see 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 resource_monitor_name
Special parameter that specifies the name of the resource monitor used to control all virtual warehouses created in the account.
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.
SET { AUTHENTICATION | PASSWORD | SESSION } POLICY policy_name
Specifies one of the following policies for the account:
SET PACKAGES POLICY policy_name [ FORCE ]
Specifies the packages policy to set for the account. If a packages policy is already set on the current account, you can use FORCE to set the packages policy without having to unset the packages policy first.
UNSET { PACKAGES | PASSWORD | SESSION } POLICY
Unsets the packages policy, password policy, or session policy for the account.
TAG tag_name = 'tag_value' [ , tag_name = 'tag_value' , ... ]
Specifies the tag name and the tag string value.
The tag value is always a string, and the maximum number of characters for the tag value is 256.
For information about specifying tags in a statement, see Tag quotas for objects and columns.
Parameters for altering a different account¶
Use the following parameters when using the current account to modify a different account. Only organization administrators (i.e. users with the ORGADMIN role) can use these parameters.
name
Specifies the name of the account that is being modified.
SET
Specifies an account property to set for the account.
IS_ORG_ADMIN = { TRUE | FALSE }
Sets an account property that determines whether the ORGADMIN role is enabled in the account. Only an organization administrator (i.e. user with the ORGADMIN role) can set the property.
To enable the ORGADMIN role for an account, specify
SET IS_ORG_ADMIN = TRUE
.You cannot set the property to
FALSE
from the current account. As a workaround, enable the role in a different account, and then switch to that account before executing the ALTER ACCOUNT command.By default, the ORGADMIN role can be enabled in a maximum of 8 accounts. If your organization requires more accounts with the ORGADMIN role, contact Snowflake Support.
RENAME TO new_name
Changes the name of an account to the specified name.
Organization administrators cannot rename an account while they are logged in to it, so they must log in to a different account before executing the ALTER ACCOUNT command. If your organization consists of a single account that needs to be renamed, contact Snowflake Support.
SAVE_OLD_URL = { TRUE | FALSE }
Optional parameter used in conjunction with
RENAME TO
that preserves the account URL used to access Snowflake prior to renaming. By default, Snowflake saves the original URL, which means you can access the account with either the old URL or the URL that contains the new account name. When set toFALSE
, you must use the new URL to access the account.- Default:
TRUE
DROP OLD URL
Removes the original account URL of an account that was renamed. Once the old URL is dropped, you must access the account with the URL that contains the new account name.
If an account has an old account URL because it was moved to another organization, had its organization renamed, or was part of an organization that was merged, use the ALTER ACCOUNT … DROP OLD ORGANIZATION URL instead.
DROP OLD ORGANIZATION URL
Removes the original account URL of an account after one of the following occurs:
Account moved to another organization
Account had its organization renamed.
Account was part of an organization that was merged with another organization.
If an account has an old account URL because the account, not the organization, was renamed, use the ALTER ACCOUNT … DROP OLD URL command instead.
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:
User parameters can be overridden at the individual user level.
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.
Regarding metadata:
Attention
Customers should ensure that no personal data (other than for a User object), sensitive data, export-controlled data, or other regulated data is entered as metadata when using the Snowflake service. For more information, see Metadata fields in Snowflake.
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;
Set the packages policy at the account level.
ALTER ACCOUNT SET PACKAGES POLICY packages_policy_prod_1 FORCE;Note
If a packages policy is already set on the current account, you can use FORCE to set the packages policy without having to unset the packages policy first.
Unset the packages policy.
ALTER ACCOUNT UNSET PACKAGES POLICY;