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!

How to dump SP parameters & values ?

360862Jan 31 2003 — edited Feb 4 2003
Hi,

I wonder If there is anyway to dump Stored Procedure parameter names and their values into string, let's say for Error Logging (vs. to explicitly and manually for every routine out of tons of them append string to a variable) ?

For example function in Package :

FUNCTION CREATE_BUSINESS_KEY_FNC (
iLOC_ID IN CUSTOMER_XREF_BV.LOC_ID%TYPE,
iORDER_NO IN SERVICE_BV.LOCID_ORDER_NUM%TYPE) RETURN SERVICE_BV.LOCID_ORDER_NUM%TYPE IS

vPARAM_DUMP VARCHAR2(2000);

BEGIN

... Do Work ...

EXCEPTION

WHEN OTHERS THEN

-- Does anything else exists better then below, it's pain (what If I have 50 + params in every routine ?) --

vPARAM_DUMP := 'iLOC_ID = ' || iLOC_ID || ', iORDER_NO = ' || iORDER_NO;

ERR_LOG_HANDLER_PRC(SQLCODE, SQLERRM,
'CREATE_BUSINESS_KEY_FNC', vPARAM_DUMP);

RETURN NULL;

END CREATE_BUSINESS_KEY_FNC;

Please Help !
Thanx !
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 4 2003
Added on Jan 31 2003
4 comments
456 views