retrieving long raw data into clob variable

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-07 00:33:26

The LONG and LONG RAW data types have been deprecated in favour of CLOB and BLOB since Oracle 8.0 (i.e almost fifteen years ago). The primary reason for this switch is that LONG columns are really hard to work with, and that goes double for LONG RAW.

As you have already discovered, there is a limit to what we can do in PL/SQL. That limit is 32K. Larger LONG RAW columns can only be handled in C.


Tom Kyte used to host a utility for unloading Long Raw columns to a flat file, which could then be loaded to modern LOB columns through SQL Loader. This utlity appears to be unavailable (it's not on the list of /~tkyte files on his blog).

However, Fangxin Lou has written a version of another Tom Kyte utility, which he's called ociuldr and which apparently handles Long Raw. You can download the source from his web site. Find out more.

NB I have not tried ociuldr for myself (I haven't come across a Long Raw since the last millennium), and I'm not vouchsafing it in any way whatsoever. But it seems to be the only solution the internet offers right now. So I suggest you try it, unless you have good OCI skills and can write your own implementation.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!