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!

calling a procedure with a CLOB input parameter

badri97566Sep 23 2010 — edited Sep 23 2010
All,

I trying to execute a simple stored procedure that can accept the text of another stored procedure as an input argument. The text of the stored procedure could exceed size allowable under plsql varachar2, so I typed this as a clob..

Problem is the system hangs when I call this stored procedure. I am able to use varchar2 for the input code.. and this works, but using clob just causes the client (sqlplus, sqlDeveloper) to hang..

Database version 10.2.0.4

Any assistance would be greatly appreciated.. I suspect an Oracle bug but I could use some guidance before I hit up support..

thanks Badri..

DECLARE
PROC_NAME VARCHAR2(200);
INPUT_CODE CLOB;
RESULT VARCHAR2(200);
BEGIN
PROC_NAME := 'TESTHANG';
INPUT_CODE := '(input IN VARCHAR2)' || CHR(9) || ' AS BEGIN NULL;' || CHR(9) || 'END;'

FWK_CREATE_PROCEDURE(
PROC_NAME => PROC_NAME,
INPUT_CODE => INPUT_CODE,
RESULT => RESULT
);
DBMS_OUTPUT.PUT_LINE('RESULT = ' || RESULT);
END;

create or replace PROCEDURE FWK_CREATE_PROCEDURE
(proc_name IN VARCHAR2,
input_code IN CLOB,
result OUT NOCOPY VARCHAR2)
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 21 2010
Added on Sep 23 2010
4 comments
6,315 views