Any SQLS dbas here that can tell me how to lock do...
# sql
j
Any SQLS dbas here that can tell me how to lock down user access to
selects
only?
g
you should be able to create a SQL account with just data reader privileges for that one database
☝️ 1
r
I was just about to respond with the same. Sample code below. This assumes the UserName doesn't have any roles in the database but they do have a login at the server level.
USE DatabaseName;
GO
CREATE USER UserName FOR LOGIN UserName;
ALTER ROLE db_datareader ADD MEMBER UserName;
j
Works - thank you!