Technical Article

Add all users to user databaes as readonly

I am new to writing scripts so dont blast be to bad.  This is a script to make all logins of a sql server readonly users to all user databases.  Mainly after a restore from a different server. (for reporting maybe) Any methods to optimize this script are fine.

You rated this post out of 5. Change rating

2014-10-27 (first published: )

206 reads

Blogs

Using Git Prune–#SQLNewBlogger

By

As I’ve been working with SQL Saturday and managing changes to events, I’ve accumulated...

Microsoft Purview new data governance features

By

Starting last week is a rollout of the public preview of a new and...

SQL Database Administration: Not For Everyone (But Maybe It’s for You)

By

Let's get one thing straight: database administration isn't the most glamorous tech job out...

Read the latest Blogs

Forums

Create Copy of DB in same server.

By terry999

Hi I want to create a copy of a DB on the same server....

SSRS Expression IIF Zero then ... Got #Error

By danyeungw

Hello, Need some help for SSRS. The column % expression is =iif(sum(Fields!ColumnA.Value) = 0...

Insert using table unput

By Bruin

I have a table that I need to run off a different server\db and...

Visit the forum

Question of the Day

Restoring the Resource Database

How can I restore a version of the Resource Database in SQL Server 2022?

See possible answers