Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> V$Session and V$SQL revisited...
Hi all,
After doing some research I found that Views V_$Session hold an SID of an application and V_$SQL holds SQL_Text of SQL activities. I created a select based on these views and then joined these Tables on the column HASH_VALUE.
SELECT
VSS.SID, VSS."SERIAL#", VSS.PROGRAM, VSQL.SQL_TEXT,
VSQL.LAST_LOAD_TIME
FROM
SYS.V_$SESSION VSS, SYS."V_$SQL VSQL
WHERE
VSS.SQL_HASH_VALUE = VSQL.HASH_VALUE AND
VSS.SID=<nn>
At first it looked alright but then I realized that somehow I was missing SQL_Text based on the selected SID and the Relation. Q1: What is the relationship between V_$Session and V_$SQL and how can I join these two views correctly?
Any comments appreciated
Tom Received on Thu Jul 11 2002 - 03:28:55 CDT
![]() |
![]() |