If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > Best way to setup a Read Only Server Role

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-02-10, 09:23
orobertg orobertg is offline
Registered User
 
Join Date: Feb 2009
Posts: 3
Best way to setup a Read Only Server Role

What's the best way to setup security for an account that behaves like a SQL Server Role in that it has only Read Only Rights for all databases both existing and new?

The problem I'm trying to solve is providing Read Only access to all databases on a SQL Instance for reporting purposes. The trouble is the Read Only access has to extend to new databases that are created. A customized server role would be ideal, but that doesn't exist.
Reply With Quote
  #2 (permalink)  
Old 02-02-10, 11:13
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,602
This is easy to do, but nearly always a bad idea. I've seen it done twice, and in both cases it caused an audit failure which cost the DBA their job within two years.

1) Backup the model database
2) Create a SQL Server login.
3) Grant that login access to every database (including model)
4) Make the users created in step 3 members of the database's db_datareader role.

-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
Reply With Quote
  #3 (permalink)  
Old 02-05-10, 11:31
orobertg orobertg is offline
Registered User
 
Join Date: Feb 2009
Posts: 3
Thanks Pat.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On