sp_familylock

Description

Reports information about all the locks held by a family (coordinating process and its worker processes) executing a statement in parallel.

Syntax

sp_familylock [fpid1 [, fpid2]]

Parameters

fpid1

is the family identifier for a family of worker processes from the master.dbo.sysprocesses table. Run sp_who or sp_lock to get the spid of the parent process.

fpid2

is the Adaptive Server process ID number for another lock.

Examples

Example 1

Displays information about the locks held by all members of the family with an fid of 5:

sp_familylock 5
fid spid locktype      table_id page dbname class           context
--- ---- ----------    --------- ---- ------ -------------  -----------------------
5   5    Sh_intent     176003658 0    userdb Non cursor lock Sync-pt duration request
5   5    Sh_intent-blk 208003772 0    userdb Non cursor lock Sync-pt duration request
5   6    Sh_page       208003772 3972 userdb Non cursor lock Sync-pt duration request
5   7    Sh_page       208003772 3973 userdb Non cursor lock Sync-pt duration request
5   8    Sh_page       208003772 3973 userdb Non cursor lock Sync-pt duration request

Usage

Permissions

Any user can execute sp_familylock.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

Event

Audit option

Command or access audited

Information in extrainfo

38

exec_procedure

Execution of a procedure

  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

See also

Commands kill, select

System procedures sp_lock, sp_who