Home » RDBMS Server » Server Administration » to kill the session (oracle-9i)
to kill the session [message #290042] Thu, 27 December 2007 04:00 Go to next message
ishika_20
Messages: 339
Registered: December 2006
Location: delhi
Senior Member
hello sir,

can u tell me how to know which system got hanged.

i run the syntax....

SELECT * FROM V$SESSION WHERE USERNAME LIKE 'INVENT'

please advice me how to do ....
how to know which system got hanged ?

Regards
Re: to kill the session [message #290044 is a reply to message #290042] Thu, 27 December 2007 04:07 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
First check with v$lock and dba_blockers if someone is blocked by a lock.
Then search in v$session who are active since a long time (status and last_call_et columns) and if they are blocking (blocking% columns)

Regards
Michel
Re: to kill the session [message #290046 is a reply to message #290042] Thu, 27 December 2007 04:12 Go to previous messageGo to next message
trantuananh24hg
Messages: 668
Registered: January 2007
Location: Ha Noi, Viet Nam
Senior Member
This can not caused your DB hang!
The query only return these columns SADDR, SID, SERIAL#, MACHINE, OSUSER... which username get by 'INVENT' value. And for a long time, I have not ever known about the data dictionary can caused DB hang till now.

Re: to kill the session [message #290063 is a reply to message #290044] Thu, 27 December 2007 05:12 Go to previous messageGo to next message
ishika_20
Messages: 339
Registered: December 2006
Location: delhi
Senior Member
sir
i have seen the output of v$lock, there's no block's value comes '0'. while running v$session status come inactive and there is some value on last_call_et columns.

noe tell me what to do ?

waiting for ur reply
Re: to kill the session [message #290064 is a reply to message #290063] Thu, 27 December 2007 05:14 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If all sessions are inactive then the database is not hanged it has nothing to do.

Regards
Michel
Re: to kill the session [message #290065 is a reply to message #290063] Thu, 27 December 2007 05:14 Go to previous message
babuknb
Messages: 1734
Registered: December 2005
Location: NJ
Senior Member

column blocker format a25
column blockee format a25
column sid_serial format a10
select 
 (select username || ' - ' || osuser from v$session where sid=a.sid) blocker,
 a.sid || ', ' || 
 (select serial# from v$session where sid=a.sid) sid_serial, 
 ' is blocking ',
 (select username || ' - ' || osuser from v$session where sid=b.sid) blockee,
 b.sid || ', ' || 
 (select serial# from v$session where sid=b.sid) sid_serial
 from v$lock a, v$lock b
 where a.block = 1
   and b.request > 0
   and a.id1 = b.id1
   and a.id2 = b.id2
/


Babu
Previous Topic: Permission is available but not workings ....?
Next Topic: ADDM finding
Goto Forum:
  


Current Time: Sun Dec 04 20:47:30 CST 2016

Total time taken to generate the page: 0.11046 seconds