V$SQLAREA : Interpretation
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: V$SQLAREA : Interpretation

  1. #1
    Join Date
    Sep 2000
    Posts
    64
    Hello,

    Suppose that you have a procedure with many SQL orders (select, update, insert...).
    I am wondering if :

    * A single line will be created in V$SQLAREA,

    Or

    * We could have many lines (related to individual SQL orders in the procedure).

    Thanks for the reply.

    Sofiane
    Sofiane

  2. #2
    Join Date
    Feb 2000
    Location
    Brisbane, Australia
    Posts
    46

    V$SQLAREA

    Sofiane,

    Every time a statement is executed it is moved into the SQL area and can be seen in the V$SQLAREA table. You can determine which statement a session, say session 10, is currently running by:
    select sql_text
    from v$sqlareaa,
    v$session s
    where a.address = s.sql_address
    and a.hash_value = s.sql_hash_value
    and s.sid = 10;

    This displays the current statement and as each statement is executed you will see it using this statement. After a statement has been executed it remains in the v$sqlarea table until it is aged out. However, there is no way to associate it with a particular database session.

    Hope this helps
    Gerry

Posting Permissions

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


Click Here to Expand Forum to Full Width