sp_helptext 权限
我需要向开发人员授予 sp_helptext
权限,以便他们可以检查存储过程。 有人可以请让我知道我该怎么做吗?
谢谢, 克里斯汀
I need to give sp_helptext
permission to the developers so that they can check the store procedures. Can somebody please, let me know how can i do it.
Thanks,
Christine
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我认为
grantexecute on sp_helptext
是完全错误的方法。 如所述此处,作者:Jesus Lopez,如果您想授予用户查看所有对象定义的权限,则必须使用GRANT VIEW DEFINITION TO your_database_user
或者如果您想让用户查看特定对象的对象定义,则必须使用
GRANT VIEW DEFINITION ON dbo.YourProcedure TO your_database_user
。请注意,首先您必须添加现有服务器登录作为新的数据库中的用户。 然后,您将能够选择创建新用户的目标数据库,然后使用 GRANT VIEW DEFINITION 语句授予他/她权限。
I think
grant execute on sp_helptext
is totally the wrong approach. As stated here by Jesus Lopez, if you want to give a user permissions to see all objects definitions, you must useGRANT VIEW DEFINITION TO your_database_user
or if you want to let a user see object definition for a particular object, you must use
GRANT VIEW DEFINITION ON dbo.YourProcedure TO your_database_user
.Notice that firstly you must add an existing server login as a new user in the database. Then, you will be able to select the target database where the new user has been created, and then grant him/her permissions with
GRANT VIEW DEFINITION
statement.该语法
必须以 master 作为当前数据库来执行。
您还可以通过 GUI 来完成此操作,方法是右键单击用户或进程并转到属性。 确切的步骤取决于您使用的是企业管理器还是 SQL Management Studio。
或者将它们添加到已经具有权限的角色中,公共是最低要求。
The syntax is
and must be executed with master as the current database.
You can also do it through the GUI by right clicking on the user or the proc and going to properties. The exact steps depend on whether you are using enterprise manager or sql management studio.
Alternately add them to a role that has permissions on it already, public is the minimum required.
命令的格式需要是
The format of the command needs to be
我不是 sql 专家,但我想开发人员还需要对他们正在获取文本的存储过程的读取/执行权限。
I'm not a sql guru but I would imagine the developers would also need read/execute permission to the stored procedure they are getting the text for.