SHOW SNAPSHOT SETS — Deprecated¶
Lists all the snapshot sets for which you have access privileges. The scope of this command can be your entire account, or a specified database or schema.
- 참고 항목:
CREATE SNAPSHOT SET — Deprecated, ALTER SNAPSHOT SET — Deprecated, DROP SNAPSHOT SET — Deprecated
구문¶
SHOW SNAPSHOT SETS
[ LIKE '<pattern>' ]
[ IN { ACCOUNT | DATABASE | DATABASE <db_name> | SCHEMA | SCHEMA <schema_name> }
[ STARTS WITH '<name_string>' ]
[ LIMIT <rows> [ FROM '<name_string>' ]
]
매개 변수¶
LIKE 'pattern'오브젝트 이름으로 명령 출력을 선택적으로 필터링합니다. 이 필터는 SQL 와일드카드 문자(
%및_) 지원과 함께 대/소문자를 구분하지 않는 패턴 일치를 사용합니다.예를 들어, 다음 패턴은 같은 결과를 반환합니다.
... LIKE '%testing%' ...... LIKE '%TESTING%' .... 기본값: 값 없음(출력에 필터링이 적용되지 않음).
[ IN ... ]Optionally specifies the scope of the command. Specify one of the following:
키워드
ACCOUNT를 지정하는 경우 이 명령은 현재 계정의 모든 데이터베이스에 있는 모든 스키마의 레코드를 검색합니다.키워드
DATABASE를 지정하면 다음 사항이 적용됩니다.db_name을 지정하는 경우 이 명령은 지정된 데이터베이스의 모든 스키마의 레코드를 검색합니다.db_name을 지정하지 않으면 다음이 적용됩니다.현재 데이터베이스가 있는 경우 이 명령은 현재 데이터베이스의 모든 스키마의 레코드를 검색합니다.
현재 데이터베이스가 없는 경우 이 명령은 계정의 모든 데이터베이스 및 스키마의 레코드를 검색합니다.
키워드
SCHEMA를 지정하면 다음 사항이 적용됩니다.정규화된 스키마 이름(예:
my_database.my_schema)을 지정하는 경우 이 명령은 지정된 데이터베이스 및 스키마의 레코드를 검색합니다.정규화되지 않은
schema_name을 지정하면 다음 사항이 적용됩니다.현재 데이터베이스가 있는 경우 이 명령은 현재 데이터베이스의 지정된 스키마의 레코드를 검색합니다.
현재 데이터베이스가 없는 경우 이 명령은
SQL compilation error: Object does not exist, or operation cannot be performed오류 메시지를 표시합니다.
schema_name을 지정하지 않으면 다음이 적용됩니다.현재 데이터베이스가 있으면 다음 사항이 적용됩니다.
현재 스키마가 있는 경우 이 명령은 현재 데이터베이스의 현재 스키마의 레코드를 검색합니다.
현재 스키마가 없는 경우 이 명령은 현재 데이터베이스의 모든 스키마의 레코드를 검색합니다.
현재 데이터베이스가 없는 경우 이 명령은 계정의 모든 데이터베이스 및 모든 스키마의 레코드를 검색합니다.
STARTS WITH 'name_string'Optionally filters the command output based on the characters that appear at the beginning of the object name. The string must be enclosed in single quotes and is case sensitive.
For example, the following strings return different results:
... STARTS WITH 'B' ...... STARTS WITH 'b' .... Default: No value (no filtering is applied to the output)
LIMIT rows [ FROM 'name_string' ]Optionally limits the maximum number of rows returned, while also enabling “pagination” of the results. The actual number of rows returned might be less than the specified limit. For example, the number of existing objects is less than the specified limit.
The optional
FROM 'name_string'subclause effectively serves as a “cursor” for the results. This enables fetching the specified number of rows following the first row whose object name matches the specified string:The string must be enclosed in single quotes and is case sensitive.
The string does not have to include the full object name; partial names are supported.
Default: No value (no limit is applied to the output)
참고
For SHOW commands that support both the
FROM 'name_string'andSTARTS WITH 'name_string'clauses, you can combine both of these clauses in the same statement. However, both conditions must be met or they cancel out each other and no results are returned.In addition, objects are returned in lexicographic order by name, so
FROM 'name_string'only returns rows with a higher lexicographic value than the rows returned bySTARTS WITH 'name_string'.For example:
... STARTS WITH 'A' LIMIT ... FROM 'B'would return no results.... STARTS WITH 'B' LIMIT ... FROM 'A'would return no results.... STARTS WITH 'A' LIMIT ... FROM 'AB'would return results (if any rows match the input strings).
사용법 노트¶
이 명령은 명령을 실행하는 데 사용된 역할에 대한 액세스 권한에 따라 지정된 오브젝트 유형에 대해 최대 1만 개의 레코드를 반환합니다. 필터를 적용하더라도 1만 개 레코드 제한을 초과하는 레코드는 반환되지 않습니다.
10,000개 이상의 레코드가 존재하는 결과를 보려면 Snowflake Information Schema 에서 해당 뷰(있는 경우)를 쿼리하십시오.
출력¶
열 |
설명 |
|---|---|
|
스냅샷 세트가 생성된 타임스탬프입니다. |
|
스냅샷 세트의 이름입니다. |
|
스냅샷 세트가 포함된 데이터베이스의 이름입니다. |
|
스냅샷 세트가 포함된 스키마의 이름입니다. |
|
스냅샷 세트가 스냅샷을 생성하는 오브젝트의 유형입니다. |
|
스냅샷 세트가 스냅샷을 생성하는 오브젝트의 이름입니다. |
|
이 스냅샷 세트에 의해 스냅샷이 생성되는 오브젝트가 포함된 데이터베이스의 이름입니다. |
|
이 스냅샷 세트에 의해 스냅샷이 생성되는 오브젝트가 포함된 스키마의 이름입니다. |
|
이 스냅샷 세트에 연결된 스냅샷 정책의 이름입니다. |
|
스냅샷 정책이 포함된 데이터베이스의 이름입니다. |
|
스냅샷 정책이 포함된 스키마의 이름입니다. |
|
Current state of the snapshot policy. |
|
스냅샷 세트에 대한 OWNERSHIP 권한이 있는 역할의 이름입니다. |
|
스냅샷 세트에 대한 OWNERSHIP 권한이 있는 역할의 타입입니다. |
|
Comment for backup set. |
예¶
현재 계정에서 권한이 있는 모든 스냅샷 세트를 나열합니다.
SHOW SNAPSHOT SETS IN ACCOUNT;
이름에 T1 이 포함된 스냅샷 세트를 나열합니다.
SHOW SNAPSHOT SETS LIKE '%T1%';