Saturday, January 25, 2014

SQL server: Deciphering Wait resource

http://www.practicalsqldba.com/2012/04/sql-server-deciphering-wait-resource.html


SELECT 
 o.name AS TableName
i.name AS IndexName,
SCHEMA_NAME(o.schema_idAS SchemaName
FROM sys.partitions p JOIN sys.objects o ON p.OBJECT_ID o.OBJECT_ID 
JOIN sys.indexes i ON p.OBJECT_ID i.OBJECT_ID  AND p.index_id i.index_id 
WHERE p.hobt_id 72057594040811520


SELECT DB_NAME(68)
Select the database based on the output above statement. Then execute the below statement
DBCC traceon (3604)
GO
DBCC page (681492478) --Database_id,file_id,page_id 

No comments: