如何在sql server 2008r2中授予对用户的只读访问权限? [英] how to give readonly access to a user in sql server 2008r2?
本文介绍了如何在sql server 2008r2中授予对用户的只读访问权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尽管我已向用户提供了只读访问权限,但出现此错误.
服务器原理"usename"在当前安全上下文下无法访问数据库"databasename".
我该怎么办?
Hi,
Although i have provided the readonly access to the user, i am getting this error.
The server principle "usename" is not able to access the database "databasename" under the current security context.
What should i do?
推荐答案
使用以下链接获取权限:
http://msdn.microsoft.com/en-us/library/ms189612 (v = sql.90).aspx [
Use the following links for permission:
http://msdn.microsoft.com/en-us/library/ms189612(v=sql.90).aspx[^]
thanks,
Ambesha
简单,只需将用户添加到db_datareader角色即可.
例如:
Simple just add the user to the db_datareader role.
example:
exec sp_addrolemember 'db_datareader',YourLogin
有关更多信息,请参见以下链接:
http://msdn.microsoft.com/en-us/library/ms188629(SQL .90).aspx [ ^ ]
[edit]已纠正和可点击的代码块链接-Nelek [/edit]
For more information plese refer the following link:
http://msdn.microsoft.com/en-us/library/ms188629(SQL.90).aspx[^]
[edit] Code blocks corrected and clickable link - Nelek [/edit]
这篇关于如何在sql server 2008r2中授予对用户的只读访问权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文