Database Reference
In-Depth Information
The following shows how these locks would appear in the V$LOCK table:
EODA@ORA12CR1> create table t1 ( x int );
Table created.
EODA@ORA12CR1> create table t2 ( x int );
Table created.
EODA@ORA12CR1> insert into t1 values ( 1 );
1 row created.
EODA@ORA12CR1> insert into t2 values ( 1 );
1 row created.
EODA@ORA12CR1> select (select username
2 from v$session
3 where sid = v$lock.sid) username,
4 sid,
5 id1,
6 id2,
7 lmode,
8 request, block, v$lock.type
9 from v$lock
10 where sid = sys_context('userenv','sid');
USERNAME SID ID1 ID2 LMODE REQUEST BLOCK TY
--------------- ---------- ---------- ---------- ---------- ---------- ---------- --
EODA 22 133 0 4 0 0 AE
EODA 22 244271 0 3 0 0 TM
EODA 22 244270 0 3 0 0 TM
EODA 22 1966095 152 6 0 0 TX
EODA@ORA12CR1> select object_name, object_id
2 from user_objects
3 where object_id in (244271,244270);
OBJECT_NAM OBJECT_ID
---------- ----------
T2 244271
T1 244270
the AE lock is an edition lock, available in oracle 11 g and above. it is part of the edition Based redefinition
feature (not covered in this particular book). ID1 is the object id of the edition that SID is using currently. this edition lock
protects the referenced edition from modification (dropping of the edition, for example) in much the same way the TM
locks protect the tables they point to from structural modification.
Note
 
 
Search WWH ::




Custom Search