FInd Session Detail ( PID, SID, Serial# )
Login as sysdba with sqlplus "/ as sysdba
Cek the Proces SID
sql> select
* from v$access where object='AR'; => cek SIDsql> select sid, serial#, osuser from v$session where SID=x; x=> base on SID above,
Killing session
or
sql> ALTER SYSTEM DISCONNECT SESSION 'sid,serial#' POST_TRANSACTION;
or
sql> ALTER SYSTEM DISCONNECT SESSION 'sid,serial#' IMMEDIATE;
Select Active Session
sql>
select username, osuser, machine, event, module, state, status from v$session
where type !='BACKGROUND' and status='ACTIVE';
Check the Operating System PID
sql> select
P.spid "OS Thread", S.username "Name-User", S.osuser,
S.programfrom V$PROCESS P, V$SESSION S
where P.addr = S.paddr
and S.SID in (
'25',
'32',
'94',
'95',
'102',
'106',
'107',
'108',
'111',
'112',
'113',
'138');
Check Status, SID, serial base on the machine which run the process
sql> select
status,username,machine,sid,serial# from v$session where machine='crmis01' and username is not
null;
Try this
SET LINESIZE 100
COLUMN spid FORMAT A10
COLUMN username FORMAT A10
COLUMN program FORMAT A45
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
WHERE s.type != 'BACKGR2OUND';
or this
SET LINESIZE 100
COLUMN spid FORMAT A10
COLUMN username FORMAT A10
COLUMN program FORMAT A45
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
WHERE s.sid='27' or s.sid='32';
COLUMN spid FORMAT A10
COLUMN username FORMAT A10
COLUMN program FORMAT A45
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
WHERE s.type != 'BACKGR2OUND';
or this
SET LINESIZE 100
COLUMN spid FORMAT A10
COLUMN username FORMAT A10
COLUMN program FORMAT A45
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
WHERE s.sid='27' or s.sid='32';
or this
sql>select
sid, serial#, osuser, program from v$session
where PROGRAM='recorddispatcher@fmspapp2 (TNS V1-V3)';
where PROGRAM='recorddispatcher@fmspapp2 (TNS V1-V3)';
Enjoy Sharing..
No comments:
Post a Comment