Shell script for monitoring blocking sessions

 Shell script for monitoring blocking sessions

=============================================

Below is the shell script, to be configured in crontab, which will send mail incase of blocking session observed in the database . In the mail body it will contain the blocking sessions details also. 1. Prepare the blocker.sql file.[ for blocking sessions more than 10 seconds)


set feed off

set pagesize 200

set lines 299

col event for a31

SELECT

s.inst_id,

s.blocking_session,

s.sid,

s.serial#,

s.seconds_in_wait,

s.event

FROM

gv$session s

WHERE

blocking_session IS NOT NULL and s.seconds_in_wait > 10;

 

 2. Shell script.(/home/oracle/monitor/blocker.sh ) You need to […]

Comments

Popular posts from this blog

Shell script to monitor asm diskgroup usage

Alert Log Rotation Script In Oracle

Shell Script To Monitor Lag In Standby Datbase Using Dgmgrl