2

我正在使用 Oracle 11GR2 版本。我使用以下命令成功导出了转储,在导出时我没有看到任何错误并且一切顺利。

expdp DBCOPY/DBCOPY@EAMSB1 DIRECTORY=DUMP_DIR dumpfile=dbcopy.dmp logfile=dbcopy.log schemas=DBCOPY

我尝试使用 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}

这里显示

导入失败,出现以下错误

请就我的 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

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

Import terminated successfully

相反,它给出了以下消息

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
4

2 回答 2

5

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

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

SHOW ERRORS FUNCTION MADHU.O7SPNDMA

由于您使用不同的用户导入了数据,并且可能完全在不同的数据库实例上,新用户可能没有相同的权限来访问表和其他 PL/SQL 包,因此在成功编译函数和过程的代码或同义词可能会丢失。

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

于 2012-06-09T10:03:13.683 回答
1

从哪个数据库导出?如果是 10g,您可能需要修复错误 5581731。

于 2012-06-09T08:00:30.157 回答