SHOW SNAPSHOT POLICIES — Deprecated

Lists all the snapshot policies in your account for which you have access privileges.

참고 항목:

CREATE SNAPSHOT POLICY — Deprecated, ALTER SNAPSHOT POLICY — Deprecated, DROP SNAPSHOT POLICY — Deprecated

구문

SHOW SNAPSHOT POLICIES
   [ LIKE '<pattern>' ]
   [ IN { ACCOUNT | DATABASE | DATABASE <db_name> | SCHEMA | SCHEMA <schema_name> }
     [ STARTS WITH '<name_string>' ]
     [ LIMIT <rows> [ FROM '<name_string>' ]
   ]
Copy

매개 변수

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' and STARTS 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 by STARTS 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 에서 해당 뷰(있는 경우)를 쿼리하십시오.

스냅샷 정책이 스냅샷 세트와 연결되어 있는지 확인하려면 SHOW SNAPSHOT SETS 명령을 사용합니다.

참고

스냅샷 정책은 특정 스키마와 데이터베이스 내부에 있는 오브젝트입니다. 따라서 정책이 포함된 스키마와 데이터베이스에서 이러한 작업이 수행될 때 정책이 복제, 삭제 또는 삭제 취소되는 등의 작업이 수행됩니다. 스냅샷 정책이 스냅샷 세트와 연결되어 있어 삭제할 수 없으면 정책이 포함된 스키마나 데이터베이스도 삭제할 수 없습니다.

출력

설명

created_on

타임스탬프 스냅샷 정책이 생성되었습니다.

name

스냅샷 정책의 이름입니다.

database_name

스냅샷 정책이 포함된 데이터베이스의 이름입니다.

schema_name

스냅샷 정책이 포함된 스키마의 이름입니다.

owner

스냅샷 정책에 대한 OWNERSHIP 권한이 있는 역할의 이름입니다.

comment

스냅샷 정책에 대한 설명입니다.

schedule

스냅샷 생성 일정입니다.

expire_after_days

스냅샷 생성 후 스냅샷이 만료되기까지 남은 일 수입니다.

has_retention_lock

정책에 보존 잠금이 포함되는지 여부를 나타냅니다.

정책에 보존 잠금이 있는 경우 Y 이고 그렇지 않으면 N 입니다.

자세한 내용은 보존 잠금 을 참조하세요.

owner

스냅샷 세트에 대한 OWNERSHIP 권한이 있는 역할의 이름입니다.

owner_role_type

스냅샷 정책에 대한 OWNERSHIP 권한이 있는 역할의 유형입니다.

현재 계정에서 권한이 있는 모든 스냅샷 정책을 나열합니다.

SHOW SNAPSHOT POLICIES IN ACCOUNT;
Copy