联系:手机/微信(+86 17813235971) QQ(107644445)
标题:Oracle dul支持Oracle 12.2(12c)
作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]
随着oracle 12.2正式版的临近,通过最新版dul(Data UnLoader: 11.2.0.1.1)的测试,发现对于12c的版本支持依旧有问题,虽然作者在版本中较为明确的表示了支持12c但是测试效果不尽人意.
dul 11对oracle 12c的支持(Compatible参数表明支持12c)
[oracle@localhost dul]$ ./dul Data UnLoader: 11.2.0.1.1 - Internal Only - on Tue Feb 21 23:39:08 2017 with 64-bit io functions and the decompression option Copyright (c) 1994 2016 Bernard van Duijnen All rights reserved. Strictly Oracle Internal Use Only Within one week you will need a more recent DUL version for this os DUL: Warning: Compatible is set to 11 Values can be 6|7|8|9|10|11|12
在12.2的版本中运行dul结果如下
[oracle@xifenfei ~]$ ss SQL*Plus: Release 12.2.0.1.0 Production on Tue Feb 21 23:54:43 2017 Copyright (c) 1982, 2016, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> set lines 150 SQL> select * from v$version; BANNER CON_ID -------------------------------------------------------------------------------- ---------- Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production 0 PL/SQL Release 12.2.0.1.0 - Production 0 CORE 12.2.0.1.0 Production 0 TNS for Linux: Version 12.2.0.1.0 - Production 0 NLSRTL Version 12.2.0.1.0 - Production 0 [root@xifenfei dul]# ./dul Data UnLoader: 11.2.0.1.1 - Internal Only - on Tue Feb 21 23:53:37 2017 with 64-bit io functions and the decompression option Copyright (c) 1994 2016 Bernard van Duijnen All rights reserved. Strictly Oracle Internal Use Only Within one week you will need a more recent DUL version for this os Found db_id = 766547632 Found db_name = ORCL12C DUL> bootstrap; Probing file = 1, block = 520 . unloading table BOOTSTRAP$ DUL: Warning: block number is non zero but marked deferred trying to process it anyhow DUL: Warning: Recreating file "BOOTSTRAP.ctl" 60 rows unloaded Reading BOOTSTRAP.dat 60 entries loaded Parsing Bootstrap$ contents DUL: Warning: Recreating file "dict.ddl" Generating dict.ddl for version 12 OBJ$: segobjno 18, file 1 block 240 TAB$: segobjno 2, tabno 1, file 1 block 144 COL$: segobjno 2, tabno 5, file 1 block 144 USER$: segobjno 10, tabno 1, file 1 block 208 Running generated file "@dict.ddl" to unload the dictionary tables . unloading table OBJ$ DUL: Warning: Recreating file "OBJ.ctl" 72655 rows unloaded . unloading table TAB$ DUL: Warning: Recreating file "TAB.ctl" 2162 rows unloaded . unloading table COL$ DUL: Warning: Recreating file "COL.ctl" 114785 rows unloaded . unloading table USER$ DUL: Warning: Recreating file "USER.ctl" 130 rows unloaded Reading USER.dat 130 entries loaded Reading OBJ.dat DUL: FATAL Error: File OBJ.dat, line 22079: identifier too long
这个报错DUL: FATAL Error: File OBJ.dat比较明显由于dul在加载obj$对象的时候有对象字符太长导致加载失败
这个是由于在oracle 12c中已经允许对象名/列名程度为128,而不是以前版本的30,从而引起了这个问题,虽然dul的作者已经在dict.ddl中做了限制,但是目前看尚未生效
特殊处理后的dul可以完美支持12c
[root@xifenfei dul]# ./dul Data UnLoader: 11.2.0.1.1 - Internal Only - on Wed Feb 22 00:04:40 2017 with 64-bit io functions and the decompression option Copyright (c) 1994 2016 Bernard van Duijnen All rights reserved. Strictly Oracle Internal Use Only Within one week you will need a more recent DUL version for this os Found db_id = 766547632 Found db_name = ORCL12C DUL> bootstrap; Probing file = 1, block = 520 . unloading table BOOTSTRAP$ DUL: Warning: block number is non zero but marked deferred trying to process it anyhow DUL: Warning: Recreating file "BOOTSTRAP.ctl" 60 rows unloaded Reading BOOTSTRAP.dat 60 entries loaded Parsing Bootstrap$ contents DUL: Warning: Recreating file "dict.ddl" Generating dict.ddl for version 12 OBJ$: segobjno 18, file 1 block 240 TAB$: segobjno 2, tabno 1, file 1 block 144 COL$: segobjno 2, tabno 5, file 1 block 144 USER$: segobjno 10, tabno 1, file 1 block 208 Running generated file "@dict.ddl" to unload the dictionary tables . unloading table OBJ$ DUL: Warning: Recreating file "OBJ.ctl" 72655 rows unloaded . unloading table TAB$ DUL: Warning: Recreating file "TAB.ctl" 2162 rows unloaded . unloading table COL$ DUL: Warning: Recreating file "COL.ctl" 114785 rows unloaded . unloading table USER$ DUL: Warning: Recreating file "USER.ctl" 130 rows unloaded Reading USER.dat 130 entries loaded Reading OBJ.dat 72655 entries loaded and sorted 72655 entries Reading TAB.dat 2162 entries loaded Reading COL.dat 114785 entries loaded and sorted 114785 entries DUL> unload table sys.undo$; . unloading table UNDO$ 21 rows unloaded DUL> exit Life is DUL without it
这里是通过特殊处理之后dul才能够支持12c版本,期待作者在后续版本中完善相关工作,在恢复的经验中dul还是一大利器.