SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Users , Roles and Logins

By Kenneth Igiri,

RUn this script to list users in each database along with the roles assigned to each user as well as the logins mapped to each user and the status of that login.

The Database Role column returns NULL when the user has no role assigned and the Instance Login column returns NULL if the user is an orphaned user.

Total article views: 2672 | Views in the last 30 days: 4
 
Related Articles
FORUM

logins

logins

FORUM

Logins

Delete logins

FORUM

Logins

Logins

FORUM

Login locked

Login locked

FORUM

user,login

user,login

Tags
auditing    
security    
 
Contribute