SID
'ISBLOCKING' SID
----- ------------- ----------
1410
IS BLOCKING 461
451 IS BLOCKING 1078
1335 IS
BLOCKING 1582
6. ====> show the following information to the application team and he will know which user/program using
it.
set linesize 200
set pagesize 999
col
usename for a10
col state for a10
col osuser for a10
col program for
a20
col machine for a10
alter session set nls_date_format = 'dd-mm-yyyy
hh24:mi:ss';
SELECT sid,serial#, inst_id, username, state,
status, osuser, machine, program, sql_id, logon_time FROM gv$session
WHERE
suser= 'webspher' AND status = 'ACTIVE' ;
SID
INST_ID USERNAME STATE STATUS OSUSER USER#
MACHINE SCHEMA# SQL_ID LOGON_TIME
---------- ----------
---------- ------------------- -------- ---------- ---------- ----------
---------- ------------- -------------------
2161 2 PLMAPP
WAITED SHORT TIME ACTIVE webspher 294 svdg1212 294
fuf6k5qf6zxkh 01-11-2011 11:41:47
7. ====> find the session and check it can be killed or not ? confirm with Applications.
set linesize 150
set pagesize 999
SELECT sql_text FROM
v$session, v$sqltext_with_newlines
WHERE
decode(v$session.sql_hash_value, 0, prev_hash_value, sql_hash_value) =
v$sqltext_with_newlines.hash_value
AND v$session.sid = &sid
ORDER BY
piece;
Enter value for sid: 892
old 5: AND v$session.sid =
&sid
new 5: AND v$session.sid = 892
SQL_TEXT
----------------------------------------------------------------
SELECT
ERR_OID, MQ_MSGE FROM ESM_PRCS_ERR WHERE ERR_OID = :1 FOR
UPDATE NOWAIT
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22578826/viewspace-711521/ ,如需转载,请注明出处,否则将追究法律责任。