4 Replies Latest reply: Aug 2, 2007 3:54 AM by 510293 RSS

    "ctime" and "block" column in V$LOCK!!

    510293
      Hi. all.

      What does "block" column in V$LOCK mean?
      The following is from manual.
      "A value of either 0 or 1, depending on whether or not the lock in question
      is the blocker"

      However, V$LOCK.block in my db is all "2".

      As far as I konw, if request = 0 , this is lock holder, if request > 0, this is lock waiter.

      One more question!!

      What is the time unit of ctime column in V$LOCK?
      For example, "594873" for ctime means what seconds?

      Thanks and Regards.
        • 1. Re: "ctime" and "block" column in V$LOCK!!
          damorgan
          I have requested a clarification on this value's meaning.

          Please run the following:

          SELECT inst_id, type, lmode, block
          FROM gv$lock;

          I'll see what I can find out.
          • 2. Re: "ctime" and "block" column in V$LOCK!!
            510293
            Thanks for your reply.

            SELECT inst_id, type, lmode, block
            FROM gv$lock

            The result is as followings.

            INST_ID     TYPE     LMODE     BLOCK
            1     PS     4     2
            1     PS     4     2
            1     PS     4     2
            1     XR     1     2
            1     TS     3     2
            1     RS     2     2
            1     CF     2     2
            1     XR     1     2
            1     RT     6     2
            1     RT     6     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     MR     4     2
            1     RT     6     2
            1     DM     4     2
            2     PS     4     2
            2     XR     1     2
            2     TS     3     2
            2     RS     2     2
            2     CF     2     2
            2     XR     1     2
            2     RT     6     2
            2     RT     6     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     MR     4     2
            2     DM     4     2
            2     RT     6     2
            • 3. Re: "ctime" and "block" column in V$LOCK!!
              436423
              Hi,

              You have multiple instances - you're running RAC. Block is always 2 in RAC it means 'potential locking conflict'.

              And ctime is in seconds, it's the time elapsed since this lock was converted to the current mode - basically how long this lock has been like this.

              HTH

              Chris
              • 4. Re: "ctime" and "block" column in V$LOCK!!
                510293
                Dear Chris.

                Thanks for your reply.
                Have a good night.

                Best Regards.