Direct SGA access without SQL for Oracle RDBMS
Neil C
A light weight command line interface which enables you to:
- List all sessions
- Retrive detailed wait event metadata
- Set a listener to only report when a certian wait event has been triggered.
This is all done in real time directly from memory which means zero load within the database.
Any Linux distro upto kernel v4.1 running Oracle versions >= 12.1.0.1
Running "report SID" you can get more detailed metrics:
- To run initdsma.bsh you need to be able to connect to Oracle DB with SYSDBA privileges
- The environment can be configured by running ". oraenv"
- You only need to re-run initdsm2.bsh to recompile dsm2 after the database is bounced/restarted
- DBNAME implies the INSTANCE_NAME of the Container DB.
- From 12.2 onwards, by default only the Oracle software owner can connect to the SGA mapped file
- You can set a "listen" on any wait event found by querying:
select NAME from v$event_name;
- extract dsm2
$> gunzip dsm2-*.zip
- Set the permission of compile_dsm2.bsh
$> chmod 775 compile_dsm2.bsh
- Run compile_dsm2.bsh for a given database
$> ./compile_dsm2.bsh -d <DBNAME>
This will compile an executable named: dsm2.<DBNAME>
- Run dsm2 for a given database, our example uses a DB called "orc"
$> ./dsm2.orc
dsm2:>
- Show help
dsm2:> help
- Show ALL sessions
dsm2:> show
- Show detailed stats for a given session
dsm2:> report <SID>
- Set listener to report only for a specifc wait event
dsm2:> listen "buffer busy waits"
Dsm2 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Dsm2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with dsm2. If not, see http://www.gnu.org/licenses/.