SQL Server: Grant user access permission to database

Categories: Database; Tagged with: ; @ October 17th, 2012 12:20

Grant user permission to login to the database:

USE YOUR_DB

CREATE USER ROA_NAME FOR LOGIN ROA_NAME

Add user to the group:

USER YOUR_DB

EXEC SP_ADDROLEMEMBER 'DB_DATAREADER', 'ROA_NAME'

“Members of the db_datareader fixed database role can run a SELECT statement against any table or view in the database.”

 

Links:
http://stackoverflow.com/questions/6688880/how-do-i-grant-read-access-for-a-user-to-a-database-in-sql-server

<->



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.