11GR2 中的 Oracle 导入错误,ORA-39082 对象创建时出现编译错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10959351/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Oracle Import Error in 11GR2, ORA-39082 objects creating with compilation errors
提问by Maddy
I am using Oracle 11GR2 version. I exported a dump successfully using the following command, At the time of exporting I didn't see any error amd everything went well.
我使用的是 Oracle 11GR2 版本。我使用以下命令成功导出了转储,在导出时我没有看到任何错误并且一切顺利。
expdp DBCOPY/DBCOPY@EAMSB1 DIRECTORY=DUMP_DIR dumpfile=dbcopy.dmp logfile=dbcopy.log schemas=DBCOPY
And I tried to import it using impdp, for another user in the same database instance, by creating another user(For testing at my end)
我尝试使用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}
Here it shows
这里显示
Import is unsuccessful with following errors
导入失败,出现以下错误
Please suggest me any problem with my impdb or expdb commands. I while importing I am getting some errros like tablespace OBS_DATA not found. So I tried remap_tablespace attribute.
请向我提出有关我的 impdb 或 expdb 命令的任何问题。我在导入时遇到了一些错误,例如找不到表空间 OBS_DATA。所以我尝试了 remap_tablespace 属性。
Errors in log file
日志文件中的错误
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
Is there any problem with import and export commands? At the end of the log file i can't see the message
导入导出命令有问题吗?在日志文件的末尾我看不到消息
Import terminated successfully
Instead it is giving following message
相反,它给出了以下消息
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
回答by Codo
Your database export contains stored procedures and functions. They couldn't be compiled when you imported them again.
您的数据库导出包含存储过程和函数。当您再次导入它们时,它们无法编译。
In SQLplus (and many other tools), you can run SHOW ERRORS
to investigate the specific errors, eg.:
在 SQLplus(和许多其他工具)中,您可以运行SHOW ERRORS
以调查特定错误,例如:
SHOW ERRORS FUNCTION MADHU.O7SPNDMA
Since you have imported the data with a different user and possibly on a different database instance altogether, the new user might not have the same rights to access tables and other PL/SQL packages, there might be hard-coded user/schema names in the code or synonyms could be missing to successfully compile the functions and procedures.
由于您已经使用不同的用户导入了数据,并且可能在完全不同的数据库实例中,新用户可能没有相同的权限来访问表和其他 PL/SQL 包,因此可能存在硬编码的用户/模式名称可能缺少代码或同义词以成功编译函数和过程。
SHOW ERRORS
will tell. If you need more support, you can add the output of SHOW ERRORS
to your question.
SHOW ERRORS
会告诉。如果您需要更多支持,可以将 的输出添加SHOW ERRORS
到您的问题中。
回答by steve
From which database was the export taken? If it was was 10g, you might need the fix for bug 5581731.
从哪个数据库导出?如果是 10g,您可能需要修复错误 5581731。