Results 1 to 5 of 5

Thread: Oracle Logs

  1. #1
    Join Date
    Jul 2003
    Location
    US
    Posts
    314

    Arrow Unanswered: Oracle Logs

    Hi
    I am using Oracle for backend, and doing all the insertions, updation through my application (JSP + Servlets + Perl).

    I was wondering that is it possible to access the queries that were run through the JSP. Does Oracle maintaing any logs in this regards.

    I would appreciate if someone could help me in this regards.
    Thanx and Regards
    Aruneesh

  2. #2
    Join Date
    Apr 2001
    Location
    Netherlands
    Posts
    191
    The recent queries can be found in V$SQLAREA
    Ruud Schilders
    -----------------
    Oracle DBA
    e-mail : ruud@schilders.it
    URL : www.schilders.it
    Twitter : www.twitter.com/ruudschilders

  3. #3
    Join Date
    Jul 2003
    Posts
    4

    Re: Oracle Logs

    Originally posted by aruneeshsalhotr
    Hi
    I am using Oracle for backend, and doing all the insertions, updation through my application (JSP + Servlets + Perl).

    I was wondering that is it possible to access the queries that were run through the JSP. Does Oracle maintaing any logs in this regards.

    I would appreciate if someone could help me in this regards.
    Thanx and Regards
    Aruneesh

    set lines 132
    column program format a35
    column username format a12

    select p.pid, s.SQL_ADDRESS, p.spid "Thread"
    , s.username "User Name"
    , decode(nvl(p.background,0),
    1,bg.description ,s.program ) "Program"
    , ss.value/100 "CPU"
    , physical_reads "Disk I/O"
    from v$process p
    , v$session s
    , v$sesstat ss
    , v$sess_io si
    , v$bgprocess bg
    where s.paddr = p.addr
    and ss.sid = s.sid
    and ss.statistic# = 12
    and si.sid = s.sid
    and bg.paddr(+) = p.addr
    order by ss.value desc
    /
    select SQL_TEXT from v$sqlarea where ADDRESS = '&sql_addrerss_from_first_query'
    /

  4. #4
    Join Date
    Jul 2003
    Location
    US
    Posts
    314

    v$sqlarea

    Hi Ruudboy
    I dont seem to see the table/view by the name of v$sqlarea.
    Do i need some priviledge for doing so.
    I connect as normal and go see the v$sqlarea.

    Any thoughts.
    Thanx and Regards
    Aruneesh

    Originally posted by Ruudboy
    The recent queries can be found in V$SQLAREA

  5. #5
    Join Date
    Jul 2003
    Posts
    4
    You should connect as "sys" user to the oracle database.

    Then copy run the script from sqlplus.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •