ORA-39405: Oracle Data Pump does not support importing from a source database with TSTZ

Error ORA-39405: Oracle Data Pump does not support importing from a source database with TSTZ occurs when you try to import a dump file using Oracle Data Pump, but the source database has a Time Stamp with Time Zone (TSTZ) data type, and there is an incompatibility between the source and target databases.

Causes:

  1. Different Oracle Versions: The source and target databases have different versions of the TIMESTAMP WITH TIME ZONE format.
  2. Different Time Zone Files: The source database uses a different time zone file version than the target database.
  3. Data Dictionary Differences: If the source database has a newer Oracle version with enhanced TSTZ data handling, the import may fail.

Solution:

Different Time Zone Files:

Verify the time zone for both destination and source database

SELECT * FROM v$timezone_file;

Note: if you are using Oracle 21c, problem is easily fixed by using following hidden parameter:

alter system set "_datapump_bypass_tstz_check"=TRUE scope=both;

If time zone not match, then we need to apply the latest DST patches from Oracle. So that source database and destination database is on same time zone.

Different Oracle Versions:

If their is different between Oracle Version then we need to use version during EXPDP backup as follows

    expdp system/password@source_db full=y dumpfile=export.dmp directory=DATA_PUMP_DIR version=12.2

    Data Dictionary Differences

    Convert TSTZ Data

    If possible, convert TIMESTAMP WITH TIME ZONE columns into TIMESTAMP (without a time zone) in the source database before exporting:

    ALTER TABLE your_table MODIFY your_column TIMESTAMP;
    This entry was posted in Oracle on by .
    Unknown's avatar

    About SandeepSingh

    Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

    Leave a Reply