天天看點

Reporting Services 錯誤案例一則

  遇到一個有意思的reporting

services報表的案例,在2015-01-30号的淩晨20分左右的時候,有人發現reporting

services的速度非常慢,而且最後有抛出異常,當時不知道什麼情況。隻是記錄了其中一張報表的名字,以及出錯資訊截圖。如下所示:

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

Reporting Services 錯誤案例一則

如下所示,因為當時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:

對資料集“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&

   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 ---

e error: an exception has occurred in data source 'select_matrix_opt'.

details:

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

microsoft.reportingservices.reportprocessing.processingabortedexception:

處理報表時出錯。, ;

處理報表時出錯。 --->

w3wp!processing!18!2015/1/30-00:04:31:: w warn: data source '1.90': report processing has been aborted.

w3wp!webserver!18!01/30/2015-00:04:31::

e error: reporting services error

microsoft.reportingservices.diagnostics.utilities.rsexception: 處理報表時出錯。

--->

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!processing!8!2015/1/30-00:05:13::