on 08-24-2016 6:26 PM
Version : 16
Executing update statistics through store proc . How to find on which table update statistics is running .
dbcc sqltext shows Proc_name .
sp_lock shows Sh_intent on ops..sysstatistics .
How to find on which table Update Statistics is running ..
Example :
create proc sp_test1
as
update index statistics XXX
go
excec sp_test1
go
From Other Session ..
dbcc sqltext(SPID) ---> Shows sp_test1
sp_lock <SPID>,@verbose=1
fid spid loid locktype partitionid page row objectName id class context
------ ------ ----------- --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ----------- ----------- ------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ----------- ------------------------------ ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
0 318 636 Sh_intent 0 0 0 ops..sysstatistics 24 Non Cursor Lock
These tables are data row (DOL) locking tables .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.