Site icon Database Tutorials

How To Access SESSION Information in Oracle from the Process ID in the Operating System

 

You can use the following script to access SQL information in Oracle from a PROCESS ID on the operating system.

 

If your Oracle database is not RAC, you can use the following query.

 

Especially when you examine the TOP SQLs, you can instantly catch the PROCESS ID over the operating system and you can quickly understand which query has the highest CPU COST.

This script was tested in 11gR1 and 11gR2. Please test the scripts on your test servers before running them in the production environment.

Exit mobile version