在 WE8MSWIN1252 字符集和 AL16UTF16 NCHAR 字符集中完成导入,但没有任何反应?

Import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set, but nothing happen?

使用 imp 导入我的 XXX.DMP 文件时没有出现错误,但是 没有数据库、架构,或者 table 已导入 并且日志文件也为空。这是它的样子:

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

Import data only (yes/no): no >

Import file: EXPDAT.DMP > D:\xxx.dmp

Enter insert buffer size (minimum is 8192) 30720>

Export file created by EXPORT:V11.02.00 via conventional path
import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set
C:\Users\User>

如您所见,它就停在那里。

我使用 Oracle 11,这个文件是从 Oracle 12 导出的。然后我手动将 DMP 文件头从 EXPORT:V12.01.00 更改为 EXPORT:V11.02.00,因为它不适用于 EXPORT:V12.01.00前。

我已经尝试使用 impd 或使用 TOAD for Oracle 导入它,但都不起作用。

I changed the DMP file header ... manually

不要那样做。 From the documentation:

  • Any export dump file can be imported into a later release of the Oracle database.

  • The Import utility cannot read export dump files created by the Export utility of a later maintenance release or version. For example, a release 9.2 export dump file cannot be imported by a release 9.0.1 Import utility.

这不是说 header 中显示的版本不同那么简单。二进制格式是专有的,并且可以(并且大概确实)一直在变化。试图操纵该文件只会给您带来痛苦,并且在您的情况下会导致导入很早就中止-这可能是一件好事;如果它确实能够进一步发展,你可能会以腐败告终。

正确的做法是使用 11gR2 客户端也从 12cR1 数据库执行导出。

更正确的做法是使用data pump tools (expdp and impdp) instead of the legacy import/export tools, with similar caveats


如果您的 12c 数据库不再可用并且您无法进行新的导出,那么您就有点卡住了。您真正能做的唯一一件事是创建一个新的 12c 数据库,使用现有的转储文件来填充它,然后使用 11g 工具从 that 进行导出。痛苦,但安全。