-
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
-
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