Many people after some years with Oracle software may come up with Direct SGA Access project and presentation of Kyle Hailey discussing how to do direct SGA access in C. This following material of Miladin Modrakovic also helps understanding.
Why might we need this one, may be the first question coming into mind; let’s think of a bad work day now, you as a dba of a production system found out that you can not access to your database from any oracle utility even it is opened and startup doesn’t change anything. Let’s say Oracle support also advices you to use your backups, nothing to do for this hang situation after some dump analysis. But your recently backup media is broken or lost somehow, so what now..
After 10g Oracle Enterprise Manager gets the data about system hangs using the same method. When you enable the SGA direct attach, Oracle uses a single SQL collector per instance and this collector starts automatically along with Enterprise Manager.
Also this technique may be useful in tuning areas to access oracle statistics without impacting the Oracle kernel. It could also be a technique for accessing data from a running database for other security related purposes or just to do some reverse engineering to understand internals.
Refences Used :
Memory Access Mode of EM
Oracle Insights: Tales of the Oak Table – Chapter 6: Direct Memory Access, by Kyle Hailey
Oracle Wait Interface: A Practical Guide to Performance Diagnostics & Tuning (Osborne ORACLE Press Series) (Paperback) – Appendix D – Direct SGA Access
Another similar example, on security
Direct SGA Access for Hung/Slow Systems by Arup Nanda
Hung But Not Paralyzed: Memory-Attached SGA Query by Arup Nanda