Help - Search - Members - Calendar
Full Version: inactive sessions in database
Oracle DBA Forums > Oracle > Oracle Forum
In our databace there are around 300 sessions were in inactive state.

Database is not releas the sessions. How to fix it
"In our databace there are around 300 sessions were in inactive state."

They don't have to be active to stay connected. What of these 3900 people are all out to lunch, or at a meeting?

Use a v$session script to walk back and see.

If you don't want to write your own download the Oracle scripts:

If you KNOW that you want them to disconnect after beconing idle, nuke them with the "idle time" option:

If you think they are zombies you can kill then with "aslter system kill session"

You can also have a sniped session:

select s.status, count(1), s.username from v$process p, v$session s
where paddr(+)=addr
group by s.status, s.username
order by 1;

-------- ---------- ------------------------------
ACTIVE            1 SYS
ACTIVE           16
INACTIVE          2 SYS
SNIPED            1 USR

And some you kill from the OS, using the PID:

1 - Gather session information from Oracle

2 - Kill the session at the OS-level

3 - Kill the session within Oracle using the "alter system kill session" command:

a) UNIX - I always locate the Server PID (SPID) from v$process and issue the UNIX kill -9 command.

cool.gif The Windows command to kill this session would be as follows.

C:\oracle9i\bin>orakill ORCL92 768
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.