RE: GTT Locks

  • From: Ravi Kulkarni <kulkarni.ravi@xxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 02 Mar 2004 18:37:44 -0600

Sorry .. I should have mentioned. I am on 9204(solaris8).
Is this a "New Feature" of 92 then ?



-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx]On Behalf Of Connor McDonald
Sent: Tuesday, March 02, 2004 6:28 PM
To: oracle-l@xxxxxxxxxxxxx
Subject: Re: GTT Locks


I don't observe your results on a system here (8174) - the entry appears in 
v$locked_object.

SQL> insert into GTT values (1);

1 row created.

SQL> select object_name, object_type, a.object_id, b.locked_mode from 
dba_objects a,
  2  v$locked_object b where a.object_id=b.object_id;

OBJECT_NAME                              OBJECT_TYPE         OBJECT_ID 
LOCKED_MODE
---------------------------------------- ------------------ ---------- 
-----------
GTT                                      TABLE                  102302          
 3

hth
connor

 --- Ravi Kulkarni <kulkarni.ravi@xxxxxxx> wrote: > Trying to understand the 
locking behavior of
GTTs (Global Temporary Tables) :
> (GTT_T is a GTT. T is a regular table)
> 
> SQL> insert into gtt_t values (1000);
> 1 row created.
> 
> SQL> select object_name, object_type, a.object_id, b.locked_mode from 
> dba_objects a,
> v$locked_object b where a.object_id=b.object_id;
> no rows selected
> 
> SQL> insert into gtt_t select *from T;
> 1 row created.
> 
> SQL> select object_name, object_type, a.object_id, b.locked_mode from 
> dba_objects a,
> v$locked_object b where a.object_id=b.object_id;
> 
> OBJECT_NAME   OBJECT_TYPE    OBJECT_ID     OBJECT_ID LOCKED_MODE
> ----------------------------------------------------------------
> GTT_T        TABLE           204835       204835     3
> 
> 
> The user acquires a lock on the GTT for performing DML ONLY when selecting 
> from a Non-GTT. 
> 1. How is this different from the first insert on GTT? (In either case, I 
> noticed a 'TO'
> lock-type in v$lock)
> 2. Where can I find more info on GTT-peculiarities ? 
> 
> TIA,
> Ravi.
> 
> ----------------------------------------------------------------
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> ----------------------------------------------------------------
> To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
> put 'unsubscribe' in the subject line.
> --
> Archives are at //www.freelists.org/archives/oracle-l/
> FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
> ----------------------------------------------------------------- 

=====
Connor McDonald
Co-author: "Mastering Oracle PL/SQL - Practical Solutions" - available now
web: http://www.oracledba.co.uk
web: http://www.oaktable.net
email: connor_mcdonald@xxxxxxxxx

"GIVE a man a fish and he will eat for a day. But TEACH him how to fish, 
and...he will sit in a boat and drink beer all day"


        
        
                
___________________________________________________________
Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now 
http://uk.messenger.yahoo.com/download/index.html
----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

----------------------------------------------------------------
Please see the official ORACLE-L FAQ: http://www.orafaq.com
----------------------------------------------------------------
To unsubscribe send email to:  oracle-l-request@xxxxxxxxxxxxx
put 'unsubscribe' in the subject line.
--
Archives are at //www.freelists.org/archives/oracle-l/
FAQ is at //www.freelists.org/help/fom-serve/cache/1.html
-----------------------------------------------------------------

Other related posts: