Scripts

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

220 reads

Blogs

Moving On-Prem PostgreSQL to the Cloud: Picking the Right Path for Big Tables

By

Every PostgreSQL migration eventually hits the same fork in the road. The database is...

A Spread of Vacation

By

I’m off on vacation today. Which is a little weird as I just got...

How AgentDBA Identifies Backup Failures

By

Every DBA has a box like this. Sitting untouched for months. Nobody’s proud of...

Read the latest Blogs

Forums

From SQL Server On-Premises to Claude Desktop: How I built a Full MCP Pipeline

By Cláudio Tereso

Comments posted to this topic are about the item From SQL Server On-Premises to...

Independence Day 2026

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Independence Day 2026

Independence Day 2026

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Independence Day 2026

Visit the forum

Question of the Day

Independence Day 2026

In the original Independence Day movie (1996), what type of computer did Jeff Goldblum use to connect to the alien mainframe? Take a guess, don't look it up or ask AI.

See possible answers