ORA-39405: Oracle Data Pump does not support importing from a source database with TSTZ
Posted by FatDBA on February 16, 2025
Recently, I had a conversation with an old friend who was struggling with Data Pump import errors. He encountered the following error message:
"ORA-39405: Oracle Data Pump does not support importing from a source database with TSTZ."
The message itself provided a clear hint—the issue stemmed from a time zone (TZ) version mismatch between the source and target databases. He was trying to export data from a 19.20.0 database (DST 42) and import it into an older 19.18.0 database (DST 32).
This situation left him quite perplexed, as his database contained multiple time zone-dependent data, raising concerns about potential data inconsistencies and conversion errors.
How It All Started – Initially, when he created the database using Oracle 19.18.0, it was configured with DST version 32 by default.
SELECT * FROM v$timezone_file;
FILENAME VERSION CON_ID
----------------------------------------
timezlrg_32.dat 32 0
Later, he upgraded his Oracle home to 19.20.0 and applied patches to his existing 19.18.0 database. However, the DST version remained at 32, as patching alone does not update the DST version unless explicitly modified using AutoUpgrade.
The real issue arose when he created a brand-new database using the 19.20.0 home. Upon checking its DST version, he discovered that it had been assigned a newer DST version (42), which led to the compatibility problem.
SELECT * FROM v$timezone_file;
FILENAME VERSION CON_ID
-------------------- ---------- ----------
timezlrg_42.dat 42 0
The Core Problem
The mismatch between DST 42 (new database) and DST 32 (old database) meant that Data Pump could not process time zone-based data properly, causing the import failure.
Unfortunately, there is no direct solution available for this issue in Oracle 19c. However, starting from Oracle 21c and later, this problem could have been easily bypassed by setting the following hidden parameter, which overrides the strict time zone check:
alter system set "_datapump_bypass_tstz_check"=TRUE scope=both;
Since my friend was working with Oracle 19c, we explored several potential workarounds:
Kamil’s Solution: One promising approach was suggested by Kamil Stawiarski, who detailed a method to resolve the issue in his blog post:
Solved: ORA-39405 – Oracle Data Pump does not support importing from a source database with TSTZ. However, this method requires OS-level access, which my friend did not have in his environment, making it an unfeasible option.
Preemptively Removing Newer DST Files: Another workaround we considered involved automating a cleanup process that periodically removes newer, unwanted DST files from all $ORACLE_HOME/oracore/zoneinfo directories and their subdirectories. This could be implemented as a scheduled cron job that runs regularly (or at least after each patch application) to prevent new databases from being created with newer DST files.
The downside? This approach would block access to newer time zone definitions, which could become problematic if applications or users require those updates in the future.
The Agreed Solution – After considering various options, we decided on the most practical and controlled approach:
When creating a new database, explicitly set the desired DST version at the time of creation.
This can be achieved by using DBCA (Database Configuration Assistant) or a custom script while ensuring that the ORA_TZFILE environment variable is set beforehand.
For example, using DBCA in silent mode, the database can be created with a specific DST version:
export ORA_TZFILE= <DESIRED TZ VERSION>
dbca -silent -createDatabase -source -timezoneVersion
By defining the DST version at the time of database creation, we can prevent mismatches and avoid compatibility issues when exporting/importing data across databases with different DST versions.
While there’s no perfect solution in Oracle 19c, proper planning and proactive DST version control can mitigate potential errors and ensure smoother database operations.
Hope It Helped!
Prashant Dixit





Leave a comment