Quantcast
Channel: Answers for "Schema and role permissions for all users in a database"
Browsing latest articles
Browse All 8 View Live

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 Article



Answer 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 Article

Answer 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 Article

Answer 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
Browsing latest articles
Browse All 8 View Live


Latest Images