Oracle PL/SQL UTL_FILE.PUT缓冲 [英] Oracle PL/SQL UTL_FILE.PUT buffering

查看:116
本文介绍了Oracle PL/SQL UTL_FILE.PUT缓冲的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在从Oracle存储过程中写入一个大于7MB的大文件,并且要求每个记录的末尾必须没有行终止符(没有回车/换行).

I'm writing a large file > 7MB from an Oracle stored procedure and the requirements are to have no line termination characters (no carriage return/line feed) at the end of each record.

我已经使用UTL_FILE.PUT编写了一个存储过程,并且正在跟踪每次使用UTL_FILE.FFLUSH调用UTL_FILE.PUT的过程.尽管我正在执行FFLUSH调用,但是一旦达到了超出缓冲区大小(设置为最大32767)的值,此过程就会出现写入错误.如果我将PUT调用替换为PUT_LINE调用,则该过程将正常进行.

I've written a stored procedure using UTL_FILE.PUT and I'm following each call to UTL_FILE.PUT with a UTL_FILE.FFLUSH. This procedure errors with a write error once I get to the point where I've written more than the buffer size (set to max 32767) although I'm making the FFLUSH calls. The procedure works fine if I replace the PUT calls with PUT_LINE calls.

是否可以在没有换行符的情况下写入超出缓冲区大小的内容?如果是这样,是否有解决方法?

Is it not possible to write more than the buffer size without a newline character? If so, is there a work around?

推荐答案

从文档中删除引用,请参见Ollie的答案

执行此操作的另一种可能方法是Java存储过程,您可以在其中使用功能更全的Java API来创建和写入文件.

Another possible way to do this is a Java stored procedure, where you can use the more full-featured Java API for creating and writing to files.

这篇关于Oracle PL/SQL UTL_FILE.PUT缓冲的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆