我目前正在报表服务器上编写一个 CLR 存储过程来触发我的订阅事件。我无法使用 FireEvent,因为会引发错误,说明用户“NT AUTHORITY\SYSTEM”没有权限。我知道我正在寻找的权限是生成事件,但我一生都找不到它。
这是我的错误和 CLR 存储过程,任何帮助将不胜感激。
存储过程位于报表服务器上。报表服务器使用 Windows 身份验证。我对 SQL Server 2008 R2 (SP1) 拥有完全的管理员权限。
public partial class StoredProcedures
{
[Microsoft.SqlServer.Server.SqlProcedure]
public static void CTest()
{
ReportingService2005 rs = new ReportingService2005();
rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
rs.Url = "http://erer332/ReportServer/ReportService2005.asmx";
Subscription[] lSubs;
try
{
lSubs = rs.ListSubscriptions("/WFM Graphical Reports/Sales Order Formats by Company", null);
rs.FireEvent("TimedSubscription", lSubs[0].SubscriptionID);
}
catch (SoapException e)
{
SqlContext.Pipe.Send(e.Detail.InnerXml);
}
}
};
<ErrorCode xmlns="http://www.microsoft.com/sql/reportingservices">
rsAccessDenied
</ErrorCode>
<HttpStatus xmlns="http://www.microsoft.com/sql/reportingservices">
400
</HttpStatus>
<Message xmlns="http://www.microsoft.com/sql/reportingservices">
The permissions granted to user 'NT AUTHORITY\SYSTEM' are insufficient for performing this operation.
</Message>
<HelpLink xmlns="http://www.microsoft.com/sql/reportingservices">
http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsAccessDenied&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=10.50.2500.0
</HelpLink>
<ProductName xmlns="http://www.microsoft.com/sql/reportingservices">
Microsoft SQL Server Reporting Services
</ProductName>
<ProductVersion xmlns="http://www.microsoft.com/sql/reportingservices">
10.50.2500.0
</ProductVersion>
<ProductLocaleId xmlns="http://www.microsoft.com/sql/reportingservices">
127
</ProductLocaleId>
<OperatingSystem xmlns="http://www.microsoft.com/sql/reportingservices">
OsIndependent
</OperatingSystem>
<CountryLocaleId xmlns="http://www.microsoft.com/sql/reportingservices">
1033
</CountryLocaleId>
<MoreInformation xmlns="http://www.microsoft.com/sql/reportingservices">
<Source>
ReportingServicesLibrary
</Source>
<Message msrs:ErrorCode="rsAccessDenied" msrs:HelpLink="http://go.microsoft.com/fwlink/?LinkId=20476&EvtSrc=Microsoft.ReportingServices.Diagnostics.Utilities.ErrorStrings&EvtID=rsAccessDenied&ProdName=Microsoft%20SQL%20Server%20Reporting%20Services&ProdVer=10.50.2500.0" xmlns:msrs="http://www.microsoft.com/sql/reportingservices">
The permissions granted to user 'NT AUTHORITY\SYSTEM' are insufficient for performing this operation.
</Message>
</MoreInformation>
<Warnings xmlns="http://www.microsoft.com/sql/reportingservices" />`