eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« 2015 DTCC: 后IOE时代 Oracle将何去何从? | Blog首页 | 异彩纷呈 - Oracle RWP China 性能之旅中国行 »

Oracle 的 enq: TT - contention 等待事件
modb.pro

在遇到 TT 锁等待时,你可能会被Oracle的文档所困扰。即便是在Oracle Database 12c的文档中,关于TT锁的描述也是:Temporary table enqueue。

这其实已经不准确了,从数据库中可以得到更详细和准确的描述,V$LOCK_TYPE中有着准确记录:

SQL> set serveroutput on
SQL> exec print_table('select * from v$lock_type where type=''TT''');
TYPE                          : TT
NAME                          : Tablespace
ID1_TAG                       : tablespace ID
ID2_TAG                       : operation
IS_USER                       : NO
DESCRIPTION                   : Serializes DDL operations on tablespaces
-----------------

PL/SQL procedure successfully completed.

在Oracle 8i之后,这个事件代表的是表空间事务,用于防范死锁,TT - Tablespace Transaction。其两个核心参数: ID1 代表表空间号,ID2 代表操作类型。

操作类型代码的主要解释为:

0- is used to avoid the deadlock occurred between drop tablespace and create rollback segment
1- using in a given tablespace create data files In a serialized
2- is used to avoid TSPITR tablespace point in in time recovery during other types of operation
4- is used to create tablespace to block the tablespace ID
8- is used to avoid deadlock in ALTER during TABLESPACE
16- is the 16 hexadecimal 0 × 10, used to synchronize the allocation and recovery disc area, allocation and deallocation of extents.
32+ With the increase in 32+ data file add datafile and create a table space, where ID2 is 32 (decimal) + relative file number relative file number

参考链接:http://www.programering.com/a/MTMxMjNwATc.html


历史上的今天...
    >> 2012-05-07文章:
    >> 2009-05-07文章:
    >> 2008-05-07文章:
    >> 2006-05-07文章:
           繁华,不过是一掬细沙
           节日过后 几点关注
    >> 2005-05-07文章:
           Google的新玩具:Webaccelerator
           2005.05.03司马台之行

By eygle on 2015-05-07 12:20 | Comments (0) | FAQ | 3168 |


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com