Monday, March 12, 2012

how can i know which user is locking a table

how can i know which user is locking a tablesp_who2
Roji. P. Thomas
Net Asset Management
http://toponewithties.blogspot.com
"Win" <aaa@.aaa.com> wrote in message
news:uKxIs4vpFHA.3552@.TK2MSFTNGP10.phx.gbl...
>
>|||It just show the database
I want to know which table
"Roji. P. Thomas" <thomasroji@.gmail.com> wrote in message
news:#UQ836vpFHA.2472@.tk2msftngp13.phx.gbl...
> sp_who2
> --
> Roji. P. Thomas
> Net Asset Management
> http://toponewithties.blogspot.com
>
> "Win" <aaa@.aaa.com> wrote in message
> news:uKxIs4vpFHA.3552@.TK2MSFTNGP10.phx.gbl...
>|||and then using sp_locks <spid> you could see what objects are locked.
select object_id()
"Roji. P. Thomas" wrote:

> sp_who2
> --
> Roji. P. Thomas
> Net Asset Management
> http://toponewithties.blogspot.com
>
> "Win" <aaa@.aaa.com> wrote in message
> news:uKxIs4vpFHA.3552@.TK2MSFTNGP10.phx.gbl...
>
>|||Look for the spid column in the results of the both
sp_lock and sp_who2.
Roji. P. Thomas
Net Asset Management
http://toponewithties.blogspot.com
"Win" <aaa@.aaa.com> wrote in message
news:%23KuGJ9vpFHA.2156@.TK2MSFTNGP14.phx.gbl...
> It just show the database
> I want to know which table
> "Roji. P. Thomas" <thomasroji@.gmail.com> wrote in message
> news:#UQ836vpFHA.2472@.tk2msftngp13.phx.gbl...
>

No comments:

Post a Comment