Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When debugging a package procedure in PL/SQL developer, how do you set a CLOB in parameter value?

I'm debugging an Oracle package using PL/SQL developer, but I'm running into a problem - one of the parameters is a CLOB (it's a big ass XML string). I can pass it in from the application side and have it be a CLOB, but in the PL/SQL debugger, I put the string representation of the XML into the debugger so the proc in the package treats it as a CLOB? As it stands, when set it, then step into the package, the parameter evaluates to NULL, but the string is fine.

This is the debug setup window

like image 957
aape Avatar asked Oct 29 '11 17:10

aape


People also ask

How do I debug a PL SQL package?

In Database Explorer, right-click the package you want to compile, click Compile, and then select Compile Dependants for Debugging to load debugging information for the objects on which the selected object is dependent. In the compiling window that opens, the object you want to compile is selected by default.

How do I set debug points in SQL Developer?

SQL Developer's default “debug” action is to run until a breakpoint occurs. You can change this by going to Tools > Preferences, and clicking Debugger. Change the option that says “Start Debugging Option” to Step Into. This will allow you to click Debug and run to the first line of code.


1 Answers

you can always use the pl/sql block that is invoking the SP. In this case deselect the corresponding checkbox to the CLOB parameter, then replace the calling statement with this:

declare
    myClob1 clob := to_clob('your data');
begin
    searchtrackingpolicies_split(callerid => :callerid,
                                 xmlcriteria => myClob1,
                                 xmlsearchresults => :xmlsearchresults);
);
end;

notice that the colon before myClob1 were removed.

like image 182
davidmontoyago Avatar answered Sep 29 '22 07:09

davidmontoyago