Purpose
The DBA_OB_BACKUP_TASK_HISTORY view displays the history of backup tasks in the current tenant.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| TASK_ID | NUMBER(38) | NO | The ID of a backup task, which corresponds to a backup set task. |
| JOB_ID | NUMBER(38) | NO | The job ID of the backup task. |
| INCARNATION | NUMBER(38) | NO | The nth incarnation of the database after the Flashback Database operation. |
| BACKUP_SET_ID | NUMBER(38) | NO | The ID of the backup set corresponding to the backup task. |
| START_TIMESTAMP | VARCHAR2(256) | NO | The start time of the backup task. |
| END_TIMESTAMP | VARCHAR2(256) | NO | The end time of the backup task. |
| STATUS | VARCHAR2(4096) | NO | The backup status. |
| START_SCN | NUMBER(38) | NO | The SCN at which the backup starts. |
| END_SCN | NUMBER(38) | NO | The SCN at which the backup ends. |
| USER_LS_START_SCN | NUMBER(38) | NO | The SCN of the metadata of the backup log stream. |
| ENCRYPTION_MODE | VARCHAR2(4096) | YES | The encryption mode. Valid values:None: indicates that encryption is not implemented.Password: indicates that only the password is used for protection.Password Encryption: indicates that encryption is implemented and the password is used for protection.Transparent Encryption: indicates that TDE is used for encryption.Dual Mode Encryption: indicates that TDE encryption is implemented and the password is used for protection.Currently, only the None and Password modes are supported. |
| PASSWD | VARCHAR2(4096) | YES | The password. |
| INPUT_BYTES | NUMBER(38) | YES | The number of input bytes. |
| OUTPUT_BYTES | NUMBER(38) | YES | The number of output bytes. |
| OUTPUT_RATE_BYTES | NUMBER | NO | The number of bytes that are output per second. |
| EXTRA_META_BYTES | NUMBER(38) | YES | The number of extra bytes. |
| TABLET_COUNT | NUMBER(38) | YES | The total number of tablets. |
| FINISH_TABLET_COUNT | NUMBER(38) | YES | The total number of tablets backed up. |
| MACRO_BLOCK_COUNT | NUMBER(38) | YES | The number of macroblocks. |
| FINISH_MACRO_BLOCK_COUNT | NUMBER(38) | YES | The number of macroblocks backed up. |
| FILE_COUNT | NUMBER(38) | YES | The number of backup files. |
| META_TURN_ID | NUMBER(38) | YES | The round of metadata backup. |
| DATA_TURN_ID | NUMBER(38) | YES | The round of data backup. |
| RESULT | NUMBER(38) | YES | The returned backup error code. |
| COMMENT | VARCHAR2(4096) | YES | The description of the error code. |
| PATH | VARCHAR2(4096) | YES | The backup path. |
| MINOR_TURN_ID | NUMBER(38) | NO | The ID of the round at which the backup of minor compaction data ended. |
| MAJOR_TURN_ID | NUMBER(38) | NO | The ID of the round at which the backup of baseline data ended. |
Sample query
Query the history of backup tasks in the current tenant.
obclient [SYS]> SELECT * FROM SYS.DBA_OB_BACKUP_TASK_HISTORY\G
The query result is as follows:
*************************** 1. row ***************************
TASK_ID: 1
JOB_ID: 1
INCARNATION: 1
BACKUP_SET_ID: 1
START_TIMESTAMP: 2024-05-10 14:02:04
END_TIMESTAMP: 2024-05-10 14:04:31
STATUS: COMPLETED
START_SCN: 1715320945296235000
END_SCN: 1715321071272283000
USER_LS_START_SCN: 1715320955625426000
ENCRYPTION_MODE: NONE
PASSWD: NULL
INPUT_BYTES: 198413183
OUTPUT_BYTES: 20219996
OUTPUT_RATE_BYTES: 137125.4834937336727309530817741200907923
EXTRA_META_BYTES: 0
TABLET_COUNT: 657
FINISH_TABLET_COUNT: 657
MACRO_BLOCK_COUNT: 94
FINISH_MACRO_BLOCK_COUNT: 94
FILE_COUNT: 0
META_TURN_ID: 1
DATA_TURN_ID: 0
RESULT: 0
COMMENT: NULL
PATH: file:///home/admin/oceanbase/backupdataoracle
MINOR_TURN_ID: 1
MAJOR_TURN_ID: 1
1 row in set