dbms_lob.append raising error. [message #601702] |
Sun, 24 November 2013 11:48 |
Jothish
Messages: 22 Registered: February 2009 Location: Chennai
|
Junior Member |
|
|
I am using dbms_lob.append and appending the lob content to the clob variable in the function , it is throwing "ORA-22920 row containing the LOB value is not locked". note that i am not going to update the clob column , just i am getting the clob value and appending that to local variable in that functtion and it return the clob content to the front end. if i use FOR UPDATE it will solve, but i dnt want to use because i am not updating any content in the clob content in the table .... please suggest me if any alternative solution to get rid of from this error..
|
|
|
|
Re: dbms_lob.append raising error. [message #603032 is a reply to message #601704] |
Wed, 11 December 2013 02:19 |
Jothish
Messages: 22 Registered: February 2009 Location: Chennai
|
Junior Member |
|
|
When i try to execute the function below raises "ORA-22920 row containing the LOB value is not locked"
note: clob_table has 3 rows but first two rows has null values, but third row contains clob content raises when it try to call the procedure clob_add
(only at the 3 record).
I am not going to update any clob content to the clob_table suggest selecting and will be returned to the function
clob_table has the value:
id clob_text
--------------
1
2
3 </empid>
function clob_data return clob is
clob_dest clob;
begin
for i in 1..(select clob_text from clob_table where id=1) /*retrive 3 rows*/
loop
CLOB_ADD(clob_dest,i.clob_text);
end loop;
return clob_dest;
exception when others then
dbms_output.put_line('Error: '||sqlcode||'--'||sqlerrm);
end;
PROCEDURE CLOB_ADD(
destCLOB IN OUT CLOB,
addCLOB IN CLOB)
IS
BEGIN
IF addCLOB is not null THEN
IF destCLOB is null THEN
destCLOB := addCLOB;
ELSE
dbms_lob.append( destCLOB, addCLOB );
END IF;
END IF;
END;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: dbms_lob.append raising error. [message #603109 is a reply to message #603102] |
Wed, 11 December 2013 08:23 |
Solomon Yakobson
Messages: 3273 Registered: January 2010 Location: Connecticut, USA
|
Senior Member |
|
|
Jothish wrote on Wed, 11 December 2013 08:43Y i need to use FOR Update clause. Since i am not going to update the clob content or not going to manipulate with that content in the table clob_table.
And how do we know that? You posted function clob_data which is obviously not a working function. What is this:
for i in 1..(select clob_text from clob_table where id=1) /*retrive 3 rows*/
And Michel asked you at least twice to post (cut & paste) SQL*Plus (or whatever tool you are using) snippet showing your code execution along with all errors.
SY.
|
|
|