Re: Users with same name

From: <michel.lalonde_at_sit.ulaval.ca>
Date: 1996/12/11
Message-ID: <32AEC6C6.2044_at_sit.ulaval.ca>#1/1


tsmail_at_public.bta.net.cn wrote:
>
> We are developing an application using Oracle and, for some reason, all
> the developers have to use the same Oracle username, just like
> "developer". During the process of coding, we often get some trouble from
> deadlock and need to kill the session that holds the lock. When we use
> the Session Monitor in SQL*DBA we find all the usernames to be the same,
> so although we know which client PC is the locker, we don't know which
> session is the relative one.
> Is there any way that can distinguish the client PCs with the same Oracle
> username? We have Oracle V7.2 and the environment of client PC is
> Windows3.1.
>
> Thanks in Advance.
>
> Frank Feng
> -------------------==== Posted via Deja News ====-----------------------
> http://www.dejanews.com/ Search, Read, Post to Usenet

Try this script in SQL*Plus

col s format a1
col session format a10
col username format a15
select vl.sid||','||vs.serial# "SESSION", substr(vs.status,1,1) s,vs.username,
vs.lockwait,vl.type,vl.id1,vl.id2
from sys.v_$lock vl, sys.v_$session vs
where
 (vs.username <> 'SYS' or vs.lockwait is not null)  and vl.sid = vs.sid
order by vl.id1,vl.id2
;

The sessions locked are the ones having the same id1, id2. The session holding the lock is the one not having the lockwait indicator.

Just kill that session.

Michel Lalonde. Received on Wed Dec 11 1996 - 00:00:00 CET

Original text of this message