We here at MidnightDBA have many many thoughts and opinions, and many many means to release them into the wild. We use these means liberally to spread goodwill, cheer, silliness, ire, critique, righteous fury, and whatever else we choose. Over the years, we’ve gotten several versions of one particular message: “You can’t say that!” Here, […]
Category: sql server
Use Powershell to find and punish – er, delete – rogue files
I like to know what’s on the drives that are supposed to be dedicated to data and log files. So I run a quick check of sys.master_files: SELECT LEFT(physical_name, 1) as Drive, SUM(size)*8/1024 as SizeMb FROM sys.master_files GROUP BY LEFT(physical_name, 1) ORDER BY Drive; And then I compare the numbers I got back against what Windows says. […]
Invitation to T-SQL Tuesday #040: File and Filegroup Wisdom
Hello and welcome to the third T-SQL Tuesday of 2013! Over three years ago, Adam Machanic (Twitter) dreamed up the idea of T-SQL Tuesday: Each month a blog will host the party, and about a week before the second Tuesday of the month a theme will be posted. Any blogger that wishes to participate is […]