After the table restore job ends, you can view the table restore result.
Procedure
Log on as the
rootuser to thesystenant of the cluster where the destination tenant resides.Execute the following statement to check the table restore result:
View the result of the entire table restore job:
obclient [(none)]> SELECT * FROM oceanbase.CDB_OB_RECOVER_TABLE_JOB_HISTORY\GThe query result is as follows:
*************************** 1. row *************************** TENANT_ID: 1 JOB_ID: 1 INITIATOR_TENANT_ID: 1 INITIATOR_JOB_ID: 0 START_TIMESTAMP: 2023-06-01 06:00:00.000000 STATUS: COMPLETED AUX_TENANT_NAME: AUX_RECOVER$1692106995896258 TARGET_TENANT_NAME: backup_tenant IMPORT_ALL: 0 DB_LIST: `DB` TABLE_LIST: `TEST`.`T1` RESTORE_SCN: 1692104831498747191 RESTORE_SCN_DISPLAY: 2023-06-01 00:00:00.000000 RESTORE_OPTION: pool_list=small_pool_0&primary_zone=z1 BACKUP_DEST: file:///data2/nfs/ob_backup_oracle_tenant/archive,file:///data2/nfs/ob_backup_oracle_tenant/data BACKUP_SET_LIST: file:///data2/nfs/ob_backup_oracle_tenant/data/backup_set_1_full BACKUP_PIECE_LIST: file:///data2/nfs/ob_backup_oracle_tenant/archive/piece_d1001r1p1 BACKUP_PASSWD: NULL EXTERNAL_KMS_INFO: NULL REMAP_DB_LIST: REMAP_TABLE_LIST: `TEST`.`T1`:`RECOVER_TEST`.`T3` REMAP_TABLEGROUP_LIST: REMAP_TABLESPACE_LIST: RESULT: COMMENT: 1 row in setThe columns in the
CDB_OB_RECOVER_TABLE_JOB_HISTORYview correspond to those in theCDB_OB_RECOVER_TABLE_JOBSview. TheCOMMENTcolumn records the error information of a failed job.View the result of data restore in the auxiliary tenant:
obclient [(none)]> SELECT * FROM oceanbase.CDB_OB_RESTORE_HISTORY\GData restore in an auxiliary tenant is the same as physical restore of a tenant. For more information about how to view physical restore results, see View physical restore results.
View the result of data import to the destination tenant:
obclient [(none)]> SELECT * FROM oceanbase.CDB_OB_IMPORT_TABLE_JOB_HISTORY\GThe query result is as follows:
*************************** 1. row *************************** TENANT_ID: 1010 JOB_ID: 3 INITIATOR_TENANT_ID: 1010 INITIATOR_JOB_ID: 2 START_TIMESTAMP: 2023-08-16 17:59:28.689435 SRC_TENANT_NAME: AUX_RECOVER$1692179849034890 SRC_TENANT_ID: 1014 STATUS: IMPORT_FINISH IMPORT_ALL: 0 DB_LIST: TABLE_LIST: `TEST`.`T1` REMAP_DB_LIST: REMAP_TABLE_LIST: `TEST`.`T1`:`RECOVER_TEST`.`T3` REMAP_TABLEGROUP_LIST: REMAP_TABLESPACE_LIST: TOTAL_TABLE_COUNT: 0 FINISHED_TABLE_COUNT: 0 FAILED_TABLE_COUNT: 0 RESULT: SUCCEESS COMMENT: 1 row in setThe columns in the
CDB_OB_IMPORT_TABLE_JOB_HISTORYview correspond to those in theCDB_OB_IMPORT_TABLE_JOBSview. TheCOMMENTcolumn records the error information of a failed job.View the import result of each table:
obclient [(none)]> SELECT * FROM oceanbase.CDB_OB_IMPORT_TABLE_TASK_HISTORY\GThe query result is as follows:
*************************** 1. row *************************** TENANT_ID: 1002 TASK_ID: 1047 JOB_ID: 3 SRC_TENANT_ID: 1004 SRC_TABLESPACE: NULL SRC_TABLEGROUP: NULL SRC_DATABASE: test SRC_TABLE: t1 SRC_PARTITION: NULL TARGET_TABLESPACE: NULL TARGET_TABLEGROUP: NULL TARGET_DATABASE: recover_test TARGET_TABLE: t3 TABLE_COLUMN: 7 STATUS: FINISH START_TIMESTAMP: 2023-08-16 21:08:49.492389 COMPLETION_TIMESTAMP: 2023-08-16 21:09:09.624866 CUMULATIVE_TS: -1 TOTAL_INDEX_COUNT: 2 IMPORTED_INDEX_COUNT: 2 FAILED_INDEX_COUNT: 0 TOTAL_CONSTRAINT_COUNT: 1 IMPORTED_CONSTRAINT_COUNT: 1 FAILED_CONSTRAINT_COUNT: 0 TOTAL_REF_CONSTRAINT_COUNT: 1 IMPORTED_REF_CONSTRAINT_COUNT: 0 FAILED_REF_CONSTRAINT_COUNT: 1 RESULT: SUCCEESS COMMENT: 1 row in set
The columns in the
CDB_OB_IMPORT_TABLE_TASK_HISTORYview correspond to those in theCDB_OB_IMPORT_TABLE_TASKSview. TheCOMMENTcolumn records the error information of a failed task.For more information about columns in the
CDB_OB_RECOVER_TABLE_JOB_HISTORY,CDB_OB_IMPORT_TABLE_JOB_HISTORY, andCDB_OB_IMPORT_TABLE_TASK_HISTORYviews, see Views related to physical restore.