ORA-39405: Oracle Data Pump does not support importing from a source database with TSTZ version 42 into a target database with TSTZ version 32.
查看报错:
1 2 3 4 5 6 7 8
[oracle@orcl19c:/home/oracle]$ oerr ora 39405 39405, 00000, "Oracle Data Pump does not support importing from a source database with TSTZ version %s into a target database with TSTZ version %s." // *Cause: The source database was at a different time zone version than the // target database and there were tables that contained TIMESTAMP // WITH TIME ZONE (TSTZ) data. // *Action: Convert the target database to the same time zone version or // later as the source database or use Oracle Data Pump with // conventional data movement to exportthen import this data.
大致意思就是:
在使用 Oracle Data Pump 进行数据导入时,如果源数据库的时区版本(TSTZ版本)与目标数据库的时区版本不同,就会出现该错误,需要将目标数据库的时区版本更新为与源数据库相同或更高版本。
## 进入补丁目录 [oracle@orcl19c:/home/oracle]$ cd /home/oracle/35220732
## 安装前检查 [oracle@orcl19c:/home/oracle]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./ Oracle Interim Patch Installer version 12.2.0.1.17 Copyright (c) 2025, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/19.0.0/db Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/19.0.0/db/oraInst.loc OPatch version : 12.2.0.1.17 OUI version : 12.2.0.7.0 Log file location : /u01/app/oracle/product/19.0.0/db/cfgtoollogs/opatch/opatch2025-02-20_17-23-05PM_1.log
## 安装补丁 [oracle@orcl19c 35220732]$ $ORACLE_HOME/OPatch/opatch apply Oracle Interim Patch Installer version 12.2.0.1.17 Copyright (c) 2025, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/19.0.0/db Central Inventory : /u01/app/oraInventory from : /u01/app/oracle/product/19.0.0/db/oraInst.loc OPatch version : 12.2.0.1.17 OUI version : 12.2.0.7.0 Log file location : /u01/app/oracle/product/19.0.0/db/cfgtoollogs/opatch/opatch2025-02-20_17-23-11PM_1.log
Verifying environment and performing prerequisite checks... OPatch continues with these patches: 35220732
Do you want to proceed? [y|n] y User Responded with: Y All checks passed. Backing up files... Applying interim patch '35220732' to OH '/u01/app/oracle/product/19.0.0/db'
SQL> col property_name for a30 col valuefor a30 select property_name, substr(property_value, 1, 30) value from database_properties where property_name like'DST_%' orderby property_name;
PROPERTY_NAME VALUE ------------------------------ ------------------------------ DST_PRIMARY_TT_VERSION 42 DST_SECONDARY_TT_VERSION 0 DST_UPGRADE_STATE NONE