博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Reporting Services 错误案例一则
阅读量:6088 次
发布时间:2019-06-20

本文共 6207 字,大约阅读时间需要 20 分钟。

  遇到一个有意思的Reporting Services报表的案例,在2015-01-30号的凌晨20分左右的时候,有人发现Reporting Services的速度非常慢,而且最后有抛出异常,当时不知道什么情况。只是记录了其中一张报表的名字,以及出错信息截图。如下所示:

 

     第二天,我首先通过下面SQL查看这张报表在2015-01-30 00:00到2015-01-30 02:00这段时间的执行记录,如下所示,正常情况下,3~5秒报表出来,不正常情况下整 个报表耗费了接近60多秒,很奇怪的是TimeDataRetrieval的时间居然为0,大家都知道TimeDataRetrieval、 TimeProcessing、TimeRendering分别表示检索数据、处理报表以及呈现报表所用的毫秒数(SQL里面,我将单位转化为秒)。但是 TimeStart, TimeEnd的时间差(报表进程的持续时段的开始时间和结束时间)居然耗费了60多秒,让我很是纳闷,不太明白,照理来 说,TimeDataRetrieval、TimeProcessing、TimeRendering三者的和应该接近于TimeEnd减去 TimeStart的差,但是这里的情况明显不对头,那么究竟发生了什么事情呢,这张报表不是发生了异常吗,于是我找到了日志文件C:\Program Files\Microsoft SQL Server\MSSQL.3\Reporting Services\LogFiles\ReportServer__01_30_2015_00_00_46.log

USE [ReportServer];
GO
 
SELECT  C.Name                         AS ReportName
       ,E.ReportID                     AS ReportID
       ,E.UserName                     AS UserName
       ,E.Format                       AS Format
       ,E.Parameters                   AS Parameters
       ,E.TimeStart                    AS TimeStart
       ,E.TimeEnd                      AS TimeEnd
       ,E.TimeDataRetrieval*1.0/1000   AS TimeDataRetrieval
       ,E.TimeProcessing*1.0/1000      AS TimeProcessing
       ,E.TimeRendering*1.0/1000       AS TimeRendering
       ,DATEDIFF(SECOND, TimeStart, TimeEnd)
                                       AS  CostTime
FROM ReportServer.dbo.ExecutionLog E WITH(NOLOCK)
INNER JOIN ReportServer.dbo.Catalog C WITH(NOLOCK)ON E.ReportID = C.ItemID
WHERE C.Name ='JOReportZH_FTYEMI'
   AND E.TimeStart > CAST('2015-01-30 00:00' AS DATETIME)
   AND E.TimeStart <= CAST('2015-01-30 02:00' AS DATETIME)
ORDER BY TimeStart DESC

 

如下所示,因为当时Oracle数据有异常,导致连接数据库时出现”ORA-12602: TNS: 达到连接共享限制“的 错误。然后分析日志发现,Reporting Service进程在获取数据出现异常的情况下,有个错误处理机制让它继续尝试访问数据库,进行了多次尝试后才最终将异常抛出,这也是为什么 TimeDataRetrieval的时间居然为0。TimeStart, TimeEnd的时间差(指示报表进程的持续时段的开始时间和结束时间)耗费了60多秒的缘故。到此谜底终于揭开!困扰我的疑问豁然开朗!

ReportServer__01_30_2015_00_00_46.log文件里面的部分内容如下所示:

w3wp!library!18!01/30/2015-00:03:28:: i INFO: Call to RenderFirst( '/JO/EEL/JOReportZH_FTYEMI' )

w3wp!runningjobs!d!30/01/2015-00:04:07:: i INFO: Adding: 1 running jobs to the database
w3wp!library!8!01/30/2015-00:04:09:: i INFO: Call to RenderFirst( '/JO/EEL/JOReportZH_FTYEMI' )
w3wp!processing!18!2015/1/30-00:04:31:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: 对数据集“SELECT_MATRIX_OPT”执行查询失败。, ;
Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: 对数据集“SELECT_MATRIX_OPT”执行查询失败。 ---> System.Data.OracleClient.OracleException: ORA-12602: TNS: 达到连接共享限制

   at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc)

   at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals)
   at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, ArrayList& resultParameterOrdinals)
   at System.Data.OracleClient.OracleCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.OracleClient.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.ReportingServices.DataExtensions.OracleCommandWrapperExtension.ExecuteReader(CommandBehavior behavior)
   at Microsoft.ReportingServices.ReportProcessing.ReportProcessing.RuntimeDataSetNode.RunDataSetQuery()
   --- End of inner exception stack trace ---
w3wp!processing!18!2015/1/30-00:04:31:: e ERROR: An exception has occurred in data source 'SELECT_MATRIX_OPT'. Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: 对数据集“SELECT_MATRIX_OPT”执行查询失败。 ---> System.Data.OracleClient.OracleException: ORA-12602: TNS: 达到连接共享限制

w3wp!processing!18!2015/1/30-00:04:31:: i INFO: Merge abort handler called. Aborting data sources ...

w3wp!dataextension!18!2015/1/30-00:04:31:: w WARN: CommandWrapper.Cancel not called, connection is not valid
w3wp!processing!18!2015/1/30-00:04:31:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: 处理报表时出错。, ;
Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: 处理报表时出错。 ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: 对数据集“SELECT_MATRIX_OPT”执行查询失败。 ---> System.Data.OracleClient.OracleException: ORA-12602: TNS: 达到连接共享限制

   --- End of inner exception stack trace ---

w3wp!processing!18!2015/1/30-00:04:31:: w WARN: Data source '1.90': Report processing has been aborted.
w3wp!processing!18!2015/1/30-00:04:31:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: 处理报表时出错。, ;
Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: 处理报表时出错。 ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: 对数据集“SELECT_MATRIX_OPT”执行查询失败。 ---> System.Data.OracleClient.OracleException: ORA-12602: TNS: 达到连接共享限制

   --- End of inner exception stack trace ---

w3wp!webserver!18!01/30/2015-00:04:31:: e ERROR: Reporting Services error Microsoft.ReportingServices.Diagnostics.Utilities.RSException: 处理报表时出错。 ---> Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: 处理报表时出错。 ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: 对数据集“SELECT_MATRIX_OPT”执行查询失败。 ---> System.Data.OracleClient.OracleException: ORA-12602: TNS: 达到连接共享限制

w3wp!library!d!01/30/2015-00:04:53:: i INFO: Call to RenderFirst( '/JO/EEL/JOReportZH_FTYEMI' )

w3wp!runningjobs!1!30/01/2015-00:05:07:: i INFO: RunningJobContext.IsClientConnected; found orphaned request
w3wp!runningjobs!18!30/01/2015-00:05:07:: i INFO: Adding: 1 running jobs to the database
w3wp!runningjobs!1!30/01/2015-00:05:07:: i INFO: RunningJobContext.IsClientConnected; found orphaned request
w3wp!processing!8!2015/1/30-00:05:13:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: 对数据集“SELECT_MATRIX_OPT”执行查询失败。, ;
Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: 对数据集“SELECT_MATRIX_OPT”执行查询失败。 ---> System.Data.OracleClient.OracleException: ORA-12602: TNS: 达到连接共享限制

转载地址:http://jttwa.baihongyu.com/

你可能感兴趣的文章
网络安全管理技术作业-SNMP实验报告
查看>>
根据Uri获取文件的绝对路径
查看>>
Flutter 插件开发:以微信SDK为例
查看>>
.NET[C#]中NullReferenceException(未将对象引用到实例)是什么问题?如何修复处理?...
查看>>
边缘控制平面Ambassador全解读
查看>>
Windows Phone 7 利用计时器DispatcherTimer创建时钟
查看>>
程序员最喜爱的12个Android应用开发框架二(转)
查看>>
vim学习与理解
查看>>
DIRECTSHOW在VS2005中PVOID64问题和配置问题
查看>>
MapReduce的模式,算法以及用例
查看>>
《Advanced Linux Programming》读书笔记(1)
查看>>
zabbix agent item
查看>>
一步一步学习SignalR进行实时通信_7_非代理
查看>>
AOL重组为两大业务部门 全球裁员500人
查看>>
字符设备与块设备的区别
查看>>
为什么我弃用GNOME转向KDE(2)
查看>>
Redis学习记录初篇
查看>>
爬虫案例若干-爬取CSDN博文,糗事百科段子以及淘宝的图片
查看>>
Web实时通信技术
查看>>
第三章 计算机及服务器硬件组成结合企业运维场景 总结
查看>>