Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: v$sqlarea & v$session
THANKS AK! 1 select oc.sid, ss.serial#, user_name, osuser, sa.sql_text 2 from v$open_cursor oc, v$session ss, v$sqlarea sa
3 where oc.sid = ss.sid 4 and oc.address = sa.address 5 and oc.hash_value = sa.hash_value6* and buffer_gets > 100000000
SID SERIAL# USER_NAME OSUSER ---------- ---------- ------------------------------ ---------------SQL_TEXT
173 65 OPS$MISOPS misopsselect codes.dsc, codes.parm2, codes.cdlng, count(distinct batchpl.cdhid), count
341 40 DELS delsUPDATE INVLOC SET QUOTE=:b1,QLOC=:b2,VENDID=:b3 WHERE ROWID = :b4
479 931 BTAYLOR btaylorUPDATE INVLOC SET QUOTE=:b1,QLOC=:b2,VENDID=:b3 WHERE ROWID = :b4
535 230 JOSEAC joseacUPDATE INVLOC SET QUOTE=:b1,QLOC=:b2,VENDID=:b3 WHERE ROWID = :b4
563 852 MICHAELK michaelkUPDATE INVLOC SET QUOTE=:b1,QLOC=:b2,VENDID=:b3 WHERE ROWID = :b4
600 736 SBAKER sbakerUPDATE INVLOC SET QUOTE=:b1,QLOC=:b2,VENDID=:b3 WHERE ROWID = :b4
605 289 TYT tytUPDATE INVLOC SET QUOTE=:b1,QLOC=:b2,VENDID=:b3 WHERE ROWID = :b4
649 149 RICKM rickmUPDATE INVLOC SET QUOTE=:b1,QLOC=:b2,VENDID=:b3 WHERE ROWID = :b4
727 159 DREWH drewhUPDATE INVLOC SET QUOTE=:b1,QLOC=:b2,VENDID=:b3 WHERE ROWID = :b4
783 327 BTAYLOR btaylorUPDATE INVLOC SET QUOTE=:b1,QLOC=:b2,VENDID=:b3 WHERE ROWID = :b4
934 155 JCURTIS jcurtisUPDATE INVLOC SET QUOTE=:b1,QLOC=:b2,VENDID=:b3 WHERE ROWID = :b4
978 233 SBAKER sbakerUPDATE INVLOC SET QUOTE=:b1,QLOC=:b2,VENDID=:b3 WHERE ROWID = :b4
1056 196 MATTLA mattlaUPDATE INVLOC SET QUOTE=:b1,QLOC=:b2,VENDID=:b3 WHERE ROWID = :b4
1181 1303 MICHAELL michaellUPDATE INVLOC SET QUOTE=:b1,QLOC=:b2,VENDID=:b3 WHERE ROWID = :b4
1237 246 RITAK ritakUPDATE INVLOC SET QUOTE=:b1,QLOC=:b2,VENDID=:b3 WHERE ROWID = :b4
1269 1903 MICHELLY michellyUPDATE INVLOC SET QUOTE=:b1,QLOC=:b2,VENDID=:b3 WHERE ROWID = :b4
1337 67 TOMS tomsUPDATE INVLOC SET QUOTE=:b1,QLOC=:b2,VENDID=:b3 WHERE ROWID = :b4
17 rows selected.
"AK" <oramagic_at_hotmail To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> .com> cc: Sent by: Subject: Re: v$sqlarea & v$session root_at_fatcity.com 03/12/2003 10:39 AM Please respond to ORACLE-L
charlie I think sqlarea and session has no direct relationship . Same sql
can belong to many sessions and columns like users_opening, users_executing
suggests this. There should be one entry in sqlarea per hashaddress I guess
.
may user v$open_cursors to join with addess and sid .
-ak
> > I'm suffering from a senior moment. > The question is at the every bottom. > > > SQL> select sql_text from v$sqlarea sa where buffer_gets > 100000000 > > SQL_TEXT > --------------------------------------------------------------------------
> SELECT RP.RELPART FROM OERELPART RP, PARTOFFERING PO, PART P WHERE P.ID > = :p1 AN > D P.ID = RP.PART AND RP.ACTIVE = 'Y' AND CAT_PKG.CATALOG_PART(RP.RELPART) > = 'Y' > AND RP.RELPART = PO.PARTID AND PO.TYP = 'WEB' AND PO.VAL = 'MWHCOM' AND > TRUNC(NV > L(P.EFFDT,SYSDATE+1)) <= TRUNC(SYSDATE) ORDER BY 1 > > > > 1 select sql_text > 2 ,sid, username, osuser, logon_time > 3 from v$sqlarea sa > 4 , v$session ss > 5 where buffer_gets > 100000000 > 6* and sa.address = ss.saddr > SQL> / > > no rows selected > > > 1 select sql_text > 2 ,sid, username, osuser, logon_time > 3 from v$sqlarea sa > 4 , v$session ss > 5 where buffer_gets > 100000000 > 6* and sa.address = ss.paddr > SQL> / > > no rows selected > > > 1 select sql_text > 2 ,sid, username, osuser, logon_time > 3 from v$sqlarea sa > 4 , v$session ss > 5 where buffer_gets > 100000000 > 6* and sa.address = ss.sql_address > SQL> / > > no rows selected > > > 1 select sql_text > 2 --,sid, username, osuser, logon_time > 3 from v$sqlarea sa > 4 --, v$session ss > 5 where buffer_gets > 100000000 > 6* --and sa.address = ss.sql_address > SQL> / > > SQL_TEXT > --------------------------------------------------------------------------
> SELECT RP.RELPART FROM OERELPART RP, PARTOFFERING PO, PART P WHERE P.ID > = :p1 AN > D P.ID = RP.PART AND RP.ACTIVE = 'Y' AND CAT_PKG.CATALOG_PART(RP.RELPART) > = 'Y' > AND RP.RELPART = PO.PARTID AND PO.TYP = 'WEB' AND PO.VAL = 'MWHCOM' AND > TRUNC(NV > L(P.EFFDT,SYSDATE+1)) <= TRUNC(SYSDATE) ORDER BY 1 > > > mwh_at_MWH.ARES.MWH.COM> select * from v$sess_io where consistent_gets > > 10000000; > > SID BLOCK_GETS CONSISTENT_GETS PHYSICAL_READS BLOCK_CHANGES > CONSISTENT_CHANGES > ---------- ---------- --------------- -------------- ------------- > ------------------ > 173 115422 78096265 30158 74924 > 954 > 308 29739 12804854 186511 3614 > 2961 > 827 8 18906753 120904 4 > 1075 > 1034 152 37413409 195408 40 > 2913 > 1067 150 18915634 129775 20 > 976 > > So exactly how do I join V$SQLAREA to V$SESSION? > > > > -- > Please see the official ORACLE-L FAQ: http://www.orafaq.net > -- > Author: > INET: Charlie_Mengler_at_HomeDepot.com > > Fat City Network Services -- 858-538-5051 http://www.fatcity.com > San Diego, California -- Mailing list and web hosting services > --------------------------------------------------------------------- > To REMOVE yourself from this mailing list, send an E-Mail message > to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in > the message BODY, include a line containing: UNSUB ORACLE-L > (or the name of mailing list you want to be removed from). You may > also send the HELP command for other information (like subscribing). >
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: AK INET: oramagic_at_hotmail.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-LReceived on Wed Mar 12 2003 - 17:04:52 CST
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: INET: Charlie_Mengler_at_HomeDepot.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
![]() |
![]() |