????4.???????????PID????5182???????????????????????V$PROCESS?????V$SESSION?????V$SQLTEST?????????????????????????е?SQL??????????????“????”????????????PID??:
SQL>SELECT /*+ ORDERED */
sql_text
FROM v$sqltext a
WHERE (a.hash_value?? a.address) IN
(SELECT DECODE(sql_hash_value?? 0?? prev_hash_value?? sql_hash_value)??
DECODE(sql_hash_value?? 0?? prev_sql_addr?? sql_address)
FROM v$session b
WHERE b.paddr =
(SELECT addr FROM v$process c WHERE c.spid = '&pid'))
ORDER BY piece ASC;
/
?????????????????
Enter value for pid: 5182
old   9:  (SELECT addr FROM v$process c WHERE c.spid = '&pid'))
new   9:  (SELECT addr FROM v$process c WHERE c.spid = '5182'))
SQL_TEXT
----------------------------------------------------------------
declare v1  number; begin for n in 1..100 loop for k in 1..100 l
oop select count(*) into v1 from t1; end loop; dbms_lock.sleep(1
); end loop; end;
????????????????????3???????????????????????е?SQL??????????????
????1?????????????PID?????PID????process id???????TOP?????п?????PID.
????2?????PID??v$process.spid?????????????process??????????
????3?????v$process.addr??v$session.paddr?????????????session?????????????
????4??????v$sqltest??????????session??????е?SQL???
???????
????1.?????????????????????TOP?????PID.
????2.??????3????????????????????????CPU????????????????????????????????SQL????????????????
????dbms_system??????????????????AWR?????SQL????м?????????SQL????м???????????????