不同版本间的数据库导入导出

    今天终于把不同版本间的数据库导入导出的问题搞清楚了,先前把自己绕进去了,呵呵。一直没搞清楚这个问题,从2个客户端,2个服务器,2个版本的dmp文件的角度来分析,排列组合也有2*2*2=8种了,真正把这8种情况做完试验以后,其实就是两个规则:

规则1.   低版本的exp/imp客户端可以连接到高版本(或同版本)的数据库服务器,但高版本的exp/imp客户端不能连接到低版本的数据库服务器。
规则2.   高版本exp出的dmp文件,低版本无法imp(无法识别dmp文件)

有了这两个规则,8种试验结果就变得很简单了。
排除9iclient to 9iserver, 10gclient to 10gserver.两种可能,剩下有6种可能
a. 9iclient + 9i dmp    => 10g server           yes 
b.10client + 9i dmp    =>    9i server           no(违反规则1)
c.10client + 9i dmp    => 10g server           yes
d. 9iclient + 10g dmp =>    9i server          no(违反规则2)
e. 9iclient + 10g dmp => 10g server         no(违反规则2)
f. 10client + 10g dmp =>    9i server          no(违反规则1)
附加:g:9i客户端 exp 10g dmp文件      yes
            h:10g客户端 exp 9i dmp文件      no(违反规则1)

详细试验情况如下:9i数据库@test_9i   10g数据库@test_10g
a. 9iclient + 9i dmp    => 10g server           yes 
C:\Documents and Settings\wgzx1>imp ecc_view10/ecc@nfdb file=c:\9i.dmp fromuser=
ecc_view9 touser=ecc_view10
Import: Release 9.2.0.1.0 - Production on 星期四 2月 26 10:16:28 2009
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options
经由常规路径导出由EXPORT:V09.02.00创建的文件
警告: 此对象由 ECC_VIEW9 导出, 而不是当前用户
已经完成ZHS16GBK字符集和AL16UTF16 NCHAR 字符集中的导入
. . 正在导入表                         "TEST1"      14113行被导入
成功终止导入,但出现警告。

b.10client + 9i dmp    =>    9i server           no(违反规则1)
[oracle@ntkdb ~]$ imp ecc_view9/ecc@testdb
file=./9i.dmp full=y
Import: Release 10.2.0.1.0 - Production on 星期四 2月 26 09:52:15 2009
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
IMP-00058: ORACLE error 6550 encountered
ORA-06550: 第 1 行, 第 33 列:
PLS-00302: 必须说明 'SET_NO_OUTLINES' 组件
ORA-06550: 第 1 行, 第 7 列:
PL/SQL: Statement ignored
IMP-00000: Import terminated unsuccessfully

c.10client + 9i dmp    => 10g server           yes
[oracle@ntkdb ~]$ imp ecc_view10/ecc@nfdb
file=./9i.dmp full=y
Import: Release 10.2.0.1.0 - Production on 星期四 2月 26 09:57:58 2009
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V09.02.00 via conventional path
Warning: the objects were exported by ECC_VIEW9, not by you
import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
. importing ECC_VIEW9's objects into ECC_VIEW10
. importing ECC_VIEW9's objects into ECC_VIEW10
. . importing table                        "TEST1"      14113 rows imported
Import terminated successfully without warnings.

d. 9iclient + 10g dmp =>    9i server          no(违反规则2)
C:\Documents and Settings\wgzx1>imp ecc_view9/ecc@testdb
file=c:\10g.dmp full=y
Import: Release 9.2.0.1.0 - Production on 星期四 2月 26 10:51:59 2009
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
连接到: Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
IMP-00010: 不是有效的导出文件,标题验证失败
IMP-00000: 未成功终止导入

e. 9iclient + 10g dmp => 10g server         no(违反规则2)
C:\Documents and Settings\wgzx1>imp ecc_view10/ecc@nfdb file=c:\10g.dmp full=y
Import: Release 9.2.0.1.0 - Production on 星期四 2月 26 10:53:18 2009
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options
IMP-00010: 不是有效的导出文件,标题验证失败
IMP-00000: 未成功终止导入

f. 10client + 10g dmp =>    9i server          no(违反规则1)
[oracle@ntkdb ~]$ imp ecc_view9/ecc@testdb
file=./10g.dmp full=y
Import: Release 10.2.0.1.0 - Production on 星期四 2月 26 10:25:20 2009
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
IMP-00058: ORACLE error 6550 encountered
ORA-06550: 第 1 行, 第 33 列:
PLS-00302: 必须说明 'SET_NO_OUTLINES' 组件
ORA-06550: 第 1 行, 第 7 列:
PL/SQL: Statement ignored
IMP-00000: Import terminated unsuccessfully

g:9i客户端 exp 10g dmp文件      yes
C:\Documents and Settings\wgzx1>exp ecc_view10/ecc@nfdb
file=c:\10g2.dmp tables=test1
Export: Release 9.2.0.1.0 - Production on 星期四 2月 26 11:52:03 2009
Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.
连接到: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production With the Partitioning, OLAP and Data Mining options
已导出 ZHS16GBK 字符集和 AL16UTF16 NCHAR 字符集
即将导出指定的表通过常规路径 ...
. . 正在导出表                           TEST1      42329 行被导出
在没有警告的情况下成功终止导出。

h:10g客户端 exp 9i dmp文件      no(违反规则1)
[oracle@ntkdb ~]$ exp ecc_view9/ecc@testdb
file=./9i2.dmp tables=test1
Export: Release 10.2.0.1.0 - Production on 星期四 2月 26 11:16:48 2009
Copyright (c) 1982, 2005, Oracle.  All rights reserved.
EXP-00056: ORACLE error 6550 encountered
ORA-06550: 第 1 行, 第 41 列:
PLS-00302: 必须说明 'SET_NO_OUTLINES' 组件
ORA-06550: 第 1 行, 第 15 列:
PL/SQL: Statement ignored
EXP-00000: Export terminated unsuccessfully

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9252210/viewspace-557898/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/9252210/viewspace-557898/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值