What if we don't know the package that is getting called
Sam, April 07, 2017 - 6:19 am UTC
Hi Connor,
Thank you for your response.
We don't have control over the code, so I can go for option 2.
The problem we are facing is that we don't know which package / procedure is getting called during the Save operation.
So I won't be able to compile the package/procedure in debug code.
The ultimate objective is to find out the package name which is getting called during Save operation.
Thanks,
Sam
Is it possible to trace the package getting called during save operation
A reader, April 07, 2017 - 8:23 am UTC
We can only go for plsql trace since we don't know the code getting fired during save operation.
So, since we can't compile the package in debug mode, what are my options to trace the package/procedure getting called?
To "A reader" : yes you can...
J. Laurindo Chiappa, April 07, 2017 - 2:23 pm UTC
Well, for starting nothing stops you from compile in debug mode ANY PL/SQL, if you have access to the owner OR if you have admin rights/ANY privs in the database - just for security obviously you would do it in the HOMOLOGATION environment, using a COPY of the application, not directly in PROD : basic rule in Development...
If you donĀ“t know the name / the list of all procedures being called by this "SAVE" routine (not a faintest idea about what it can be, but matters not), an option could be star SQL TRACE (event 10046) in the session execution the "SAVE" routine - with this, the list of executed procedures will appear in the trace file in the form :
...
=====================
PARSING IN CURSOR #xxx len=51 dep=0 uid=180 oct=47 lid=180 tim=11746424051712 hv=2083693016 ad='27ecb338'
BEGIN nameoftheproceduret(arguments); END;
END OF STMT
PARSE #18:c=0,e=3072,p=0,cr=0,cu=0,mis=1,r=0,dep=0,og=1,tim=11746424051712
=====================
...
With this, you get the names of them and could compile all of them in DEBUG mode, and later debug them with SQL Developer, TOAD or whatever tool you want to use....
Best regards,
J. Laurindo Chiappa
P.S. : of course, the trace 10046 per se will give to you performance measures for ALL the SQL executed in the session being traced - if this is useful to you, use this information, too...