Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 how to provide readonly access to the databse

Author  Topic 

pramod21
Yak Posting Veteran

64 Posts

Posted - 2011-01-11 : 06:07:17
Hi,
I wanted to know how to provide read only acces to the database to any particular user.if there are 2 user,i wanted to give read only acces to one user.

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-01-11 : 06:10:52
You can grant the db_datareader database role.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

Sachin.Nand

2937 Posts

Posted - 2011-01-12 : 00:58:59
If you need to add "read only" permissions to set of users for a particular tables then you can create a custom database role select the tables and add the deny option for alter permission to those tables and then assign that role to the users to whom to need read only for tables.

PBUH

Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2011-01-12 : 03:33:08
Why would you do it that way when db_datareader does exactly what is needed?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -