Oracle数据库 加入小组

59个成员 56个话题 创建时间:2021-01-15

【故障处理】LPX-00230: invalid character 38 (U+0026) found in a Name or Nmtoken 精华

发表于2021-02-22 3198次查看

 

有客户在impdp导入时出现如下报错:

计划单独导出视图,使用下面命令,也无法解决。

expdp  \'/ as sysdba\' directory=expdp dumpfile=view1.dmp logfile=view.log include=view

Export: Release 11.2.0.4.0 - Production on Sun Feb 21 10:07:22 2021

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
Starting "SYS"."SYS_EXPORT_SCHEMA_01":  "/******** AS SYSDBA" directory=expdp dumpfile=view1.dmp logfile=view.log include=view
Estimate in progress using BLOCKS method...
Total estimation using BLOCKS method: 0 KB
ORA-39168: Object path VIEW was not found.
ORA-31655: no data or metadata objects selected for job
Job "SYS"."SYS_EXPORT_SCHEMA_01" completed with 2 error(s) at Sun Feb 21 10:07:27 2021 elapsed 0 00:00:04
                                                                                                                 7 2021 elapsed 0 00:00:04

【问题分析】

此问题很可能是由于:导入日志中报告的视图/实例化视图的创建语句中使用的多字节字符注释触发的。

【解决方法】

使用以下解决方法: 

使用EXCLUDE = VIEW或/和MATERIALIZED_VIEW参数执行impdp。 

这将创建除视图/实例化视图以外的所有对象。

 导入后,使用源数据库中的创建脚本或使用与SQLFILE参数一起使用的impdp生成的文件中的创建脚本在目标数据库中重新创建视图和/或实例化视图。

或者 

使用传统的导出/导入,exp/imp

直接导出视图的命令如下:

expdp system/<password> DIRECTORY=my_dir DUMPFILE=expdp_vw.dmp LOGFILE=expdp_vw.log SCHEMAS=tc INCLUDE=view

或者

expdp system/<password> DIRECTORY=my_dir DUMPFILE=expdp_vw.dmp LOGFILE=expdp_vw.log SCHEMAS=tc INCLUDE=view:\"\=\'MY_VIEW\'\"

【参考文档】

DataPump Import (IMPDP) Fails With Errors ORA-39083 ORA-907 ORA-39125 LPX-00230 When Importing Views (Doc ID 803043.1)

EXPDP - ORA-39166 (Object Was Not Found) When Trying To Export The Data From A View (Doc ID 1640392.1)

Checklist For Slow Performance Of DataPump Export (expdp) And Import (impdp) (Doc ID 453895.1)

发表回复
你还没有登录,请先 登录或 注册!