SQL Server 2008 R2 用户无法使用系统过程

发布于 2024-11-05 19:46:42 字数 405 浏览 0 评论 0原文

我已将 2005 数据库恢复到新的 2008 R2 数据库服务器。我创建了一个名为“gatekeeper”的新用户

,但是该用户无权访问数据库中的存储过程列表。

在报告应用程序中,在运行查询之前,报告程序正在运行以下过程...

exec [Timesheet]..sp_procedures_rowset N'mp_GetTimesheetToPrint',1,N'dbo'

在网守用户下运行时不返回任何行。但是,当作为 sa 运行时,它会返回该过程。

为了使此程序正常工作,我需要向网守授予最低权限是多少。这似乎是所有系统对象的问题,它们都没有运行失败或给出权限错误,它们只是不返​​回结果或结果的子集。

真的很挣扎。提前致谢

问候

菲尔

I have restored a 2005 Database to a new 2008 R2 DB Server. I have created a new user called "gatekeeper"

However this user does not have access to the list of stored procedure in the database.

In a reporting application before running the query the report program is running the following procedure...

exec [Timesheet]..sp_procedures_rowset N'mp_GetTimesheetToPrint',1,N'dbo'

When run under gatekeeper user this returns no rows. However when run as sa it returns the procedure.

What is the minimum permission I need to give to gatekeeper for this procedure to work properly. It seems to be a problem with all system objects, none of them fail to run or give permission errors, they just return no results or subsets of the results.

Really struggling with this. Thanks in advance

Regards

Phil

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

猫弦 2024-11-12 19:46:42

老实说,我对你的描述有点困惑,所以如果我在这里偏离基地,请告诉我。您可以在下面尝试一下。它将授予对所有存储过程的执行访问权限。如果您只需要网守能够访问一个存储过程,那么只需授予对该存储过程的执行权限。如果存储过程正在访问其他数据库中的数据,您可能需要授予对表的权限,以便它可以访问其数据库之外的数据。

CREATE ROLE db_executor
GRANT EXECUTE TO db_executor
EXEC sp_addrolemember 'db_executor', 'gatekeeper'

I am honestly a bit confused by your description, so please let me know if I am off base here. You can try this below. It will grant execute access to all stored procedures. If you only need gatekeeper to have access to the one stored procedure, then just grant execute on that stored procedure. If the stored procedure is accessing data from other databases, you may need to grant permissions on the tables and such that it is accessing outside of its database.

CREATE ROLE db_executor
GRANT EXECUTE TO db_executor
EXEC sp_addrolemember 'db_executor', 'gatekeeper'
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文