Get listing of Databases user has access to …

You can right click on each user to find out what database he or she has access to; which can be very time consuming. I have wrote the script below that does similar thing for one user or multiple users.

Please note this procedure will take a while to complete depending on the number of databases in your system. You can submit three types of searches:

-- Check Single User [DEFAULT]
EXEC up_CheckUsersAccessInDB 'Test'
GO

-- Check Multiple Users
EXEC up_CheckUsersAccessInDB 'Test1,Test2', 1
GO

-- Check All Users
EXEC up_CheckUsersAccessInDB '%', 2
GO

Stored Procedure: Link.

If any errors or issues please feel free to mail me, mohitkgupta at msn dot com.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.