oracle11 dump,ORACLE 11g导入9i dump的问题及解决

因为系统迁移,需要将一部分的9i的数据导入11g的库里,

目标库是11.2.0.3.0 64位的环境。

导入dump的时候,有一个比较大的分区表,需要用导入分区的方式,就写了如下的命令。但是奇怪的是过了一会,抛出来一个imp的错误就完事了。

-bash-4.1$imp n1/n1@testdb tables=TEST_DB:TEST_DB_PAR_P1        file=TEST_DBP1.dmp     ignore=Y statistics=none grants=n indexes=n buffer=9102000 log=imp_log_TEST_DB_PAR_P1_test

Import: Release 11.2.0.3.0 - Production on Wed Mar 19 17:05:33 2014

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

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, Data Mining and Real Application Testing options

Export file created by EXPORT:V09.02.00 via direct path

Warning: the objects were exported by SYSTEM, not by you

import done in UTF8 character set and AL16UTF16 NCHAR character set

import server uses AL32UTF8 character set (possible charset conversion)

export client uses ZHT16MSWIN950 character set (possible charset conversion)

. importing SYSTEM's objects into N1

IMP-00055: Warning: partition or subpartition "TEST_DB":"TEST_DB_PAR_P1" not found in export file

Import terminated successfully with warnings.

我以为我的表名和分区写的有问题,检查了一下,都在的。

为了继续,然后尝试直接按表导入,但是还是导不进去,不过报错信息倒是不太一样了。

-bash-4.1$ imp n1/n1@testdb tables=TEST_DB       file=TEST_DBP1.dmp     ignore=Y statistics=none grants=n indexes=n buffer=9102000 log=imp_log_TEST_DB_PAR_P1_test

Import: Release 11.2.0.3.0 - Production on Wed Mar 19 17:04:11 2014

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

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, Data Mining and Real Application Testing options

Export file created by EXPORT:V09.02.00 via direct path

Warning: the objects were exported by SYSTEM, not by you

import done in UTF8 character set and AL16UTF16 NCHAR character set

import server uses AL32UTF8 character set (possible charset conversion)

export client uses ZHT16MSWIN950 character set (possible charset conversion)

. importing SYSTEM's objects into N1

IMP-00033: Warning: Table "TEST_DB" not found in export file

Import terminated successfully with warnings.

开始怀疑是不是dump有问题了,确认了下checksum也是一样的。

最后尝试如下的方式,加了 fromuser ,touser选项,竟然可以了。

imp n1/n1@testdb tables=TEST_DB:TEST_DB_PAR_P1      fromuser=TEST_APPO touser=PSCNVDBO1   file=TEST_DBP1.dmp     ignore=Y statistics=none grants=n indexes=n buffer=9102000 log=imp_log_TEST_DB_PAR_P1           &

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, Data Mining and Real Application Testing options

Export file created by EXPORT:V09.02.00 via direct path

Warning: the objects were exported by SYSTEM, not by you

import done in UTF8 character set and AL16UTF16 NCHAR character set

import server uses AL32UTF8 character set (possible charset conversion)

export client uses ZHT16MSWIN950 character set (possible charset conversion)

. importing TEST_APPO's objects into N1

. . importing partition "TEST_DB":"TEST_DB_PAR_P1"   29673834 rows imported

Import terminated successfully without warnings.

查看metalink,也没有发现类似的帖子。也算自己为ORACLE出了一点力吧。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
是的,Oracle 11g可以通过数据泵(Data Pump)方式导入Oracle 9i的数据。数据泵是Oracle 10g引入的一种高效的数据导入导出工具,可以在不同版本的Oracle数据库之间进行数据迁移。以下是导入Oracle 9i数据到Oracle 11g的步骤: 1. 在Oracle 11g数据库中创建一个新的目录(directory),用于存放导入数据所需的DMP文件。例如: ``` CREATE DIRECTORY dpump_dir AS '/u01/app/oracle/dpump'; ``` 2. 在Oracle 11g数据库中创建一个新的数据泵(Data Pump)作业(job),用于导入数据。例如: ``` CREATE JOB imp_job DESCRIPTION 'Import data from Oracle 9i' PROGRAM 'impdp' ENABLED; ``` 3. 将Oracle 9i数据库中的DMP文件复制到Oracle 11g数据库的目录中。例如: ``` scp user@oracle9i:/u01/app/oracle/export/exp.dmp /u01/app/oracle/dpump/exp.dmp ``` 4. 在Oracle 11g数据库中运行IMPDP命令,导入数据。例如: ``` impdp user/password@oracle11g directory=dpump_dir dumpfile=exp.dmp logfile=imp.log ``` 其中,user/password是Oracle 9i数据库的用户名和密码,oracle11gOracle 11g数据库的TNS别名,dpump_dir是步骤1中创建的目录名,exp.dmp是Oracle 9i导出的DMP文件名,imp.log是导入日志文件名。 需要注意的是,导入数据时可能需要调整一些参数,例如缓冲区大小、并行度等,以便更好地适应新的数据库环境。此外,数据泵工具还提供了许多其他选项,例如在导入时可以选择只导入指定的表、分区等。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值