In my production system I was getting the disk critical alert in the response of I tried to find out which session was causing the excessive amount of redo logs correspondingly the heavily archive logs creation. I used the below query to find out the same.
set line 300 pagesize 20select s.sid, s.serial#, s.username, s.program, i.block_changes
from v$session s, v$sess_io i
where s.sid = i.sid
and
rownum < 15
order by 5 desc, 1, 2, 3, 4;
SID SERIAL# USERNAME PROGRAM BLOCK_CHANGES
---------- ---------- --------------- ------------------------------------------ -------------
11854 54279 XXX perl@xyz.com (TNS V1-V3) 110280689
1345 1 oracle@db1.xyz.com (SMON) 55428886
777 4079 ABC perl@dfe.com (TNS V1-V3) 821177
899 60423 bcfA679 perl@int.com (TNS V1-V3) 100109
1185 20245 sxf1 perl@log.com (TNS V1-V3) 28844
........
.............
select s.sid, s.serial#, s.username, s.program,
t.used_ublk, t.used_urec
from v$session s, v$transaction t
where s.taddr = t.addr
order by 5 desc, 6 desc, 1, 2, 3, 4;
SID SERIAL# USERNAME PROGRAM USED_UBLK USED_UREC
---------- ---------- -------------- -------------------------------------- ---------- ----------
118 54279 XXX perl@xyz.com (TNS V1-V3) 954335 110280689
703 9899 sdsd oracle@db1.xyz.com (TNS V1-V3) 1 17
417 5719 httpd@fcweb12.xyz.com (TNS V1-V3) 1 1
.....
.....
Thanks for your time... cheers :)
set line 300 pagesize 20select s.sid, s.serial#, s.username, s.program, i.block_changes
from v$session s, v$sess_io i
where s.sid = i.sid
and
rownum < 15
order by 5 desc, 1, 2, 3, 4;
SID SERIAL# USERNAME PROGRAM BLOCK_CHANGES
---------- ---------- --------------- ------------------------------------------ -------------
11854 54279 XXX perl@xyz.com (TNS V1-V3) 110280689
1345 1 oracle@db1.xyz.com (SMON) 55428886
777 4079 ABC perl@dfe.com (TNS V1-V3) 821177
899 60423 bcfA679 perl@int.com (TNS V1-V3) 100109
1185 20245 sxf1 perl@log.com (TNS V1-V3) 28844
........
.............
select s.sid, s.serial#, s.username, s.program,
t.used_ublk, t.used_urec
from v$session s, v$transaction t
where s.taddr = t.addr
order by 5 desc, 6 desc, 1, 2, 3, 4;
SID SERIAL# USERNAME PROGRAM USED_UBLK USED_UREC
---------- ---------- -------------- -------------------------------------- ---------- ----------
118 54279 XXX perl@xyz.com (TNS V1-V3) 954335 110280689
703 9899 sdsd oracle@db1.xyz.com (TNS V1-V3) 1 17
417 5719 httpd@fcweb12.xyz.com (TNS V1-V3) 1 1
.....
.....
Thanks for your time... cheers :)
Very nice sir...
ReplyDelete