How do i know which process using my particular table ?

  • Hi,

    I have a one major table in my database. And number of process using this table.

    How do i knwo which process (spid) is using this table.

    Thank you,

    Regards,

  • Try this:

    select *

    from sys.dm_tran_locks

    where resource_database_id = db_id()

    and resource_type = 'OBJECT'

    and resource_associated_entity_id = object_id('MyTable')

    -- Gianluca Sartori

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply