cancel
Showing results for 
Search instead for 
Did you mean: 

What is the parameter "oid" in sp_list_mutexes_semaphores?

Breck_Carter
Participant
0 Kudos
1,631

It doesn't appear to be LockObjectOID or mutex_semaphore_id; those return zero rows.

ALTER PROCEDURE "dbo"."sp_list_mutexes_semaphores"( 
  in "oid" unsigned bigint default null ) 
result( 
  "mutex_semaphore_id" unsigned integer,
  "creator" varchar(128),
  "name" varchar(128),
  "type" char(9),
  "is_temp" char(1),
  "is_dropped" char(1),
  "start_with" unsigned integer,
  "current_count" unsigned integer,
  "currently_owned_by" long varchar,
  "currently_waited_for" long varchar ) 
sql security invoker
internal name 'sp_list_mutexes_semaphores'

SELECT Number, Name, BlockedOn, LockRowID, LockIndexId, LockTable, LockObject, LockObjectType,
       CONNECTION_PROPERTY ( 'LockObjectOID', Number ) AS LockObjectOID,
       CONNECTION_PROPERTY ( 'LockObjectType', Number ) AS LockObjectType
  FROM sa_conn_info()
 ORDER BY Number;
SELECT * FROM sp_list_mutexes_semaphores();
SELECT * FROM sp_list_mutexes_semaphores ( 3764 );
SELECT * FROM sp_list_mutexes_semaphores ( 2 );

     Number Name                             BlockedOn            LockRowID LockIndexId LockTable                      LockObject                     LockObjectType                 LockObjectOID                  LockObjectType                 
          1 consumer-1                               0                    0      (NULL)                                dba.test_semaphore             33                             3764                           33                             
          2 consumer-2                               0                    0      (NULL)                                dba.test_semaphore             33                             3764                           33                             
          3 producer                                 0                    0      (NULL)                                                               0                              0                              0                              
          4 SQL Central 1                            0                    0      (NULL)                                                               0                              0                              0                              
          5 Foxhound-Monitor-9384                    0                    0      (NULL)                                                               0                              0                              0                              
(5 rows)

mutex_semaphore_id creator                        name                           type      is_temp is_dropped start_with current_count currently_owned_by             currently_waited_for           
                 2 dba                            test_semaphore                 SEMAPHORE N       N                   0             0 (NULL)                         2,1                            
(1 rows)

mutex_semaphore_id creator                        name                           type      is_temp is_dropped start_with current_count currently_owned_by             currently_waited_for           
(0 rows)

mutex_semaphore_id creator                        name                           type      is_temp is_dropped start_with current_count currently_owned_by             currently_waited_for           
(0 rows)

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member

oid is a shortcut for getting information about a single temporary mutex/semaphore, for use by system procedures. It is not intended for general use.