- Categories:
System functions (System Information)
SYSTEM$DATABASE_ REFRESH_ PROGRESS , SYSTEM$DATABASE_ REFRESH_ PROGRESS_ BY_ JOB — Deprecated¶
SYSTEM$DATABASE_REFRESH_PROGRESS 函数系列可用于查询各个维度的数据库刷新状态:
- SYSTEM$DATABASE_REFRESH_PROGRESS 返回一个 JSON 对象,该对象按名称指示辅助数据库的当前刷新状态。
- SYSTEM$DATABASE_REFRESH_PROGRESS_BY_JOB 返回一个 JSON 对象,该对象通过刷新查询指示辅助数据库的当前刷新状态。
Note
这些函数返回过去 14 天内的数据库刷新活动。
语法
实参
secondary_db_name辅助数据库的名称。如果辅助数据库是当前会话中的活动数据库,则此实参可选。
请注意,整个名称必须放在单引号内。
query_idID of the database refresh query. The query ID can be obtained from the History
page in the web interface.
输出
该函数在 JSON 对象中返回以下元素:
| Column Name | Data Type | Description |
|---|---|---|
| phaseName | TEXT | Name of the replication phases completed (or in progress) so far. For the list of phases, see the usage notes. |
| resultName | TEXT | Status of the replication phase. |
| startTimeUTC | NUMBER | Time when the replication phase began. Format is epoch time. |
| endTimeUTC | NUMBER | Time when the phase finished, if applicable. Format is epoch time. |
| details | VARIANT | A separate JSON object that shows the total number of bytes in the data refresh as well as the number of bytes copied so far in the phase. If the refresh statement previously failed or was cancelled and was initiated again, the object indicates the number of bytes skipped in the second attempt. The details object is included in the Copying Primary Data and Copying Replica Data phase information. |
使用说明
- 仅返回账户管理员(具有 ACCOUNTADMIN 角色)的结果。
- 以下是所处理订单中的阶段列表:
- SECONDARY_UPLOADING_INVENTORY
- PRIMARY_UPLOADING_METADATA
- PRIMARY_UPLOADING_DATA
- SECONDARY_DOWNLOADING_METADATA
- SECONDARY_DOWNLOADING_DATA
- COMPLETED / FAILED / CANCELED
示例
下面的示例检索指定辅助数据库的当前刷新状态。结果以 JSON 对象返回:
以下示例检索与上一个示例中相同的详细信息,但结果被分隔为关系列,时间戳被转换为 TIMESTAMP_LTZ:
下面的示例检索指定数据库刷新查询的状态。结果以 JSON 对象返回:
以下示例检索与上一个示例中相同的详细信息,但结果被分隔为关系列,时间戳被转换为 TIMESTAMP_LTZ: