Click here to monitor SSC
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)

Database Users And Associated Database Roles

By Larry Sumuri,

1. Copy the script over to you SQL Query Window

2.Replace the name of the database, that is, '<databasename>' with the name of the database to run against

3. Execute the script to view the resultset displaying that database's users and thier associated database roles

Note: The script works on SQl Server 2005, and has not been tested against SQL Server 2008 yet.

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

I need script related to databases

glnp scripts on database

FORUM

Generate scripts for all databases

Generate scripts for all databases

FORUM

Scripting Remote Database using SMO in .net

Can't script remote database using script method

SCRIPT

Get Detach or Attach all user databases script

Script to generate script to detach or attach user databases

Tags
roles    
users    
 
Contribute