Hi,
When you import any dump exported from old version Oracle database, you can get “ORA-56920: a prepare or upgrade window or an on-demand or datapump-job loading of a secondary time zone data file is in an active state” error because of upgrade.
If you didn’t complete post upgrade actions during upgrade Oracle 12c to Oracle 18c, you can get the following errors during export-import operation because of Time-zone problem.
ERROR at line 1: ORA-56920: a prepare or upgrade window or an on-demand or datapump-job loading of a secondary time zone data file is in an active state ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79 ORA-06512: at "SYS.DBMS_DST", line 1390 ORA-06512: at line 1
Solution:
Execute the following scripts to fix timezone problem.
SQL> update props$ set value$=0 where name='DST_SECONDARY_TT_VERSION'; 1 row updated. SQL> update props$ set value$='NONE' where name='DST_UPGRADE_STATE'; 1 row updated. SQL> commit; Commit complete. SQL> select * from props$ where name like 'DST%'; NAME ----------------------------------------- VALUE$ ----------------------------------------- COMMENT$ ----------------------------------------- DST_UPGRADE_STATE NONE State of Day Light Saving Time Upgrade DST_PRIMARY_TT_VERSION 14 Version of primary timezone data file DST_SECONDARY_TT_VERSION 0 Version of secondary timezone data file 3 rows selected.
After completed timezone update, run the following procedures.
SQL> exec DBMS_DST.BEGIN_PREPARE(31); A prepare window has been successfully started. SQL> exec dbms_dst.unload_secondary; PL/SQL procedure successfully completed.
Now you can perform import operation successfully.
Do you want to learn Oracle Database for Beginners, then read the following articles.
https://ittutorial.org/oracle-database-19c-tutorials-for-beginners/