弃用账户
组织管理员可以弃用某个账户,并将其从系统中删除。弃用的账户不会立即被删除,而是进入一个宽限期,在此期间管理员可以恢复(“撤销弃用”)该账户。宽限期结束后,Snowflake 会从系统中清除已弃用的账户。
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.
If the organization administrator is using the ORGADMIN role to drop an account, they cannot drop the account while they are logged in to it; they must log in to a different ORGADMIN-enabled 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.
关于宽限期
When dropping the account, the organization administrator defines a grace period during which the account can be restored. Once an account is dropped, it is locked to prevent activity during the grace period. An organization continues to pay for the cost of account storage during the grace period.
最短宽限期为 3 天,最长宽限期为 90 天,不包括当前日期。例如,如果组织管理员在周一上午 11 点弃用账户且将宽限期定义为 3 天,那么宽限期将在周四上午 11 点到期。
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.
弃用提供了列表、阅读者账户和共享内容的账户
You cannot drop an account that has active listings shared to specific consumers or listings published on the Snowflake Marketplace. Before you can drop the account, you must do the following:
- Delete any listings provided by the account. Listings subject to a retirement policy must complete the retirement flow before the account can be dropped. See Remove listings as a provider.
- 弃用与列表相关的共享内容。
如果账户向使用者提供共享内容或阅读者账户,则提供商账户的组织管理员应联系这些使用者,并告知其将无法访问即将被弃用的账户所提供的共享内容和阅读者账户。
账户被弃用后,共享数据和数据产品随即发生以下情况:
- 共享内容停止工作。使用者无法访问该账户共享的数据。
- 阅读者账户将随提供商账户一同被弃用并删除。
弃用账户
As the organization administrator, you can drop an account using Snowsight or SQL.
- Snowsight:
- In the navigation menu, select Admin » Accounts.
- Find the active account, and select … » Drop Account.
- Enter a grace period during which the account can be restored.
- Select Drop Account.
- SQL:
Execute the DROP ACCOUNT command.
For example, to drop an account
my_accountand allow a 14-day grace period for recovering the account, enter:
Note
If you want to drop a reader account, execute the DROP MANAGED ACCOUNT command.
查看已弃用的账户
组织管理员有多种途径来查看仍在宽限期内的弃用账户。其中一些途径还会显示已从系统中永久删除的弃用账户。
- Snowsight:
As the organization administrator, you can use Snowsight to view all dropped accounts, including those that have been permanently deleted.
- In the navigation menu, select Admin » Accounts.
- 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 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 the following command:
The output includes dropped accounts and the additional
dropped_on,scheduled_deletion_time, andrestored_oncolumns.- 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.
恢复账户
组织管理员可以在宽限期内对弃用账户进行恢复或撤销弃用,宽限期可防止账户被清除。撤销弃用后,账户随即解锁,用户就可以访问该账户,仿佛其从未被弃用。
As the organization administrator, you can undrop an account using Snowsight or SQL.
- Snowsight:
- In the navigation menu, select Admin » Accounts.
- Select the Dropped Accounts tab.
- Find the account, and select … » Undrop Account.
- 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: