How To Make Database Access Read-Only per User in SQL Server 2005?
What is the easiest way to make databases read only for specific users using windows authentication to connect to the开发者_如何学JAVA DB?
Create a new database role that only has read permissions and assign said users to this role.
Place the users in a AD group and grant the group dbreader in the DB
Use Active directory groups. Create the group in AD (or on the server if you do not have a domain controller), then add the group in sql server and set it up with darareader permissions. Then you only need to add/remove users from the group to grant/deny access.
Also, on the client machines, if using Vista or windows 7, use the credential store to configure your windows account that is always used when connecting to the database server. Then if you don't have a domain controller they will automatically use their correct login.
精彩评论