Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to write a CLOB to an OS file in Oracle without using UTL_FILE package?

User_T3DXHFeb 5 2021 — edited Feb 5 2021

I have a variable xml_ which is a CLOB data type variable I use to store some XML data (dynamically created) using a PL/SQL procedure. I need to write this CLOB data into a file in my machine. The database server is not my machine.As I don't have direct access to the database server machine, so I would like to know how to write the file into a directory in my local machine without the usage of UTL_FILE package.
Is there any way to do this? I am using Oracle 11g.
I tried to store the XML data in a table with a CLOB column, but it shows <value error> when I try to see the data using PLSQL Developer. I am thinking it is because the size of the xml is too large to open from the PLSQL editor or there is something wrong with the created data. Hence I am trying to write the data to a file to check if there are some invalid characters etc.

Comments

Processing

Post Details

Added on Feb 5 2021
2 comments
1,141 views