From time to time I am asked to provide an "access" list for a database or server. I have various scripts lying around the place and I cobble something together as needed but I have never got around to putting something comprehensive together until today. Sure, you can Google for a solution to save the bother of having to type, but in doing so I never found something that did exactly what I wanted. Today I found something that got me started by a chap called Mangal Pardeshi but there were a couple of problems with it, 1) it didn't like databases with - or _ in the name and 2) it only covered database roles and not server roles. So with thanks to Mangal, I have reworked his stored procedure (so it is just a query) and you can use it below (with the usual caveats): /******************************************************************************************** Name : dbo.List_DBRoles.sql Author : Mangal Pardeshi / Paul Hewson Purpose : Show all database rol
Hints and tips on working with Microsoft SQL Server