Dropping an Account

The organization administrator (i.e. a user with the ORGADMIN role) can drop an account to delete it from the system. A dropped account is not deleted immediately, but rather enters a grace period during which the administrator can restore (“undrop”) the account. When the grace period expires, Snowflake purges the dropped account from the system.

The organization administrator cannot drop an account while they are logged in to it; they must log in to a different ORGADMIN account before executing the DROP ACCOUNT command. This means that the organization administrator cannot drop the last account in the organization. If your organization consists of a single account that needs to be deleted, contact Snowflake Support.

Tip

Because Snowflake does not permanently delete an account when it is initially dropped, you cannot immediately create a new account with the same name as the one you just dropped. As a workaround, rename the account before dropping it.

About the Grace Period

When dropping the account, the organization administrator defines a grace period during which the account can be restored, keeping in mind that the organization continues to pay for the cost of account storage during the grace period. Once an account is dropped, it is locked to prevent activity during the grace period.

The minimum grace period is 3 days and the maximum grace period is 90 days, not including the current date. For example, if the organization administrator defines the grace period as 3 days when they drop the account on Monday at 11 a.m., then the grace period expires on Thursday at 11 a.m.

If you want to change the grace period of a dropped account, restore the account, then drop it again with the new grace period.

The grace period is not the same as the data retention period of Time Travel.

Effect on Reader Accounts and Shares

Before dropping an account, the organization administrator should contact entities that use reader accounts and shares that rely on the account. Shares will stop working as soon as the account is dropped, and reader accounts are dropped and deleted at the same time as the parent account.

Dropping an Account

An organization administrator can drop an account using Snowsight, the Snowflake web interface, or SQL.

Snowsight
  1. Select Admin » Accounts.

  2. Find the active account, and select » Drop Account.

  3. Enter a grace period during which the account can be restored.

  4. Select Drop Account.

SQL

Execute the DROP ACCOUNT command.

For example, to drop an account my_account and allow a 14-day grace period for recovering the account, enter:

DROP ACCOUNT my_account GRACE_PERIOD_IN_DAYS = 14;
Copy

Note

If you want to drop a reader account, execute the DROP MANAGED ACCOUNT command.

Viewing Dropped Accounts

Organization administrators have multiple options for viewing dropped accounts that are still within their grace period. Some of these options also show dropped accounts that have been permanently deleted from the system.

Snowsight

You can use Snowsight to view all dropped accounts, including those that have been permanently deleted.

  1. Select Admin » Accounts.

  2. Select the Dropped Accounts tab.

Dropped accounts that are still within the grace period appear with a yellow indicator and have a Drop Date that is in the future.

Permanently deleted accounts have a Drop Date that is on or before the current date.

SQL

Executing the SHOW ORGANIZATION ACCOUNTS command with the optional HISTORY keyword shows dropped accounts that are still within their grace period. Permanently deleted accounts are not included in the output.

When the organization administrator executes:

SHOW ORGANIZATION ACCOUNTS HISTORY;
Copy

The output includes dropped accounts and the additional dropped_on, scheduled_deletion_time, and restored_on columns.

ACCOUNTS View

Users with access to the ORGANIZATION_USAGE schema can query the ACCOUNTS view to see all dropped accounts, including those that have been permanently deleted.

Restoring an Account

An organization administrator can restore (“undrop”) a dropped account within the grace period, which prevents it from being purged. Undropping an account unlocks it, allowing users to access the account as if it had never been dropped.

An organization administrator can undrop an account using Snowsight or SQL.

Snowsight
  1. Select Admin » Accounts.

  2. Select the Dropped Accounts tab.

  3. Find the account, and select » Undrop Account.

  4. Select Undrop Account.

SQL

Execute the UNDROP ACCOUNT command to restore an account. For example, the following command restores the dropped account myaccount123, which was still within the grace period:

UNDROP ACCOUNT myaccount123;
Copy