0

I have a couple (8) clob columns I need to update on customer databases. These clobs contain XML structures for reports and they can run. The new XML structures are over 32K characters in length. The smallest is 33,786 characters.

In looking at a few questions I haven't really found an answer for what I want to do.

Update Clob column in Oracle

overcome 32k limit when inserting oracle clob IN parameter using spring StoredProcedure

string literal too long - how to assign long xml data to clob data type in oracle 11g r2

How to insert/update larger size of data in the Oracle tables?

The second and fourth questions seem to be close to an answer for me. I have also, briefly, looked into the dbms_lob package but I don't know if I can use any of those functions...

The process I need to follow: I will have all the 8 new string xml structures, and I need to create update scripts that are in sql files. These files are then inserted into the customer's db in CLOB columns. The clob is then pulled and executed in the database via execute statements.

All I have to do is make the update script for the columns. Everything else is already in place and works wonderfully. I can't change the process so that is not an option.

what is the easiest way for me to do this? Is it creating a temp LOB and filling it with the data as answered in the 2nd question? is it chunking the xml structure up somehow and appending it to a clob?

I take it I'll have to do some kind of hacky weird stuff to get this done since it doesn't look like there is a simple one line solution for me. I just need some help coming up with that hackiness...

Community
  • 1
  • 1
B-M
  • 1,231
  • 1
  • 19
  • 41

1 Answers1

0

From what I understood, you need to update big chunks of XML you have somewhere in the files (or update scripts, no matter how you will call it) into a CLOB column - is that right? If you don't need to process the XMLs anyway and just put them into the database, you can use oracle's quote operator (I can't find the oracle dos for it but here it is explained beautifully):

http://www.adp-gmbh.ch/ora/sql/q.html

Basically you just need to get the whole text XML data into the brackets as explained in the article :)

przemo_pl
  • 87
  • 1
  • 7