I started a new role recently and wondered if DBCC CHECKDB was run on a regular basis? Thankfully, it runs weekly and I found out by using DBCC PAGE.
I was playing about this weekend and trying to use the DBCC PAGE command and stumbled across a function which was certainly new to me which could tell me on which page my data is stored.
sys.fn_PhysLocFormatter (%%physloc%%) as PhysicalRID,
ISNULL(MiddleName,'') as MiddleName,
order by LastName, FirstName, MiddleName
We’ve all used DBCC SHRINKFILE or DBCC SHRINKDATABASE, right? It’s a really usefull tool. However, I stumbled across a blog by Paul Randall and learnt something new. The shrink process can fragment your indexes!