Oracle PL/SQL UTL_FILE.PUT buffering

后端 未结 4 1912
没有蜡笔的小新
没有蜡笔的小新 2021-01-02 22:28

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

4条回答
  •  渐次进展
    2021-01-02 22:36

    Although it is less than desirable, you could always PUT until you have detected that you are nearing the buffer size. When this occurs, you can FCLOSE the file handle (flushing the buffer) and re-open that same file with FOPEN using 'a' (append) as the mode. Again, this technique should generally be avoided, especially if other processes are also trying to access the file (for example: closing a file usually revokes any locks the process had placed upon it, freeing up any other processes that were trying to acquire a lock).

提交回复
热议问题