From memory request to PL/SQL source line

Here is a little experimental script based on a great blog post by Stefan Koehler entitled Trace back to responsible SQL or PL/SQL code for a particular (PGA) memory request by intercepting process with DTrace and one of my old blog post  Geeky PL/SQL tracer/profiler : First step

And here is what it does :

TEST ENV : oracle 12.2.0.1/OEL6/UEK4 /PLSQL_CODE_TYPE=INTERPRETED/systemtap

Source PL/SQL program doing huge memory allocation :

Capture 01

Script Output : (smem_detail.sql by Tanel Poder)

Capture 02

Basically this script will help trace back the PL/SQL source line responsible for particular  memory allocation (memory leak) by specifying the memory allocation reason.

For more info please read the above blog posts 🙂

DOWNLOAD :

One thought on “From memory request to PL/SQL source line

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s