- Categories:
System functions (System Information)
SYSTEM$VALIDATE_ ACCOUNT_ DELETION¶
Returns every condition that blocks dropping an account. The function is read-only: it doesn’t drop the account or change any objects.
An organization administrator can call this function for the account they plan to drop. The result lists every blocker in one response, including blockers you can remove and blockers that require Snowflake Support.
- See also:
Syntax¶
Arguments¶
account_nameName of the account to check. Specify the account name, not the account locator. For example, if the account identifier is
myorg-account123, specifyaccount123.
Returns¶
Returns a JSON object:
| Key | Data type | Description |
|---|---|---|
| account | STRING | Name of the account that was checked. |
| blocked | BOOLEAN | true when one or more conditions block DROP ACCOUNT. false when the account can be dropped. |
| errors | ARRAY | Objects that describe each blocker. See the following table. |
Each object in the errors array contains the following keys:
| Key | Data type | Description |
|---|---|---|
| code | STRING | Error code. See Error codes. |
| message | STRING | Error message. The message can include the names or types of the objects that block the drop. A long list of names can be truncated. |
Error codes¶
If DROP ACCOUNT fails, use the error code to find what to remove or who to contact before you retry the command. The condition column summarizes why the drop is blocked. The message value in the function output can be more specific and can name the blocking objects.
| Error code | Condition | Resolution |
|---|---|---|
003772 | Cannot drop account with active listings, please drop all listings in the account then retry, might need to retire marketplace listings first. | ALTER LISTING, DROP LISTING |
003773 | Cannot drop account with shares attached to listings, please drop all listings attached to the shares then retry, might need to retire marketplace listings first. | DROP LISTING, DROP SHARE |
004001 | Cannot drop account owning organization profiles with associated listings. To unblock dropping this account, drop the associated listings first or reach out to Support for additional help. | DROP ORGANIZATION PROFILE |
003830 | The account has secondary connections. | DROP CONNECTION |
003831 | The account has a primary connection with secondary connections. | DROP CONNECTION, ALTER CONNECTION |
003832 | The account has primary and secondary connections. | DROP CONNECTION, ALTER CONNECTION |
003155 | The account hosts a global database or a replication group. | DROP REPLICATION GROUP, DROP FAILOVER GROUP, ALTER FAILOVER GROUP |
060173 | Organization users or organization user groups still exist. | DROP ORGANIZATION USER GROUP, DROP ORGANIZATION USER |
511836 | A backup is under a legal hold. | ALTER BACKUP SET |
060014 | Drop account is not supported for Organization Accounts. Please contact support if you wish to drop this Organization account. | Snowflake Support |
060182 | The organization has an outstanding billing balance. | Snowflake Support |
003746 | The organization is locked for maintenance. | Snowflake Support |
Access control requirements¶
Only an organization administrator can call this function.
Usage notes¶
The function doesn’t drop the account. After you remove the blockers, run DROP ACCOUNT.
Examples¶
The following example checks whether the account ACCOUNT1 can be dropped. The account is blocked by active listings and a replication group:
Output: