Oracle wait interface -- session
set pagesize 999
col OPNAME for a10
col TARGET for a40
alter session set nls_date_format = 'dd-mm-yyyy hh24:mi:ss';
FROM GV$SESSION_LONGOPS a
where start_time >sysdate-10/1440
ORDER BY a.inst_id,a.START_TIME asc, a.ELAPSED_SECONDS desc;
from v$session a,v$sqltext b,v$sqlarea c
where a.username is not null
--and status='ACTIVE'
--and username in ('PAMPERS')
--and sid in (11, 20, 46, 110, 127, 134, 136, 170, 243)
--and sid in (146)
--and SUSER = 'dsadm'
and a.sql_address = b.address(+)
and a.sql_address = c.address(+)
order by status,1,2,b.piece;
select sid,serial#
from v$session
where sid=(select sid
from v$lock
where id1= (select object_id
from user_objects
where object_name='TMP_REP_5'));
alter system kill session 'sid,serial#';
commit;
where l1.block =1 and l2.request > 0 and l1.id1=l2.id1 and l1.id2=l2.id2;
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部落格 ” ,連結:http://blog.itpub.net/22578826/viewspace-711521/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle, History and the Wait InterfaceOracleAI
- Oracle Wait Interface解釋OracleAI
- Oracle V$SESSION_WAITOracleSessionAI
- Oracle wait interface - ORA-00054: resource busyOracleAI
- [摘錄]Oracle Wait Interface之Buffer busy waits事件OracleAI事件
- Oracle10g New Feature -- 11. Wait InterfaceOracleAI
- Oracle等待檢視v$session_waitOracleSessionAI
- Oracle Wait Interface效能診斷與調整實踐指南OracleAI
- True Session Wait Activity in Oracle 10g[zt]SessionAIOracle 10g
- V$SESSION_WAITSessionAI
- (轉):學習Oracle動態效能表-(9)-V$SESSION_WAIT,V$SESSION_EVENTOracleSessionAI
- 10.25 V$SESSION_WAITSessionAI
- Wait event:read by other sessionAISession
- stored procedure 收集session wait 資訊SessionAI
- v$session_wait 相關SessionAI
- v$session_wait和v$session_event檢視SessionAI
- session檢視中wait_timeSessionAI
- 10.27 V$SESSION_WAIT_HISTORYSessionAI
- stored procedure 收集session wait 資訊(轉)SessionAI
- v session_wait v session_event v system_eventSessionAI
- v$session_event , v$system_event , v$session_waitSessionAI
- oracle wait!OracleAI
- 10.26 V$SESSION_WAIT_CLASSSessionAI
- OWI --用 stored procedure 收集session wait 資訊SessionAI
- Oracle動態效能檢視學習筆記(10)_v$session_waitOracle筆記SessionAI
- v$session_wait_session的等待情況及熱點塊SessionAI
- Oracle Payment Interface安裝Oracle
- Oracle Applications Interface ProgramsOracleAPP
- 【Oracle九大效能檢視】之5.v$session_wait_session的等待情況及熱點塊OracleSessionAI
- oracle等待引數含義_v$session_wait_p1_p2_p3OracleSessionAI
- ORACLE SQL DEVELOPER User Interface ChangeOracleSQLDeveloper
- V$SESSION.STATUS='ACTIVE' AND WAIT_EVENT='Idle'SessionAI
- 關於v$session_wait 表的運用SessionAI
- Oracle RAC Wait EventsOracleAI
- 幾個重要檢視(V$SYSTEM_EVENT V$SESSION_EVENT V$SESSION_WAIT)SessionAI
- 動態檢視學習之v$session_waitSessionAI
- 查詢等待事件(wait event)相關的SQL - v$session_wait, v$rowcache,v$sqltext事件AISQLSession
- Oracle session traceOracleSession