I want a group of users to have read-only access to all tables and views on all databases on SQL Server (I'm using SS2008). I'd like those users to have read-only access to all future tables and view.
How would you set that up?
I want a group of users to have read-only access to all tables and views on all databases on SQL Server (I'm using SS2008). I'd like those users to have read-only access to all future tables and view.
How would you set that up?
add the user to the db_datareader
role
example
exec sp_addrolemember 'db_datareader',YourLogin
Info about db_datareader
: http://msdn.microsoft.com/en-us/library/ms188629(SQL.90).aspx
You should just be able to add the users to the db_datareader database role in each of the databases. You could write a script to loop through the databases and do it for you.