Overview
The DBA_OB_AGENT_DB_BACKGROUND_TASKS view is a tenant-level view that displays the background deletion tasks of logical tables currently being executed by 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:
|
| START_TIME | timestamp | NO | The task start time. |
| UPDATE_TIME | timestamp | NO | The last update time of the task. |
| 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 tasks of logical tables being executed in the current tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_AGENT_DB_BACKGROUND_TASKS;
The following example shows the return result:
+---------------+-----------------+----------------+--------------+----------------------+---------------------+---------------------+--------------------+---------------+------------+
| DATABASE_NAME | COLLECTION_NAME | NAMESPACE_NAME | LTABLE_NAME | OPERATION_TYPE | START_TIME | UPDATE_TIME | TOTAL_DELETED_ROWS | ORIGINAL_NAME | RET_CODE |
+---------------+-----------------+----------------+--------------+----------------------+---------------------+---------------------+--------------------+---------------+------------+
| test | kb | app001 | chat_history | LTABLE_DELETE | 2026-06-05 10:00:01 | 2026-06-05 10:03:15 | 45000 | chat_history | OB_SUCCESS |
| test | kb | ns_images | | NAMESPACE_DELETE | 2026-06-05 10:01:00 | 2026-06-05 10:04:30 | 80000 | ns_images | OB_SUCCESS |
| test | kb | ns_hot_cache | | HOT_NAMESPACE_EXPIRE | 2026-06-05 09:00:00 | 2026-06-05 09:00:01 | 0 | ns_hot_cache | OB_SUCCESS |
+---------------+-----------------+----------------+--------------+----------------------+---------------------+---------------------+--------------------+---------------+------------+