HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

giving users select-only permissions of database objects

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
permissionsobjectsdatabaseonlyselectusersgiving

Problem

I'm running SQL Server 2017 with a production database called Biz. I'd like to

  • Give three users the ability to run SQL queries against this database without altering the data, or maybe preferably,



  • Create a separate database (or schema) called BizView with some commonly-used queries, tools, etc. Then I could give BizView the appropriate read-only permissions on Biz. Then my users could just log into BizView and run their queries from there. . . right?



All of my users are on a domain. What combination of logins/roles/permissions would allow this basic read-only reporting on my production database? It's so simple, but I feel like I'm mis-applying Oracle concepts (I'm newly responsible for this single MS-SQL database) to this situation.

Solution

It sounds like you simply want to give those users db_datareader and nothing else. This is pretty common.


Members of the db_datareader fixed database role can read all data
from all user tables.

See the role explained in the MS DOCS

Context

StackExchange Database Administrators Q#241409, answer score: 2

Revisions (0)

No revisions yet.