11GR2中的Oracle导入错误,ORA-39082对象创建时出现编译错误

Mad*_*ddy 2 oracle import oracle11g

我使用的是Oracle 11GR2版本.我使用以下命令成功导出转储,在导出时我没有看到任何错误和一切顺利.

expdp DBCOPY/DBCOPY@EAMSB1 DIRECTORY=DUMP_DIR dumpfile=dbcopy.dmp logfile=dbcopy.log schemas=DBCOPY
Run Code Online (Sandbox Code Playgroud)

我尝试使用impdp为同一数据库实例中的另一个用户导入它,方法是创建另一个用户(用于我的测试)

impdp directory=DUMP_DIR dumpfile=DBCOPY.dmp FROMUSER=DBCOPY TRANSFORM=oid:n TOUSER=MADHU log=testlog9.log ignore=y remap_tablespace ={OBS_DATA:DATA_7I}
Run Code Online (Sandbox Code Playgroud)

在这里显示

导入不成功,出现以下错误

请建议我使用impdb或expdb命令时遇到任何问题.我在导入时遇到了一些像找不到表空间OBS_DATA的错误.所以我尝试了remap_tablespace属性.

日志文件中的错误

processing object type SCHEMA_EXPORT/PROCEDURE/PROCEDURE
Processing object type SCHEMA_EXPORT/PACKAGE/COMPILE_PACKAGE/PACKAGE_SPEC/ALTER_PACKAGE_SPEC
Processing object type SCHEMA_EXPORT/FUNCTION/ALTER_FUNCTION
ORA-39082: Object type ALTER_FUNCTION:"MADHU "."O7SPNDMA" created with compilation warnings
ORA-39082: Object type ALTER_FUNCTION:"MADHU "."O7WZCOSL" created with compilation warnings
ORA-39082: Object type ALTER_FUNCTION:"MADHU "."O7OZOCST" created with compilation warnings
ORA-39082: Object type ALTER_FUNCTION:"MADHU "."O7OZLCOLTOTAL" created with compilation warnings
ORA-39082: Object type ALTER_FUNCTION:"MADHU "."O7OZOCSTTOTAL" created with compilation warnings
ORA-39082: Object type ALTER_FUNCTION:"MADHU "."O7REPJZACOS" created with compilation warnings
ORA-39082: Object type ALTER_FUNCTION:"MADHU "."O7REPJZPBCS" created with compilation warnings
ORA-39082: Object type ALTER_FUNCTION:"MADHU "."O7REPJZCOSL" created with compilation warnings
ORA-39082: Object type ALTER_FUNCTION:"MADHU "."O7REPJYACOS" created with compilation warnings
Processing object type SCHEMA_EXPORT/PROCEDURE/ALTER_PROCEDURE
ORA-39082: Object type ALTER_PROCEDURE:"MADHU "."DELETEDTBL" created with compilation warnings
ORA-39082: Object type ALTER_PROCEDURE:"MADHU "."SETFORCED" created with compilation warnings
ORA-39082: Object type ALTER_PROCEDURE:"MADHU "."O7PNODMA" created with compilation warnings
ORA-39082: Object type ALTER_PROCEDURE:"MADHU "."O7WOCOST" created with compilation warnings
Run Code Online (Sandbox Code Playgroud)

导入和导出命令有问题吗?在日志文件的末尾,我看不到该消息

Import terminated successfully
Run Code Online (Sandbox Code Playgroud)

相反,它给出了以下信息

Processing object type SCHEMA_EXPORT/TABLE/INDEX/STATISTICS/FUNCTIONAL_AND_BITMAP/INDEX_STATISTICS
Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
Job "SYS"."SYS_IMPORT_FULL_01" completed with 35 error(s) at 23:35:34
Run Code Online (Sandbox Code Playgroud)

Cod*_*odo 5

数据库导出包含存储过程和函数.再次导入它们时无法编译它们.

在SQLplus(以及许多其他工具)中,您可以运行SHOW ERRORS以调查特定错误,例如:

SHOW ERRORS FUNCTION MADHU.O7SPNDMA
Run Code Online (Sandbox Code Playgroud)

由于您已经使用不同的用户并且可能在不同的数据库实例上导入了数据,因此新用户可能没有相同的权限来访问表和其他PL/SQL包,因此可能存在硬编码的用户/模式名称.可能缺少代码或同义词以成功编译函数和过程.

SHOW ERRORS会告诉.如果您需要更多支持,可以将输出添加SHOW ERRORS到您的问题中.