Note
This view is introduced in OceanBase Database V4.0.0.
Purpose
This view displays the status of a backup piece in the current tenant.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| DEST_ID | bigint(20) | NO | The path number. The system assigns a unique ID to each path. |
| ROUND_ID | bigint(20) | NO | The number of the complete Clog backup data stream. |
| PIECE_ID | bigint(20) | NO | The ID of the backup log shard. |
| INCARNATION | bigint(20) | NO | The number of incarnations after Flashback Database. |
| DEST_NO | bigint(20) | NO | The log_archive_dest_n identifier. For example, the dest_no of log_archive_dest is 0, and that of log_archive_dest_1 is 1. |
| CREATE_TIMESTAMP | bigint(20) | NO | The creation time of the backup piece. |
| STATUS | varchar(64) | NO | The status of the backup piece: ACTIVE: The backup piece is active. FREEZING: The backup piece is being frozen. FROZEN: The backup piece is frozen. After this status, the status of the backup piece will no longer be modified. |
| START_SCN | bigint(20) unsigned | NO | The actual start SCN of the backup piece. |
| START_SCN_DISPLAY | datetime(6) | NO | The display of the START_SCN value converted into a time unit. |
| CHECKPOINT_SCN | bigint(20) unsigned | NO | The current archive SCN. |
| CHECKPOINT_SCN_DISPLAY | datetime(6) | NO | The display of the CHECKPOINT_SCN value converted into a time unit. |
| MAX_SCN | bigint(20) unsigned | NO | The maximum archive SCN. |
| END_SCN | bigint(20) unsigned | NO | The theoretical end SCN of the backup piece. |
| END_SCN_DISPLAY | datetime(6) | NO | The end time of the backup piece. |
| COMPATIBLE | bigint(20) | NO | The compatible version for log archiving. |
| UNIT_SIZE | bigint(20) | NO | The size of a log block that is compressed or encrypted in a single operation. This field is temporarily unavailable. |
| COMPRESSION | varchar(128) | NO | The compression algorithm:
|
| INPUT_BYTES | bigint(20) | NO | The amount of original data. |
| INPUT_BYTES_DISPLAY | varchar(27) | NO | The display of the INPUT_BYTES value after the unit is converted. |
| OUTPUT_BYTES | bigint(20) | NO | The amount of encrypted and compressed data. |
| OUTPUT_BYTES_DISPLAY | varchar(27) | NO | The display of the OUTPUT_BYTES value after the unit is converted. |
| COMPRESSION_RATIO | decimal(23,2) | NO | The compression ratio. |
| FILE_STATUS | varchar(64) | NO | The file status of the backup log shard: AVAILABLE: The backup is valid and can be used for restore. COPYING: The log file is being backed up. INCOMPELTE: The log file in the backup shard is incomplete and lacks some log streams. DELETING: The log file is being deleted. EXPIRED: The backup file is invalid. BROKEN: The backup file is incomplete and cannot be used. DELETED: The log file is deleted. |
| PATH | varchar(2048) | NO | The archive path. |
Sample query
A user queries the status of a backup set piece in the user's own tenant.
obclient [oceanbase]> SELECT * FROM oceanbase.DBA_OB_ARCHIVELOG_PIECE_FILES\G
The query result is as follows:
*************************** 1. row ***************************
DEST_ID: 1001
ROUND_ID: 1
PIECE_ID: 1
INCARNATION: 1
DEST_NO: 0
STATUS: ACTIVE
START_SCN: 1736228322307513000
START_SCN_DISPLAY: 2025-01-07 13:38:42.307513
CHECKPOINT_SCN: 1736233485415914000
CHECKPOINT_SCN_DISPLAY: 2025-01-07 15:04:45.415914
MAX_SCN: 1736233485717186000
END_SCN: 1736314722307513000
END_SCN_DISPLAY: 2025-01-08 13:38:42.307513
COMPATIBLE: 1
UNIT_SIZE: 1
COMPRESSION: none
INPUT_BYTES: 85183742
INPUT_BYTES_DISPLAY: 81.24MB
OUTPUT_BYTES: 85183742
OUTPUT_BYTES_DISPLAY: 81.24MB
COMPRESSION_RATIO: 1.00
FILE_STATUS: AVAILABLE
PATH: file:///home/admin/oceanbase/arglog
1 row in set
References
For more information about pieces, see Overview of log archiving.