Skip to Main Content
  • Questions
  • Selecting Clob field from a remote table using dblink in Oracle 12c

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Samuel.

Asked: April 22, 2016 - 6:51 pm UTC

Last updated: April 24, 2016 - 6:05 am UTC

Version: 12c

Viewed 10K+ times! This question is

You Asked

Hi Tom,

Recently we updated from Oracle 11g to Oracle 12c. After the update we've been having problems with CLOB fields. When we are trying to SELECT a CLOB field from a table in the remote DB inside a procedure it throws an error:

ORA-06000: internal error code, arguments: [kpdb-bad-pdb],[29293],[3],[],[],[],[],[],[],[],[],[]
ORA-06512: at "SYS.DBMS_LOB", line 1092.

We had the same problem when we were using 11g but we were able to overcome that problem using the following workaround:
dbms_lob.substr( ( select DESCRLONG from dual ), 4000, 1 )

DESCRLONG is the CLOB field in the remote db table.

We tried the same trick in 12c but it throws an error. I would really appreciate it if you could provide me with a solution.

Thanks and regards,
Sam



and Connor said...

Any ora-600 should be sent to Support,because thats the only way we can fix the bug.

In the meantime, try the following workarounds:

https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:950029833940

https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:52297289480186

https://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:696224943687

In particular, the use of a global temporary table can be made very efficient in 12c with temporary undo enabled.

Hope this helps.

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

CLOB/BLOB/etc

Complete documentation on Securefiles and Large Objects here