Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

lock escalation count since when

Posted on 2017-11-14
3
Low Priority
?
32 Views
Last Modified: 2017-11-16
Hi,

I have a question that below query show the lock escalation count. That count is since when? Is it
- since database created?
- since database server restarted?


SELECT
db_name(dios.database_id) AS database_name,
object_name(dios.object_id, dios.database_id) AS
object_name,
i.name as index_name,
dios.partition_number,
dios.index_lock_promotion_attempt_count,
dios.index_lock_promotion_count,
(cast(dios.index_lock_promotion_count AS real) /
dios.index_lock_promotion_attempt_count) AS
percent_success
FROM
sys.dm_db_index_operational_stats(db_id(), null,
null, null) dios
INNER JOIN
sys.indexes i
on dios.object_id = i.object_id
and dios.index_id = i.index_id
WHERE dios.index_lock_promotion_count > 0
ORDER BY index_lock_promotion_count desc;
0
Comment
Question by:baberamin
  • 2
3 Comments
 
LVL 49

Expert Comment

by:PortletPaul
ID: 42368370
sys.dm_db_index_operational_stats (Transact-SQL)
How the Counters in the Metadata Cache Are Reset
and the cumulative counts may reflect activity since the instance of SQL Server was last started.
1
 

Author Comment

by:baberamin
ID: 42369953
can you please explain in few words for me?
0
 
LVL 49

Accepted Solution

by:
PortletPaul earned 1000 total points
ID: 42370201
That count is since database server restarted.

Nothing more to explain. The documentation is quite clear.
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Join & Write a Comment

Backups and Disaster RecoveryIn this post, we’ll look at strategies for backups and disaster recovery.
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

782 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question