fix scn legacy issues
This commit is contained in:
@ -1359,7 +1359,7 @@ int ObInnerTableSchema::dba_ob_backup_jobs_ora_schema(ObTableSchema &table_schem
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT JOB_ID, INCARNATION, BACKUP_SET_ID, INITIATOR_TENANT_ID, INITIATOR_JOB_ID, EXECUTOR_TENANT_ID, PLUS_ARCHIVELOG, BACKUP_TYPE, JOB_LEVEL, ENCRYPTION_MODE, PASSWD, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, RESULT, "COMMENT", DESCRIPTION, PATH FROM SYS.ALL_VIRTUAL_BACKUP_JOB WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT JOB_ID, BACKUP_SET_ID, INITIATOR_TENANT_ID, INITIATOR_JOB_ID, EXECUTOR_TENANT_ID, PLUS_ARCHIVELOG, BACKUP_TYPE, JOB_LEVEL, ENCRYPTION_MODE, PASSWD, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, RESULT, "COMMENT", DESCRIPTION, PATH FROM SYS.ALL_VIRTUAL_BACKUP_JOB WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
@ -1409,7 +1409,7 @@ int ObInnerTableSchema::dba_ob_backup_job_history_ora_schema(ObTableSchema &tabl
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT JOB_ID, INCARNATION, BACKUP_SET_ID, INITIATOR_TENANT_ID, INITIATOR_JOB_ID, EXECUTOR_TENANT_ID, PLUS_ARCHIVELOG, BACKUP_TYPE, JOB_LEVEL, ENCRYPTION_MODE, PASSWD, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, RESULT, "COMMENT", DESCRIPTION, PATH FROM SYS.ALL_VIRTUAL_BACKUP_JOB_HISTORY WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT JOB_ID, BACKUP_SET_ID, INITIATOR_TENANT_ID, INITIATOR_JOB_ID, EXECUTOR_TENANT_ID, PLUS_ARCHIVELOG, BACKUP_TYPE, JOB_LEVEL, ENCRYPTION_MODE, PASSWD, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, RESULT, "COMMENT", DESCRIPTION, PATH FROM SYS.ALL_VIRTUAL_BACKUP_JOB_HISTORY WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
@ -1459,7 +1459,7 @@ int ObInnerTableSchema::dba_ob_backup_tasks_ora_schema(ObTableSchema &table_sche
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT TASK_ID, JOB_ID, INCARNATION, BACKUP_SET_ID, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, START_SCN, END_SCN, USER_LS_START_SCN, ENCRYPTION_MODE, PASSWD, INPUT_BYTES, OUTPUT_BYTES, CASE WHEN END_TS = 0 THEN 0 ELSE OUTPUT_BYTES / ((END_TS - START_TS)/1000/1000) END AS OUTPUT_RATE_BYTES, EXTRA_BYTES AS EXTRA_META_BYTES, TABLET_COUNT, FINISH_TABLET_COUNT, MACRO_BLOCK_COUNT, FINISH_MACRO_BLOCK_COUNT, FILE_COUNT, META_TURN_ID, DATA_TURN_ID, RESULT, "COMMENT", PATH FROM SYS.ALL_VIRTUAL_BACKUP_TASK WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT TASK_ID, JOB_ID, BACKUP_SET_ID, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, START_SCN, END_SCN, USER_LS_START_SCN, ENCRYPTION_MODE, PASSWD, INPUT_BYTES, OUTPUT_BYTES, CASE WHEN END_TS = 0 THEN 0 ELSE OUTPUT_BYTES / ((END_TS - START_TS)/1000/1000) END AS OUTPUT_RATE_BYTES, EXTRA_BYTES AS EXTRA_META_BYTES, TABLET_COUNT, FINISH_TABLET_COUNT, MACRO_BLOCK_COUNT, FINISH_MACRO_BLOCK_COUNT, FILE_COUNT, META_TURN_ID, DATA_TURN_ID, RESULT, "COMMENT", PATH FROM SYS.ALL_VIRTUAL_BACKUP_TASK WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
@ -1509,7 +1509,7 @@ int ObInnerTableSchema::dba_ob_backup_task_history_ora_schema(ObTableSchema &tab
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT TASK_ID, JOB_ID, INCARNATION, BACKUP_SET_ID, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, START_SCN, END_SCN, USER_LS_START_SCN, ENCRYPTION_MODE, PASSWD, INPUT_BYTES, OUTPUT_BYTES, CASE WHEN END_TS = 0 THEN 0 ELSE OUTPUT_BYTES / ((END_TS - START_TS)/1000/1000) END AS OUTPUT_RATE_BYTES, EXTRA_BYTES AS EXTRA_META_BYTES, TABLET_COUNT, FINISH_TABLET_COUNT, MACRO_BLOCK_COUNT, FINISH_MACRO_BLOCK_COUNT, FILE_COUNT, META_TURN_ID, DATA_TURN_ID, RESULT, "COMMENT", PATH FROM SYS.ALL_VIRTUAL_BACKUP_TASK_HISTORY WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT TASK_ID, JOB_ID, BACKUP_SET_ID, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, START_SCN, END_SCN, USER_LS_START_SCN, ENCRYPTION_MODE, PASSWD, INPUT_BYTES, OUTPUT_BYTES, CASE WHEN END_TS = 0 THEN 0 ELSE OUTPUT_BYTES / ((END_TS - START_TS)/1000/1000) END AS OUTPUT_RATE_BYTES, EXTRA_BYTES AS EXTRA_META_BYTES, TABLET_COUNT, FINISH_TABLET_COUNT, MACRO_BLOCK_COUNT, FINISH_MACRO_BLOCK_COUNT, FILE_COUNT, META_TURN_ID, DATA_TURN_ID, RESULT, "COMMENT", PATH FROM SYS.ALL_VIRTUAL_BACKUP_TASK_HISTORY WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
@ -1559,7 +1559,7 @@ int ObInnerTableSchema::dba_ob_backup_set_files_ora_schema(ObTableSchema &table_
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT BACKUP_SET_ID, DEST_ID, INCARNATION, BACKUP_TYPE, PREV_FULL_BACKUP_SET_ID, PREV_INC_BACKUP_SET_ID, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, FILE_STATUS, CASE WHEN END_TS = 0 THEN 0 ELSE ROUND((END_TS - START_TS)/1000/1000,0) END AS ELAPSED_SECONDES, PLUS_ARCHIVELOG, START_REPLAY_SCN, SCN_TO_TIMESTAMP(START_REPLAY_SCN) AS START_REPLAY_SCN_DISPLAY, MIN_RESTORE_SCN, SCN_TO_TIMESTAMP(MIN_RESTORE_SCN) AS MIN_RESTORE_SCN_DISPLAY, INPUT_BYTES, OUTPUT_BYTES, CASE WHEN END_TS = 0 THEN 0 ELSE OUTPUT_BYTES / ((END_TS - START_TS)/1000/1000) END AS OUTPUT_RATE_BYTES, EXTRA_BYTES AS EXTRA_META_BYTES, TABLET_COUNT, FINISH_TABLET_COUNT, MACRO_BLOCK_COUNT, FINISH_MACRO_BLOCK_COUNT, FILE_COUNT, META_TURN_ID, DATA_TURN_ID, RESULT, "COMMENT", ENCRYPTION_MODE, PASSWD, TENANT_COMPATIBLE, BACKUP_COMPATIBLE, PATH FROM SYS.ALL_VIRTUAL_BACKUP_SET_FILES WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT BACKUP_SET_ID, DEST_ID, BACKUP_TYPE, PREV_FULL_BACKUP_SET_ID, PREV_INC_BACKUP_SET_ID, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, FILE_STATUS, CASE WHEN END_TS = 0 THEN 0 ELSE ROUND((END_TS - START_TS)/1000/1000,0) END AS ELAPSED_SECONDES, PLUS_ARCHIVELOG, START_REPLAY_SCN, SCN_TO_TIMESTAMP(START_REPLAY_SCN) AS START_REPLAY_SCN_DISPLAY, MIN_RESTORE_SCN, SCN_TO_TIMESTAMP(MIN_RESTORE_SCN) AS MIN_RESTORE_SCN_DISPLAY, INPUT_BYTES, OUTPUT_BYTES, CASE WHEN END_TS = 0 THEN 0 ELSE OUTPUT_BYTES / ((END_TS - START_TS)/1000/1000) END AS OUTPUT_RATE_BYTES, EXTRA_BYTES AS EXTRA_META_BYTES, TABLET_COUNT, FINISH_TABLET_COUNT, MACRO_BLOCK_COUNT, FINISH_MACRO_BLOCK_COUNT, FILE_COUNT, META_TURN_ID, DATA_TURN_ID, RESULT, "COMMENT", ENCRYPTION_MODE, PASSWD, TENANT_COMPATIBLE, BACKUP_COMPATIBLE, PATH FROM SYS.ALL_VIRTUAL_BACKUP_SET_FILES WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
@ -1909,7 +1909,7 @@ int ObInnerTableSchema::dba_ob_backup_delete_jobs_ora_schema(ObTableSchema &tabl
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT JOB_ID, INCARNATION, INITIATOR_TENANT_ID, INITIATOR_JOB_ID, EXECUTOR_TENANT_ID, TYPE, TO_CHAR(PARAMETER / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS PARAMETER, JOB_LEVEL, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, TASK_COUNT, SUCCESS_TASK_COUNT, RESULT, "COMMENT" FROM SYS.ALL_VIRTUAL_BACKUP_DELETE_JOB WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT JOB_ID, INITIATOR_TENANT_ID, INITIATOR_JOB_ID, EXECUTOR_TENANT_ID, TYPE, TO_CHAR(PARAMETER / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS PARAMETER, JOB_LEVEL, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, TASK_COUNT, SUCCESS_TASK_COUNT, RESULT, "COMMENT" FROM SYS.ALL_VIRTUAL_BACKUP_DELETE_JOB WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
@ -1959,7 +1959,7 @@ int ObInnerTableSchema::dba_ob_backup_delete_job_history_ora_schema(ObTableSchem
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT JOB_ID, INCARNATION, INITIATOR_TENANT_ID, INITIATOR_JOB_ID, EXECUTOR_TENANT_ID, TYPE, TO_CHAR(PARAMETER / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS PARAMETER, JOB_LEVEL, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, TASK_COUNT, SUCCESS_TASK_COUNT, RESULT, "COMMENT" FROM SYS.ALL_VIRTUAL_BACKUP_DELETE_JOB_HISTORY WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT JOB_ID, INITIATOR_TENANT_ID, INITIATOR_JOB_ID, EXECUTOR_TENANT_ID, TYPE, TO_CHAR(PARAMETER / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS PARAMETER, JOB_LEVEL, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, TASK_COUNT, SUCCESS_TASK_COUNT, RESULT, "COMMENT" FROM SYS.ALL_VIRTUAL_BACKUP_DELETE_JOB_HISTORY WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
@ -2009,7 +2009,7 @@ int ObInnerTableSchema::dba_ob_backup_delete_tasks_ora_schema(ObTableSchema &tab
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT TASK_ID, INCARNATION, JOB_ID, TASK_TYPE, ID, ROUND_ID, DEST_ID, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, TOTAL_LS_COUNT, FINISH_LS_COUNT, RESULT, "COMMENT", PATH FROM SYS.ALL_VIRTUAL_BACKUP_DELETE_TASK WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT TASK_ID, JOB_ID, TASK_TYPE, ID, ROUND_ID, DEST_ID, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, TOTAL_LS_COUNT, FINISH_LS_COUNT, RESULT, "COMMENT", PATH FROM SYS.ALL_VIRTUAL_BACKUP_DELETE_TASK WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
@ -2059,7 +2059,7 @@ int ObInnerTableSchema::dba_ob_backup_delete_task_history_ora_schema(ObTableSche
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT TASK_ID, INCARNATION, JOB_ID, TASK_TYPE, ID, ROUND_ID, DEST_ID, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, TOTAL_LS_COUNT, FINISH_LS_COUNT, RESULT, "COMMENT", PATH FROM SYS.ALL_VIRTUAL_BACKUP_DELETE_TASK_HISTORY WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT TASK_ID, JOB_ID, TASK_TYPE, ID, ROUND_ID, DEST_ID, TO_CHAR(START_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') AS START_TIMESTAMP, CASE WHEN END_TS = 0 THEN '' ELSE TO_CHAR(END_TS / (1000 * 60 * 60 * 24 * 1000) + TO_DATE('1970-01-01 08:00:00', 'yyyy-mm-dd hh:mi:ss'), 'yyyy-mm-dd hh24:mi:ss') END AS END_TIMESTAMP, STATUS, TOTAL_LS_COUNT, FINISH_LS_COUNT, RESULT, "COMMENT", PATH FROM SYS.ALL_VIRTUAL_BACKUP_DELETE_TASK_HISTORY WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
@ -2259,7 +2259,7 @@ int ObInnerTableSchema::dba_ob_archivelog_ora_schema(ObTableSchema &table_schema
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT DEST_ID, ROUND_ID, INCARNATION, DEST_NO, STATUS, START_SCN, SCN_TO_TIMESTAMP(START_SCN) AS START_SCN_DISPLAY, CHECKPOINT_SCN, SCN_TO_TIMESTAMP(CHECKPOINT_SCN) AS CHECKPOINT_SCN_DISPLAY, COMPATIBLE, BASE_PIECE_ID, USED_PIECE_ID, PIECE_SWITCH_INTERVAL, UNIT_SIZE, COMPRESSION, (FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES) AS INPUT_BYTES, CASE WHEN (FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES) >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND((FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES)/1024/1024/1024/1024/1024,2), 'PB') WHEN (FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES) >= 1024*1024*1024*1024 THEN CONCAT(ROUND((FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES)/1024/1024/1024/1024,2), 'TB') WHEN (FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES) >= 1024*1024*1024 THEN CONCAT(ROUND((FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES)/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND((FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES)/1024/1024,2), 'MB') END AS INPUT_BYTES_DISPLAY, (FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES) AS OUTPUT_BYTES, CASE WHEN (FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES) >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND((FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES)/1024/1024/1024/1024/1024,2), 'PB') WHEN (FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES) >= 1024*1024*1024*1024 THEN CONCAT(ROUND((FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES)/1024/1024/1024/1024,2), 'TB') WHEN (FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES) >= 1024*1024*1024 THEN CONCAT(ROUND((FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES)/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND((FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES)/1024/1024,2), 'MB') END AS OUTPUT_BYTES_DISPLAY, CASE WHEN (FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES) = 0 THEN 0 ELSE ROUND((FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES) / (FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES), 2) END AS COMPRESSION_RATIO, DELETED_INPUT_BYTES, CASE WHEN DELETED_INPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(DELETED_INPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN DELETED_INPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(DELETED_INPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN DELETED_INPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(DELETED_INPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(DELETED_INPUT_BYTES/1024/1024,2), 'MB') END AS DELETED_INPUT_BYTES_DISPLAY, DELETED_OUTPUT_BYTES, CASE WHEN DELETED_OUTPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(DELETED_OUTPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN DELETED_OUTPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(DELETED_OUTPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN DELETED_OUTPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(DELETED_OUTPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(DELETED_OUTPUT_BYTES/1024/1024,2), 'MB') END AS DELETED_OUTPUT_BYTES_DISPLAY, "COMMENT", PATH FROM SYS.ALL_VIRTUAL_LOG_ARCHIVE_PROGRESS WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT DEST_ID, ROUND_ID, DEST_NO, STATUS, START_SCN, SCN_TO_TIMESTAMP(START_SCN) AS START_SCN_DISPLAY, CHECKPOINT_SCN, SCN_TO_TIMESTAMP(CHECKPOINT_SCN) AS CHECKPOINT_SCN_DISPLAY, COMPATIBLE, BASE_PIECE_ID, USED_PIECE_ID, PIECE_SWITCH_INTERVAL, UNIT_SIZE, COMPRESSION, (FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES) AS INPUT_BYTES, CASE WHEN (FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES) >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND((FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES)/1024/1024/1024/1024/1024,2), 'PB') WHEN (FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES) >= 1024*1024*1024*1024 THEN CONCAT(ROUND((FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES)/1024/1024/1024/1024,2), 'TB') WHEN (FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES) >= 1024*1024*1024 THEN CONCAT(ROUND((FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES)/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND((FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES)/1024/1024,2), 'MB') END AS INPUT_BYTES_DISPLAY, (FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES) AS OUTPUT_BYTES, CASE WHEN (FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES) >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND((FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES)/1024/1024/1024/1024/1024,2), 'PB') WHEN (FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES) >= 1024*1024*1024*1024 THEN CONCAT(ROUND((FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES)/1024/1024/1024/1024,2), 'TB') WHEN (FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES) >= 1024*1024*1024 THEN CONCAT(ROUND((FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES)/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND((FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES)/1024/1024,2), 'MB') END AS OUTPUT_BYTES_DISPLAY, CASE WHEN (FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES) = 0 THEN 0 ELSE ROUND((FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES) / (FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES), 2) END AS COMPRESSION_RATIO, DELETED_INPUT_BYTES, CASE WHEN DELETED_INPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(DELETED_INPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN DELETED_INPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(DELETED_INPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN DELETED_INPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(DELETED_INPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(DELETED_INPUT_BYTES/1024/1024,2), 'MB') END AS DELETED_INPUT_BYTES_DISPLAY, DELETED_OUTPUT_BYTES, CASE WHEN DELETED_OUTPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(DELETED_OUTPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN DELETED_OUTPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(DELETED_OUTPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN DELETED_OUTPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(DELETED_OUTPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(DELETED_OUTPUT_BYTES/1024/1024,2), 'MB') END AS DELETED_OUTPUT_BYTES_DISPLAY, "COMMENT", PATH FROM SYS.ALL_VIRTUAL_LOG_ARCHIVE_PROGRESS WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
@ -2309,7 +2309,7 @@ int ObInnerTableSchema::dba_ob_archivelog_summary_ora_schema(ObTableSchema &tabl
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT DEST_ID, ROUND_ID, INCARNATION, DEST_NO, STATUS, START_SCN, SCN_TO_TIMESTAMP(START_SCN) AS START_SCN_DISPLAY, CHECKPOINT_SCN, SCN_TO_TIMESTAMP(CHECKPOINT_SCN) AS CHECKPOINT_SCN_DISPLAY, COMPATIBLE, BASE_PIECE_ID, USED_PIECE_ID, PIECE_SWITCH_INTERVAL, UNIT_SIZE, COMPRESSION, INPUT_BYTES, CASE WHEN INPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN INPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN INPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(INPUT_BYTES/1024/1024,2), 'MB') END AS INPUT_BYTES_DISPLAY, OUTPUT_BYTES, CASE WHEN OUTPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN OUTPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN OUTPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(OUTPUT_BYTES/1024/1024,2), 'MB') END AS OUTPUT_BYTES_DISPLAY, CASE WHEN INPUT_BYTES = 0 THEN 0 ELSE ROUND(OUTPUT_BYTES / INPUT_BYTES, 2) END AS COMPRESSION_RATIO, DELETED_INPUT_BYTES, CASE WHEN DELETED_INPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(DELETED_INPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN DELETED_INPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(DELETED_INPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN DELETED_INPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(DELETED_INPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(DELETED_INPUT_BYTES/1024/1024,2), 'MB') END AS DELETED_INPUT_BYTES_DISPLAY, DELETED_OUTPUT_BYTES, CASE WHEN DELETED_OUTPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(DELETED_OUTPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN DELETED_OUTPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(DELETED_OUTPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN DELETED_OUTPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(DELETED_OUTPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(DELETED_OUTPUT_BYTES/1024/1024,2), 'MB') END AS DELETED_OUTPUT_BYTES_DISPLAY, PATH, "COMMENT" FROM ( SELECT DEST_ID, ROUND_ID, INCARNATION, DEST_NO, STATUS, START_SCN, CHECKPOINT_SCN, COMPATIBLE, BASE_PIECE_ID, USED_PIECE_ID, PIECE_SWITCH_INTERVAL, UNIT_SIZE, COMPRESSION, (FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES) AS INPUT_BYTES, (FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES) AS OUTPUT_BYTES, DELETED_INPUT_BYTES, DELETED_OUTPUT_BYTES, PATH, "COMMENT" FROM SYS.ALL_VIRTUAL_LOG_ARCHIVE_PROGRESS WHERE TENANT_ID = EFFECTIVE_TENANT_ID() AND STATUS != 'STOP' UNION SELECT DEST_ID, ROUND_ID, INCARNATION, DEST_NO, 'STOP' AS STATUS, START_SCN, CHECKPOINT_SCN, COMPATIBLE, BASE_PIECE_ID, USED_PIECE_ID, PIECE_SWITCH_INTERVAL, UNIT_SIZE, COMPRESSION, INPUT_BYTES, OUTPUT_BYTES, DELETED_INPUT_BYTES, DELETED_OUTPUT_BYTES, PATH, "COMMENT" FROM SYS.ALL_VIRTUAL_LOG_ARCHIVE_HISTORY WHERE TENANT_ID = EFFECTIVE_TENANT_ID()) )__"))) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT DEST_ID, ROUND_ID, DEST_NO, STATUS, START_SCN, SCN_TO_TIMESTAMP(START_SCN) AS START_SCN_DISPLAY, CHECKPOINT_SCN, SCN_TO_TIMESTAMP(CHECKPOINT_SCN) AS CHECKPOINT_SCN_DISPLAY, COMPATIBLE, BASE_PIECE_ID, USED_PIECE_ID, PIECE_SWITCH_INTERVAL, UNIT_SIZE, COMPRESSION, INPUT_BYTES, CASE WHEN INPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN INPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN INPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(INPUT_BYTES/1024/1024,2), 'MB') END AS INPUT_BYTES_DISPLAY, OUTPUT_BYTES, CASE WHEN OUTPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN OUTPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN OUTPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(OUTPUT_BYTES/1024/1024,2), 'MB') END AS OUTPUT_BYTES_DISPLAY, CASE WHEN INPUT_BYTES = 0 THEN 0 ELSE ROUND(OUTPUT_BYTES / INPUT_BYTES, 2) END AS COMPRESSION_RATIO, DELETED_INPUT_BYTES, CASE WHEN DELETED_INPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(DELETED_INPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN DELETED_INPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(DELETED_INPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN DELETED_INPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(DELETED_INPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(DELETED_INPUT_BYTES/1024/1024,2), 'MB') END AS DELETED_INPUT_BYTES_DISPLAY, DELETED_OUTPUT_BYTES, CASE WHEN DELETED_OUTPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(DELETED_OUTPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN DELETED_OUTPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(DELETED_OUTPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN DELETED_OUTPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(DELETED_OUTPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(DELETED_OUTPUT_BYTES/1024/1024,2), 'MB') END AS DELETED_OUTPUT_BYTES_DISPLAY, PATH, "COMMENT" FROM ( SELECT DEST_ID, ROUND_ID, DEST_NO, STATUS, START_SCN, CHECKPOINT_SCN, COMPATIBLE, BASE_PIECE_ID, USED_PIECE_ID, PIECE_SWITCH_INTERVAL, UNIT_SIZE, COMPRESSION, (FROZEN_INPUT_BYTES + ACTIVE_INPUT_BYTES) AS INPUT_BYTES, (FROZEN_OUTPUT_BYTES + ACTIVE_OUTPUT_BYTES) AS OUTPUT_BYTES, DELETED_INPUT_BYTES, DELETED_OUTPUT_BYTES, PATH, "COMMENT" FROM SYS.ALL_VIRTUAL_LOG_ARCHIVE_PROGRESS WHERE TENANT_ID = EFFECTIVE_TENANT_ID() AND STATUS != 'STOP' UNION SELECT DEST_ID, ROUND_ID, DEST_NO, 'STOP' AS STATUS, START_SCN, CHECKPOINT_SCN, COMPATIBLE, BASE_PIECE_ID, USED_PIECE_ID, PIECE_SWITCH_INTERVAL, UNIT_SIZE, COMPRESSION, INPUT_BYTES, OUTPUT_BYTES, DELETED_INPUT_BYTES, DELETED_OUTPUT_BYTES, PATH, "COMMENT" FROM SYS.ALL_VIRTUAL_LOG_ARCHIVE_HISTORY WHERE TENANT_ID = EFFECTIVE_TENANT_ID()) )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
@ -2359,7 +2359,7 @@ int ObInnerTableSchema::dba_ob_archivelog_piece_files_ora_schema(ObTableSchema &
|
||||
table_schema.set_collation_type(ObCharset::get_default_collation(ObCharset::get_default_charset()));
|
||||
|
||||
if (OB_SUCC(ret)) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT DEST_ID, ROUND_ID, PIECE_ID, INCARNATION, DEST_NO, STATUS, START_SCN, SCN_TO_TIMESTAMP(START_SCN) AS START_SCN_DISPLAY, CHECKPOINT_SCN, SCN_TO_TIMESTAMP(CHECKPOINT_SCN) AS CHECKPOINT_SCN_DISPLAY, MAX_SCN, END_SCN, COMPATIBLE, UNIT_SIZE, COMPRESSION, INPUT_BYTES, CASE WHEN INPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN INPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN INPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(INPUT_BYTES/1024/1024,2), 'MB') END AS INPUT_BYTES_DISPLAY, OUTPUT_BYTES, CASE WHEN OUTPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN OUTPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN OUTPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(OUTPUT_BYTES/1024/1024,2), 'MB') END AS OUTPUT_BYTES_DISPLAY, CASE WHEN INPUT_BYTES = 0 THEN 0 ELSE ROUND(OUTPUT_BYTES / INPUT_BYTES, 2) END AS COMPRESSION_RATIO, FILE_STATUS, PATH FROM SYS.ALL_VIRTUAL_LOG_ARCHIVE_PIECE_FILES WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
if (OB_FAIL(table_schema.set_view_definition(R"__( SELECT DEST_ID, ROUND_ID, PIECE_ID, DEST_NO, STATUS, START_SCN, SCN_TO_TIMESTAMP(START_SCN) AS START_SCN_DISPLAY, CHECKPOINT_SCN, SCN_TO_TIMESTAMP(CHECKPOINT_SCN) AS CHECKPOINT_SCN_DISPLAY, MAX_SCN, END_SCN, COMPATIBLE, UNIT_SIZE, COMPRESSION, INPUT_BYTES, CASE WHEN INPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN INPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN INPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(INPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(INPUT_BYTES/1024/1024,2), 'MB') END AS INPUT_BYTES_DISPLAY, OUTPUT_BYTES, CASE WHEN OUTPUT_BYTES >= 1024*1024*1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024/1024/1024,2), 'PB') WHEN OUTPUT_BYTES >= 1024*1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024/1024,2), 'TB') WHEN OUTPUT_BYTES >= 1024*1024*1024 THEN CONCAT(ROUND(OUTPUT_BYTES/1024/1024/1024,2), 'GB') ELSE CONCAT(ROUND(OUTPUT_BYTES/1024/1024,2), 'MB') END AS OUTPUT_BYTES_DISPLAY, CASE WHEN INPUT_BYTES = 0 THEN 0 ELSE ROUND(OUTPUT_BYTES / INPUT_BYTES, 2) END AS COMPRESSION_RATIO, FILE_STATUS, PATH FROM SYS.ALL_VIRTUAL_LOG_ARCHIVE_PIECE_FILES WHERE TENANT_ID = EFFECTIVE_TENANT_ID() )__"))) {
|
||||
LOG_ERROR("fail to set view_definition", K(ret));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user