Technical Article

Script Login Roles Permissions in all DBs _SQL2005

Usage -Populate @list variable below with account(s),comma delimited list to script. -Save output to recreate:Login,Default DB,Server Roles,DB Access,DB Roles,DB Object Permissions. -- NOTE: -Stored procedures are created in Master, but are deleted -to limit by database see section /*Get a table with dbs where login has access*/ and change the where clause -to script all […]

4.75 (8)

You rated this post out of 5. Change rating

2007-02-01 (first published: )

4,439 reads

Technical Article

Script Login Roles Permissions in all DBSs

Populate @list variable with account(s) to script. Save output to recreate:Login, Password,Default DB,Server Roles,DB Access,DB Roles,DB Object PermissionsDB level permissions are scripted in all databases. Can recreate a single login, or accepts comma delimted list of logins.NOTE:Stored procedures are created in Master, but are deleted

You rated this post out of 5. Change rating

2006-01-19 (first published: )

1,751 reads

Blogs

The End of Year Vacation Burn

By

It’s been a good year for me. With my sabbatical, I felt like I’ve...

Speaking at PASS Summit 2025

By

In less than one month, I will be speaking not once but twice at...

Scooby Dooing Episode 9: The Case of the Artificially Intelligent Villain

By

Welcome back, my fellow sleuths, to my mystery-inspired blog series! I’m having a ton...

Read the latest Blogs

Forums

Create an HTML Report on the Status of SQL Server Agent Jobs

By Nisarg Upadhyay

Comments posted to this topic are about the item Create an HTML Report on...

Powershell script to generate SQL server Inventory in CSV format

By Srinivas Merugu

Comments posted to this topic are about the item Powershell script to generate SQL...

Database Ledger in SQL Server 2022

By Deepam Ghosh

Comments posted to this topic are about the item Database Ledger in SQL Server...

Visit the forum

Question of the Day

Azure SQL Database MAXDOP

When Azure SQL Database was originally released, the MAXDOP was set to 0 for each new database. In Oct 2025, what is the default value for Azure SQL databases?

See possible answers