Thursday, December 4, 2008

V$ACCESS

V$ACCESS displays information about locks that are currently imposed on library cache objects. The locks are imposed to ensure that they are not aged out of the library cache while they are required for SQL execution.

Column

Datatype

Description

SID

NUMBER

Session number that is accessing an object

OWNER

VARCHAR2(64)

Owner of the object

OBJECT

VARCHAR2(1000)

Name of the object

TYPE

VARCHAR2(24)

Type identifier for the object

Note:

1. Use the following script (Metalink note 1020010.6) to report the SQL text of some of the locks currently being held in the database.

select s.username username,  
       a.sid sid,  
       a.owner||'.'||a.object object,  
       s.lockwait,  
       t.sql_text SQL 
from   v$sqltext t,  
       v$session s,  
       v$access a 
where  t.address=s.sql_address  
and    t.hash_value=s.sql_hash_value  
and    s.sid = a.sid  
and    a.owner != 'SYS' 
and    upper(substr(a.object,1,2)) != 'V$';

Oracle data dictionary views

Oracle dynamic performance views

No comments:

Post a Comment