- Categories:
REPLICATION_GROUP_REFRESH_HISTORY¶
Returns the replication history for a secondary replication or failover group within the last 14 days.
Syntax¶
REPLICATION_GROUP_REFRESH_HISTORY( '<secondary_group_name>' )
Arguments¶
secondary_group_name
Name of the secondary group. Note that the entire name must be enclosed in single quotes.
Output¶
The function returns the following columns:
Column Name |
Data Type |
Description |
---|---|---|
PHASE_NAME |
TEXT |
Current phase in the replication operation. For the list of phases, see the Usage Notes. |
START_TIME |
TIMESTAMP_LTZ |
Time when the replication operation began. |
END_TIME |
TIMESTAMP_LTZ |
Time when the replication operation finished, if applicable. |
JOB_UUID |
TEXT |
Query ID for the refresh job. |
TOTAL_BYTES |
VARIANT |
A JSON object that provides detailed information about refreshed databases:
|
OBJECT_COUNT |
VARIANT |
A JSON object that provides detailed information about refreshed objects:
|
PRIMARY_SNAPSHOT_TIMESTAMP |
TIMESTAMP_LTZ |
Timestamp when the primary snapshot was created. |
ERROR |
VARIANT |
NULL if the refresh operation is successful. If the refresh operation fails, returns a JSON object that provides detailed information about the error:
|
Usage Notes¶
Only returns rows for a role with any privilege on the replication or failover group.
Only returns rows for a secondary replication or failover group in the current account.
When calling an Information Schema table function, the session must have an INFORMATION_SCHEMA schema in use or the function name must be fully-qualified. For more details, see Snowflake Information Schema.
Following is the list of phases in the order processed:
SECONDARY_SYNCHRONIZING_MEMBERSHIP
SECONDARY_UPLOADING_INVENTORY
PRIMARY_UPLOADING_METADATA
PRIMARY_UPLOADING_DATA
SECONDARY_DOWNLOADING_METADATA
SECONDARY_DOWNLOADING_DATA
COMPLETED / FAILED / CANCELED
Examples¶
Retrieve the refresh history for secondary group myfg
.
select * from table(information_schema.replication_group_refresh_history('myfg'));