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

5 Starter Projects for Your AI and Data Engineering Portfolio

By

Reading tutorials is fine. Shipping something is better. If you are trying to break...

The Book of Redgate: Taking Breaks

By

We work hard at Redgate, though with a good work-life balance. One interesting observation...

Database AI Agents: The Read-Only Rule

By

Fourth in a series on Ai and databases. What Read-Only Advisory Actually Means A...

Read the latest Blogs

Forums

Displaying Money

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Displaying Money

The Slow Growing Problems

By Steve Jones - SSC Editor

Comments posted to this topic are about the item The Slow Growing Problems

Calculating the Harmonic Mean in Power BI

By Dinesh Asanka

Comments posted to this topic are about the item Calculating the Harmonic Mean in...

Visit the forum

Question of the Day

Displaying Money

I want to get the currency sign displayed with my amount stored in a money type. Does this work?

DECLARE @Amount MONEY;
SET @Amount = '?1500';

SELECT CAST( @Amount  AS VARCHAR(30)) AS Euros

See possible answers