Monthly Archives: December 2009

Stored Procedures to Store and Get Database Users with All Permissions

Introduction Traditionally when doing a restore, moving a database, etc. a DBA would simply go into Management Studio and use the Generate Scripts wizard to script all logins and permissions. This approach can take several minutes and as I recently … Continue reading

Posted in Security, User Management, Utilities | Tagged , , , , | Leave a comment

Script Individual User Rights in a Database with PowerShell

Introduction Tonight on Twitter the call went out on #SqlHelp looking for a way to script just database permissions for a specific user. I wrote a script once that I was pretty sure did that so I jumped in to … Continue reading

Posted in PowerShell | Tagged | 2 Comments

A Busy/Accidental DBA’s Guide to Managing VLFs

Introduction Properly managing VLFs can make or break the performance of your databases. There is a ton of information out there on the proper management of VLFs, but nothing I have found that tries to boil it down to the … Continue reading

Posted in File Management | Tagged , , | 25 Comments

How to Shrink TempDB in SQL 2005

Introduction From time to time you find yourself needing to shrink some space out of TempDB. Shrinking database files is never my first choice but sometimes it is the best I have. Many people think that you cannot shrink TempDB … Continue reading

Posted in File Management | Tagged , , , , | 7 Comments