现在我们将两张LOB的演示表, 用AUL 4.0.0 Beta恢复成DMP格式, 然后看看能不能成功导入到数据库中:
AUL> set clob_edian big
Current CLOB_EDIAN is : BIG
AUL> set lob_convert 1
Current LOB_CONVERT is : 1-GBK
AUL> set charset 852
Current CHARSET is : 0x0354
AUL> set output_style dmp
Current OUTPUT_STYLE is : DMP
AUL> unload table anysql.t_clobdemo to t_clobdemo.dmp;
2006-12-17 22:27:40
Unload OBJD=9956 FILE=4 BLOCK=4611 CLUSTER=0 ...
2006-12-17 22:27:40
AUL> unload table anysql.t_blobdemo to t_blobdemo.dmp;
2006-12-17 22:27:46
Unload OBJD=9966 FILE=4 BLOCK=4859 CLUSTER=0 ...
2006-12-17 22:27:46
现在导入T_CLOBDEMO表:
C:\MYDUL>imp system/oracle file=t_clobdemo.dmp fromuser=mydul touser=anysql ignore=y
Import: Release 10.2.0.1.0 - Production on Sun Dec 17 22:28:33 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V08.01.07 via conventional path
Warning: the objects were exported by MYDUL, not by you
import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
. importing MYDUL's objects into ANYSQL
. . importing table "T_CLOBDEMO" 2 rows imported
Import terminated successfully without warnings.
从SQL*Plus中查一下CLOB字段的长度, 和以前的两条记录是否一致:
SQL> select dbms_lob.getlength(Clob2) len2,
2 dbms_lob.getlength(Clob3) len3 from t_Clobdemo;
LEN2 LEN3
---------- ----------
63681 63681
63681 63681
63681 63681
63681 63681
现在导入T_BLOBDEMO表:
C:\MYDUL>imp system/oracle file=t_blobdemo.dmp fromuser=mydul touser=anysql ignore=y
Import: Release 10.2.0.1.0 - Production on Sun Dec 17 22:28:54 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Export file created by EXPORT:V08.01.07 via conventional path
Warning: the objects were exported by MYDUL, not by you
import done in ZHS16GBK character set and AL16UTF16 NCHAR character set
. importing MYDUL's objects into ANYSQL
. . importing table "T_BLOBDEMO" 2 rows imported
Import terminated successfully without warnings.
从SQL*Plus中查一下CLOB字段的长度, 和以前的两条记录是否一致:
SQL> select dbms_lob.getlength(blob2) len2,
2 dbms_lob.getlength(blob3) len3 from t_blobdemo;
LEN2 LEN3
---------- ----------
252443 252443
252443 252443
252443 252443
252443 252443
看来这次有希望完全支持LOB类型了, 你有兴趣的话, 可以试试!