1

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 !

John
  • 15
  • 2
  • PL/SQL is a fairly high-level language that does not give developers much control over its internal garbage collection, so I'm not sure what type of code constructions you have in mind. Perhaps a global collection populated by a `bulk collect` with no `limit`, but even that might be reasonable depending on the size of the tables queried. What problems are you seeing? – William Robertson Aug 04 '16 at 12:20

1 Answers1

2

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;
XING
  • 9,608
  • 4
  • 22
  • 38
  • Thank U. For doing this we need to launch the app right ? I was trying to check for each file (package) that was checked-in in our Source code tool (Say SVN or Clearcase). – John Aug 04 '16 at 11:01