Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

killed session exist in V$sessions but not exist in V$process

Sergey KlimovSep 6 2016 — edited Sep 7 2016

Hi,

I see the killed  sessions in

SQL> select SID from v$session where username='MyUser' and status='KILLED';

       SID

----------

      1580

      1599

  3 rows selected.

But I can't to find spid of those sessions to kill them from OS:

SQL> select USERNAME from v$process where username='MyUser';

no rows selected

or,

SELECT --s.inst_id,

       s.sid,

       s.serial#,

       p.spid,

       s.username,

       s.program

FROM   gv$session s

       JOIN gv$process p ON p.addr = s.paddr AND p.inst_id = s.inst_id and s.username='MyUser'

WHERE  s.type != 'BACKGROUND';

no rows selected

this query give the empty space under the PID for MyUser:

COLUMN sid              format 9999     heading "SID"

COLUMN spid             format 9999     heading "PID"

COLUMN username         format a30      heading "User Name"

COLUMN osuser           format a30      heading "OS User"

SET FEEDBACK OFF VERIFY OFF

SET lines 132 pages 59

TTITLE left _date center 'Oracle System Users' skip 2

SELECT a.sid, b.spid, a.username, a.osuser

  FROM v$session a, v$process b

WHERE a.paddr = b.addr(+)

/

How can I to clear those session from database?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 5 2016
Added on Sep 6 2016
13 comments
10,426 views