Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

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

I have a variable xml_ which is a CLOB data type variable I use to store some XML data using a PL/SQL procedure dynamically. I need to write this CLOB data into a file in my machine. The database server is not my machine. Is there any way to do this? I am using Oracle 11g.

I am using the procedure given as an answer in another question, but it uses UTL_FILE package , and as I don't have direct access to the database server machine, I would like to know how to write the file into a directory in my local machine instead.

Edit: I am creating the xml dynamically. I tried to store the data in a table with a CLOB column, but it shows 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.

Edit2: I got this resolved via Oracle SQL Developer. The CLOB data was over 2 GB, Oracle SQL Developer showed me the column data, hence I was able to export it into a file in my client machine itself.

question from:https://stackoverflow.com/questions/66059592/how-to-write-a-clob-to-an-os-file-in-oracle-without-using-utl-file-package

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...