Answer by Grant Fritchey
I would try something involving fn_my_permissions. It's not going to list everything for all users, but you can get everything for each user. Maybe put it in a cursor. You can see a lot more details in...
View ArticleAnswer by Magnus Ahlkvist
In view **sys.database_principals** you have all database users and database roles. type='S' means it's a user, type='R' means it's a role. Join with **sys.server\_principals** to get the corresponding...
View ArticleAnswer by Ian Roke
As a starter here is my script for listing all the schemas, users and permissions: SELECT SCHEMA_NAME(major_id) [Schema] , USER_NAME(grantee_principal_id) [Login] , permission_name [Permission] ,...
View ArticleAnswer by DaniSQL
You can use this script to get the list of Users, login name, account type and default database in all of your databases: IF EXISTS ( SELECT * FROM tempdb.dbo.sysobjects WHERE id =...
View Article