ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【DOC】VIEW: "V$LOCK" Reference Note

【DOC】VIEW: "V$LOCK" Reference Note

原创 Linux操作系统 作者:viadeazhu 时间:2009-10-19 16:36:42 0 删除 编辑

Subject: VIEW: "V$LOCK" Reference Note
  Doc ID: 29787.1 Type: REFERENCE
  Modified Date: 11-NOV-2002 Status: PUBLISHED

"V$LOCK" Reference Note

  • The information here contains the view description from the Oracle9i documentation along with any additional Support / Historical Notes related to this view.
  • Earlier versions of Oracle may not include all columns.

Oracle9i Information


Support and Historical Notes for "V$LOCK"

  View Definition:
    Use the following SQL to see the view definition of the related GV$ view:

      SELECT view_definition FROM v$fixed_view_definition
       WHERE view_name='GV$LOCK';

  Useful Join Columns:
    SID    - Join to  . SID


  Support Notes:
    The meaning of ID1 and ID2 depend on the lock TYPE.

    ---------------------------------------------------------------------------
    Most Common Lock Types:
    ---------------------------------------------------------------------------
      TYPE  Name			ID1                    	ID2
      ~~~~  ~~~~			~~~                    	~~~
      TX    Transaction		Decimal RBS & slot	Decimal WRAP number
                    		(0xRRRRSSSS  RRRR = RBS number, SSSS = slot )
    	A TX lock is requested in eXclusive mode if we are waiting on a ROW. 
	A SHARE mode request implies we are waiting some other resource held
    	by the TX (Eg: waiting for an ITL entry)
    
      TM	Table Locks		Object id of table. 	Always 0.
    
      TS	Temp Segment		TS#			Relative DBA
    
      ST	Space Transaction	Only ONE enqueue.
      UL   	User Locks	
    
    ---------------------------------------------------------------------------
    Lock Conversion Summary
    ---------------------------------------------------------------------------
 		                   <--------------- REQUEST ----------------->
      LMODE  Description    Name   NULL    SS      SX      S       SSX     X
      ~~~~~  ~~~~~~~~~~~    ~~~~~  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       0,1   No Lock 	     NULL  YES     YES     YES     YES     YES     YES
       2     Row-Share 	       SS  YES     YES     YES     YES     YES     no
       3     Row-Exclusive     SX  YES     YES     YES     no      no      no
       4     Share 	        S  YES     YES     no      YES     no      no
       5     Share Row-Excl   SSX  YES     YES     no      no      no      no
       6     Exclusive 	        X  YES     no      no      no      no      no
    ---------------------------------------------------------------------------
                                     DML Table Lock Mode
                                     Yes     Yes     No      No      ROW-LOCKING
     Operation       Table Access    No      Yes     No      Yes     SERIALIZABLE
     -------------- --------------- ------- ------- ------- -------
     Select            Read            NULL    S       NULL    S
     Select For Update Row-Read        SS      S       SS      S
     Insert            Row-Write       SX      SX      SSX     SSX
     Update            Read-Row-Write  SX      SSX     SSX     SSX
     Delete            Read-Row-Write  SX      SSX     SSX     SSX
     Lock For Update   Row-Read        SS      S       SS      S
 
     Lock Share                        S       S       S       S
     Lock Exclusive                    X       X       X       X
     
     Lock Row Share                    SS      SS      SS      SS
     Lock Row Exclusive                SX      SX      SX      SX
     Lock Share Row    Exclusive       SSX     SSX     SSX     SSX
     
     Alter             Write           X       X       X       X
     Drop              Write           X       X       X       X
     Create Index                      S       S       S       S
     Drop Index        Write           X       X       X       X
     ---------------------------------------------------------------


  Known Issues:


  Articles:
.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15415488/viewspace-616895/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-08-22

  • 博文量
    79
  • 访问量
    392359