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: )

212 reads

Blogs

Visualising SQL Server in Kubernetes

By

The other day I came across an interesting repo on github, KubeDiagrams. What this...

Picking a Starting Table in Test Data Manager

By

I wrote about getting the Redgate Test Data Manager set up in 10 minutes...

SQL Server Migration Using a Distributed Availability Group

By

SQL Server migrations are a headache, ask anyone who’s been through the pain of...

Read the latest Blogs

Forums

what is the difference between these two queries

By jaango123

Please I am struggling to understand the difference between these two queries. It behaves...

Introduction to PostgreSQL for the data professional

By Site Owners

Comments posted to this topic are about the item Introduction to PostgreSQL for the...

what happens to ssis and ssrs whenb we migrate to sql saas

By stan

Hi we know (or believe)  ssas saas gets stood up separately when a company...

Visit the forum

Question of the Day

CHOOSing an Alias

I have this code:

SELECT CHOOSE (MONTH (saledate), 'Winter', 'Winter', 'Spring', 'Spring', 'Spring', 'Summer', 'Summer', 'Summer', 'Autumn', 'Autumn', 'Autumn', 'Autumn') AS x
FROM ProductSales;
What is a good name for the column alias?

See possible answers