Is there an easy way to grant any authenticated user (everyone) access (read) to a given database?
Asked
Active
Viewed 3,799 times
1
-
simple way is EXEC sp_addrolemember N'db_owner', N'USerNAme' but here username is required , if need all user at a time then make a sp which executed auto with new db user creation – Nazir Ullah Jun 11 '16 at 23:24
-
I don't think there is an easy way. Have a look at: http://stackoverflow.com/questions/6688880/how-do-i-grant-read-access-for-a-user-to-a-database-in-sql-server – Alex Jun 12 '16 at 02:41
1 Answers
3
One method is to enable the guest user and add it to the db_datareader fixed database role:
USE YourDatabase;
CREATE USER guest;
ALTER ROLE db_dataReader ADD MEMBER guest;

Dan Guzman
- 43,250
- 3
- 46
- 71