How to Find Memory Leaks in PL/SQL code

651 Views Asked by At

I'm in Software Configuration Management Team. I'm so curious to find Memory leaks in PL/SQL. Do we have any specific tools?.or any other method to find this. If so, i can put it in the process of after checkin and intimate to users on the memory leaks.

Thanks !

1

There are 1 best solutions below

1
On BEST ANSWER

v$sessmetric is a quick way to see what resources each session is using - cpu, physical_reads, logical_reads, pga_memory, etc.

The below query will give what object the session is using:

SELECT v$sessmetric.*, sql_text, sql_fulltext
  FROM v$sessmetric
       LEFT OUTER JOIN (SELECT *
                          FROM v$sql
                         WHERE users_executing > 0) queries_running
          ON v$sessmetric.session_id = queries_running.parsing_schema_id;