Menu Close

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

1. 问题简述

将11g数据库的expdp导出文件导入到19c的PDB数据库中,执行impdp命令时报错。

2. 报错信息

2.1. 报错内容

ORA-39006: internal error
ORA-39065: unexpected master process exception in DISPATCH
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_DST", line 1864
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_DST", line 1788
ORA-06512: at "SYS.KUPM$MCP", line 20451
ORA-06512: at "SYS.KUPM$MCP", line 13058
ORA-06512: at "SYS.KUPM$MCP", line 12434
ORA-06512: at "SYS.KUPM$MCP", line 15078
ORA-06512: at "SYS.KUPM$MCP", line 10314
ORA-39097: Data Pump job encountered unexpected error -56920

2.2. 报错截图

file

3. 问题分析

3.1. 错误解释

  • 英文
[user:oracle]$ oerr ora 56920
56920, 00000, "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"
// *Cause: A prepare or upgrade window was started or an on-demand or
//         datapump-job loading of a secondary time zone data file was done.
// *Action: Make sure there is no active prepare or upgrade window and no
//          active on-demand or datapump-job loading of a secondary time zone
//          data file.
//
  • 中文
数据库: 19c 发布 1
错误代码: ORA-56920
描述: 准备或升级窗口处于活动状态, 或者次级时区数据文件的按需或数据泵作业加载处于活动状态
原因: 启动了准备或升级窗口,或者完成了第二时区数据文件的按需或datapump-job加载。
动作: 确保没有活动的“准备或升级”窗口,也没有活动的按需加载或辅助时区数据文件的datapump-job加载。

3.2. 分析问题

我在对PDB数据库执行 TSTZ 时区的升级后,没有结束升级,导致上述报错。

请参考:ORA-39405: Oracle Data Pump does not support importing from a source database with TSTZ version 36

4. 问题解决

调用存储过程结束升级:

SQL>
SQL>
SET SERVEROUTPUT ON
DECLARE
  l_failures   PLS_INTEGER;
BEGIN
  DBMS_DST.upgrade_database(l_failures);
  DBMS_OUTPUT.put_line('DBMS_DST.upgrade_database : l_failures=' || l_failures);
  DBMS_DST.end_upgrade(l_failures);
  DBMS_OUTPUT.put_line('DBMS_DST.end_upgrade : l_failures=' || l_failures);
END;
/

file

5. 问题总结

在操作时要严格按照文档的步骤执行。

6. 其他拓展知识

附录

附录A. 相关联的文章

附录B. 其他参考