oracle impdp - 超出最大打开游标数
oracle impdp - maximum open cursors exceeded
我使用 expdp
从 oracle 10.2.0.5.0 数据库中导出了一个数据库模式,并以模式所有者的身份登录。
现在我尝试将数据导入 Oracle 12.1.0.2.0 数据库 impdp
,以 sys 身份登录,角色为 sysdba
。
expdp 命令:
expdp "owner/password@hostname/servicename" schemas=SCHEMA_NAME directory=EXPDIR dumpfile=SCHEMA_NAME.dmp logfile=SCHEMA_NAME.log
impdp 命令:
impdp "sys/password@hostname/servicename as sysdba" schemas=SCHEMA_NAME directory=EXPDIR dumpfile=SCHEMA_NAME.dmp logfile=SCHEMA_NAME.log
导入报错信息:
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
ORA-39014: One or more workers have prematurely exited.
ORA-39029: worker 1 with process name "DW00" prematurely terminated
ORA-31671: Worker process DW00 had an unhandled exception.
ORA-01000: maximum open cursors exceeded
ORA-39126: Worker unexpected fatal error in KUPW$WORKER.PUT_DDLS [INDEX:"SCHEMA_NAME"."UK$SOME$NAME"]
CREATE UNIQUE INDEX "SCHEMA_NAME"."UK$SOME$NAME" ON "SCHEMA_NAME"."TABLE_NAME" ("COLUMN_NAME") PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "TBLSPC" PARALLEL 1
ORA-31625: Schema SYS is needed to import this object, but is unaccessible
ORA-00604: error occurred at recursive SQL level 2
ORA-01000: maximum open cursors exceeded
ORA-06512: at "SYS.KUPW$WORKER", line 9193
ORA-06512: at "SYS.KUPW$WORKER", line 22449
ORA-31625: Schema SYS is needed to import this object, but is unaccessible
ORA-00604: error occurred at recursive SQL level 2
ORA-01000: maximum open cursors exceeded
ORA-01000: maximum open cursors exceeded
ORA-39014: One or more workers have prematurely exited.
ORA-39029: worker 2 with process name "DW00" prematurely terminated
ORA-31671: Worker process DW00 had an unhandled exception.
ORA-01000: maximum open cursors exceeded
ORA-39126: Worker unexpected fatal error in KUPW$WORKER.PUT_DDLS [INDEX:"SCHEMA_NAME"."IDX$SOME$OTHER_NAME"]
CREATE INDEX "SCHEMA_NAME"."IDX$SOME$OTHER_NAME" ON "SCHEMA_NAME"."OTHER_TABLE_NAME" ("OTHER_COLUMN_NAME") PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "TBLSPC" PARALLEL 1
ORA-31625: Schema SYS is needed to import this object, but is unaccessible
ORA-00604: error occurred at recursive SQL level 2
ORA-01000: maximum open cursors exceeded
ORA-06512: at "SYS.KUPW$WORKER", line 9193
ORA-06512: at "SYS.KUPW$WORKER", line 22449
ORA-31625: Schema SYS is needed to import this object, but is unaccessible
ORA-00604: error occurred at recursive SQL level 2
ORA-01000: maximum open cursors exceeded
ORA-01000: maximum open cursors exceeded
Job "SYS"."SYS_IMPORT_SCHEMA_13" stopped due to fatal error at Fri Dec 1 14:09:07 2017 elapsed 0 00:02:05
我试过增加打开游标的最大数量,但没有帮助。
使用选项 EXCLUDE=INDEX,导入运行没有错误,但我也需要它们。
接下来我可以尝试什么?
ORA-01000:在 12c 中的 DataPump 导入 (IMDPP) 期间超出最大打开游标
(文件编号 2283800.1)
最后更新于 2017 年 8 月 8 日
Do not invoke Import as SYSDBA, except at the request of Oracle
technical support. SYSDBA is used internally and has specialized
functions; its behavior is not the same as for general users.
ORA-01000:在 12c(文档 ID 2283800.1)中执行 DataPump 作业时超出最大打开游标数
原因
OPEN_CURSOR 的值设置得不够高。
在做DataPump import的时候,游标的数量取决于很多因素,包括对象的数量,分区,索引,涉及的递归SQL等。另外,在12c上,impdp的内部处理比10g复杂,因此可能需要更高的 open_cursor 才能完成导入作业。
解决方案
暂时将 OPEN_CURSORS 增加到足够高的值,如 2000,然后重做 DataPump 作业。
我使用 expdp
从 oracle 10.2.0.5.0 数据库中导出了一个数据库模式,并以模式所有者的身份登录。
现在我尝试将数据导入 Oracle 12.1.0.2.0 数据库 impdp
,以 sys 身份登录,角色为 sysdba
。
expdp 命令:
expdp "owner/password@hostname/servicename" schemas=SCHEMA_NAME directory=EXPDIR dumpfile=SCHEMA_NAME.dmp logfile=SCHEMA_NAME.log
impdp 命令:
impdp "sys/password@hostname/servicename as sysdba" schemas=SCHEMA_NAME directory=EXPDIR dumpfile=SCHEMA_NAME.dmp logfile=SCHEMA_NAME.log
导入报错信息:
Processing object type SCHEMA_EXPORT/TABLE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
ORA-39014: One or more workers have prematurely exited.
ORA-39029: worker 1 with process name "DW00" prematurely terminated
ORA-31671: Worker process DW00 had an unhandled exception.
ORA-01000: maximum open cursors exceeded
ORA-39126: Worker unexpected fatal error in KUPW$WORKER.PUT_DDLS [INDEX:"SCHEMA_NAME"."UK$SOME$NAME"]
CREATE UNIQUE INDEX "SCHEMA_NAME"."UK$SOME$NAME" ON "SCHEMA_NAME"."TABLE_NAME" ("COLUMN_NAME") PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "TBLSPC" PARALLEL 1
ORA-31625: Schema SYS is needed to import this object, but is unaccessible
ORA-00604: error occurred at recursive SQL level 2
ORA-01000: maximum open cursors exceeded
ORA-06512: at "SYS.KUPW$WORKER", line 9193
ORA-06512: at "SYS.KUPW$WORKER", line 22449
ORA-31625: Schema SYS is needed to import this object, but is unaccessible
ORA-00604: error occurred at recursive SQL level 2
ORA-01000: maximum open cursors exceeded
ORA-01000: maximum open cursors exceeded
ORA-39014: One or more workers have prematurely exited.
ORA-39029: worker 2 with process name "DW00" prematurely terminated
ORA-31671: Worker process DW00 had an unhandled exception.
ORA-01000: maximum open cursors exceeded
ORA-39126: Worker unexpected fatal error in KUPW$WORKER.PUT_DDLS [INDEX:"SCHEMA_NAME"."IDX$SOME$OTHER_NAME"]
CREATE INDEX "SCHEMA_NAME"."IDX$SOME$OTHER_NAME" ON "SCHEMA_NAME"."OTHER_TABLE_NAME" ("OTHER_COLUMN_NAME") PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "TBLSPC" PARALLEL 1
ORA-31625: Schema SYS is needed to import this object, but is unaccessible
ORA-00604: error occurred at recursive SQL level 2
ORA-01000: maximum open cursors exceeded
ORA-06512: at "SYS.KUPW$WORKER", line 9193
ORA-06512: at "SYS.KUPW$WORKER", line 22449
ORA-31625: Schema SYS is needed to import this object, but is unaccessible
ORA-00604: error occurred at recursive SQL level 2
ORA-01000: maximum open cursors exceeded
ORA-01000: maximum open cursors exceeded
Job "SYS"."SYS_IMPORT_SCHEMA_13" stopped due to fatal error at Fri Dec 1 14:09:07 2017 elapsed 0 00:02:05
我试过增加打开游标的最大数量,但没有帮助。
使用选项 EXCLUDE=INDEX,导入运行没有错误,但我也需要它们。
接下来我可以尝试什么?
ORA-01000:在 12c 中的 DataPump 导入 (IMDPP) 期间超出最大打开游标 (文件编号 2283800.1) 最后更新于 2017 年 8 月 8 日
Do not invoke Import as SYSDBA, except at the request of Oracle technical support. SYSDBA is used internally and has specialized functions; its behavior is not the same as for general users.
ORA-01000:在 12c(文档 ID 2283800.1)中执行 DataPump 作业时超出最大打开游标数
原因
OPEN_CURSOR 的值设置得不够高。
在做DataPump import的时候,游标的数量取决于很多因素,包括对象的数量,分区,索引,涉及的递归SQL等。另外,在12c上,impdp的内部处理比10g复杂,因此可能需要更高的 open_cursor 才能完成导入作业。
解决方案
暂时将 OPEN_CURSORS 增加到足够高的值,如 2000,然后重做 DataPump 作业。