If V$Session's TADDR column is Null for a session, it means there is no transaction lock. Can I safely assume this session does not place a lock on any object at all?
Printable View
If V$Session's TADDR column is Null for a session, it means there is no transaction lock. Can I safely assume this session does not place a lock on any object at all?
TADDR is "Address of transaction state object" and with this column you can use to join V$TRANSACTION ADDR Column.
To find out all locked objects of Database you can use following SQL
select a.oracle_username, a.object_id, b.object_name
from v$locked_object a, dba_objects b
where a.object_id = b.object_id
Yes, if TADDR is null, it suggests there aint any objects locked by this session.Quote:
Originally posted by a128
Can I safely assume this session does not place a lock on any object at all?
Abhay.
But then, what about share locks for statements such as SELECT ...FROM...?
Is it not considered to be a 'transaction' but it still places locks on tables it's reading from?
Thanks,
"Select From Table" will not lock the table..in any mode.Quote:
Originally posted by a128
But then, what about share locks for statements such as SELECT ...FROM...?
Its only read only..where did you find the info that the statements like SELECT..From..Table.. will lock in SHARE(S) mode?
"Select..For..Update", for this u will see a value in TADDR.
Abhay.