Overview
The DBA_OB_AGENT_DB_BACKGROUND_TASK_HISTORY view is a tenant-level view that displays the history of completed background deletion tasks for logical tables in the current tenant.
Columns
field |
Type |
Is NULL |
Description |
|---|---|---|---|
| DATABASE_NAME | varchar(128) | NO | The name of the database. |
| COLLECTION_NAME | varchar(256) | NO | The name of the collection. |
| NAMESPACE_NAME | varchar(256) | NO | Namespace name. |
| LTABLE_NAME | varchar(256) | NO | The name of the logical table.
|
| OPERATION_TYPE | varchar(32) | NO | Operation type. Valid values:
|
| OPERATION_STATUS | varchar(32) | NO | Operation status. Valid values:
|
| START_TIME | timestamp | NO | The task start time. |
| FINISH_TIME | timestamp | NO | End time of the task. |
| ELAPSED_TIME | bigint | NO | Time consumed in deleting tasks, in microseconds. |
| TOTAL_DELETED_ROWS | bigint | NO |
|
| ORIGINAL_NAME | varchar(256) | NO | Original name of the deleted object. |
| RET_CODE | varchar(512) | NO | Error code name. |
Sample query
You can query the background deletion task history of completed logical tables for the current tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_AGENT_DB_BACKGROUND_TASK_HISTORY;
A sample return result is as follows:
+---------------+-----------------+----------------+--------------+----------------------+------------------+---------------------+---------------------+--------------+--------------------+---------------+------------+
| DATABASE_NAME | COLLECTION_NAME | NAMESPACE_NAME | LTABLE_NAME | OPERATION_TYPE | OPERATION_STATUS | START_TIME | FINISH_TIME | ELAPSED_TIME | TOTAL_DELETED_ROWS | ORIGINAL_NAME | RET_CODE |
+---------------+-----------------+----------------+--------------+----------------------+------------------+---------------------+---------------------+--------------+--------------------+---------------+------------+
| test | kb | app001 | chat_history | LTABLE_DELETE | COMPLETED | 2026-06-05 10:00:01 | 2026-06-05 10:03:15 | 194000000 | 45000 | chat_history | OB_SUCCESS |
| test | kb | ns_images | | NAMESPACE_DELETE | COMPLETED | 2026-06-05 10:01:00 | 2026-06-05 10:04:30 | 210000000 | 80000 | ns_images | OB_SUCCESS |
| test | kb | ns_hot_cache | | HOT_NAMESPACE_EXPIRE | FAILED | 2026-06-05 09:00:00 | 2026-06-05 09:00:01 | 1000000 | 0 | ns_hot_cache | OB_ERROR |
+---------------+-----------------+----------------+--------------+----------------------+------------------+---------------------+---------------------+--------------+--------------------+---------------+------------+