Tuesday, May 6, 2008

Turn on debug mode for a module by using DBMS_SQL within a PL/SQL Program


CREATE OR REPLACE PROCEDURE debugpkg (name IN VARCHAR2)
IS
cur INTEGER := DBMS_SQL.OPEN_CURSOR;
abc INTEGER;
BEGIN
DBMS_SQL.PARSE (cur,
'ALTER PACKAGE ' || name || ' COMPILE DEBUG',
DBMS_SQL.NATIVE);

abc := DBMS_SQL.EXECUTE (cur);

DBMS_SQL.CLOSE_CURSOR (cur);
END;
/

No comments: