2

在功能激活时尝试创建自定义 SharePoint 计时器作业时,我从日志文件中收到以下错误:

System.Data.SqlClient.SqlException (0x80131904):对象“proc_putObjectTVP”、数据库“MSSQL”、模式“dbo”的执行权限被拒绝。 在 System.Data.SqlClient.SqlConnection.OnError(SqlException 异常,布尔 breakConnection,Action`1 wrapCloseInAction)在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj,布尔 callerHasConnectionLock,布尔 asyncClose)在 System.Data.SqlClient.TdsParser System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) 在 System.Data.SqlClient.Sql 的 .TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)。 .. 5c6d109c-dbc6-e02e-7ae4-010d7f559e0b

为了使它工作,我找到了存储过程 proc_putObjectTVP 并授予站点 apppool 用户 ID 的执行权限。它按预期工作。

我的问题是:

这是 Sharepoint 2013 中的错误吗?这是正确的方法吗?(在生产环境中,服务器管理员可能不允许我执行此类操作)

4

2 回答 2

2

我在用于 SharePoint 2013 服务的帐户的事件日志中遇到了类似的错误:

SQL Server 实例 'XXXXXXXXX' 上的数据库 'XXXX_Config' 中的用户 'Name: XXXXX\SP_Services SID: xxxxxxxxxxxxxxx ImpersonationLevel: None' 的 SQL 数据库权限不足。下面包括来自 SQL Server 的其他错误信息。

对象“proc_putObjectTVP”、数据库“XXXX_Config”、模式“dbo”的 EXECUTE 权限被拒绝。

谷歌搜索大量博客文章推荐了将所需权限应用于存储过程的相同方法。我个人不喜欢这种方法,但是我最终发现这篇TechNet 帖子通过将存储的过程添加到WSS_Content_Application_Pools角色的安全对象来授予所需的权限。

使用 SQL Server Management Studio 执行以下操作:

  1. 展开数据库,然后展开 SharePoint_Config 数据库。
  2. 展开安全 -> 角色 -> 数据库角色
  3. 找到 WSS_Content_Application_Pools 角色,右键单击它,然后选择 Properties
  4. 单击 Securables,然后单击搜索
  5. 接下来单击特定对象,然后单击确定
  6. 单击对象类型并选择存储过程。点击确定
  7. 添加存储过程'proc_putObjectTVP'并单击确定(如果它没有自动授予它执行权限;您需要单击“执行”上的复选框并保存)

使用此方法,添加到WSS_Content_Application_Pools角色的任何新帐户都将拥有正确的权限,从而防止问题再次出现。

于 2015-03-31T09:51:49.390 回答
0

SPDataAccess role in SharePoint_Config was configured to execute proc_putObjectTVP for my install of SharePoint 2013 (which has been a trial-by-fire to get used to SQL Server 2012), anyway, making sure my sharepoint users had that role set seems to have done the trick (and of course brought up more errors to debug, now that more things are successfully starting...)

SPDataAccess (also written as SP_DATA_ACCESS) has been a useful role to Google for, bringing up tons of good resources and tips to fix one problem or another. I'll be reading blogs all night. I suspect configuring databases is old hat for quite a few SharePoint admins and devs, but it's not as well-explained, particularly as the wizard does so much (and so little) for you.

I signed up for Safari Books just to access http://my.safaribooksonline.com/book/programming/microsoft-sharepoint/9781118655047 and books like it. It's useful to help me "think like SharePoint", though Google has been just as much help. (More, really.)

于 2013-07-11T00:30:00.680 回答