DROP SNAPSHOT¶
备注
Snowflake 的支持政策和服务级别协议 中规定的服务级别目前不包括此操作。
Removes a snapshot of a block storage volume. A snapshot is persisted data that the customer pays for. DROP SNAPSHOT tells Snowflake to delete that data. The data is no longer available for use as a snapshot and the customer no longer pays for it.
语法¶
DROP SNAPSHOT [ IF EXISTS ] <name>;
参数¶
name指定要删除的快照的标识符。
如果标识符包含空格或特殊字符,则整个字符串必须放在双引号内。放在双引号内的标识符也区分大小写。
有关更多信息,请参阅 标识符要求。
访问控制要求¶
权限 |
对象 |
备注 |
|---|---|---|
OWNERSHIP |
快照 |
OWNERSHIP is a special privilege on an object that is automatically granted to the role that created the object, but can also be transferred using the GRANT OWNERSHIP command to a different role by the owning role (or any role with the MANAGE GRANTS privilege). |
要对架构中的任何对象执行操作,需要对父数据库和架构的 USAGE 权限。请注意,如果某个角色获授某个架构的任意权限,该角色便能够解析该架构。例如,若某角色被授予 CREATE 权限,则可以在该架构上创建对象,而无需 同时 被授予该架构的 USAGE 权限。
有关创建具有指定权限集的自定义角色的说明,请参阅 创建自定义角色。
使用说明¶
如果指定了 IF EXISTS 子句,而目标对象不存在,该命令会成功完成,不会返回错误。
示例¶
以下示例删除名为 example_snapshot 的快照:
DROP SNAPSHOT example_snapshot;
+----------------------------------------+
| status |
|----------------------------------------|
| EXAMPLE_SNAPSHOT successfully dropped. |
+----------------------------------------+