#1 2019-01-16 15:01:44

VasanthR
Member
Registered: 2018-10-16

Scheduled Report displays in execution for longer time

We have long running report and it was scheduled to run in different frequency. Recently we noticed that this report did not produce output and status remain "in execution". I saw there is some terminal command to remove schedule job but  could not find any info/command to terminate just that one schedule instance which is "in execution" status and currently we are restarting RS server to terminate that in-execution report. Is there way to track progress of "in execution" schedule and hold it sometime to prevent from execution. It is likely the schedule need to be drop every time when it is not needed and recreate newly rather put that on-hold. Please share some insight to overcome this challenge with scheduled report.

Offline

#2 2019-01-23 13:06:52

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Scheduled Report displays in execution for longer time

Hi VasanthR,

please check this:
https://forum.reportserver.net/viewtopi … 4985#p4985

There is currently no way of tracking these reports other by the SQL commands we sent you there. As I mentioned, we will consider implementing a "currently running reports" view in future versions: RS-3163. We will further consider implementing a way to stop report execution for reports in this list.

Regards,
Eduardo

Offline

#3 2019-01-23 20:04:33

VasanthR
Member
Registered: 2018-10-16

Re: Scheduled Report displays in execution for longer time

I tried running the query provided to track longing running report but it returns 0 record all the time. I tweaked the query bit and ran against Reportserver data source thru dynamic list and getting 0 record even though there were report running and none of them captured by this query. I am not sure what wrong doing here. we are using MariaDB and RS3.0.5-6005 Enterprise Edition. Please advise

SELECT initial.date_field as "InitialDaterun", final.date_field as "FinalDaterun", initial.action as "Initialaction",
final.action as "Finalaction",  initial.KEY_FIELD , initial.VALUE
FROM
(SELECT E.*,P.KEY_FIELD, P.VALUE
   FROM RS_AUDIT_LOG_ENTRY E,
        RS_AUDIT_LOG_PROPERTY P
  WHERE E.ENTITY_ID = P.LOG_ENTRY_ID AND E.ACTION IN ('REPORT_EXECUTION')
AND P.KEY_FIELD in ( 'report' , 'report_id' )
) initial
left join
(SELECT DISTINCT e.action, e.DATE_FIELD, P.VALUE
   FROM RS_AUDIT_LOG_ENTRY E,
        RS_AUDIT_LOG_PROPERTY P
  WHERE E.ENTITY_ID = P.LOG_ENTRY_ID AND E.ACTION IN ('END_REPORT_EXECUTION','REPORT_EXECUTED_FAILED')
AND P.KEY_FIELD in ( 'report' , 'report_id' )
) final on initial.VALUE = final.VALUE
where final.VALUE is null
order by final.DATE_FIELD desc

Offline

#4 2019-01-24 07:46:00

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Scheduled Report displays in execution for longer time

Hi VasanthR,

what is the difference with your post here: https://forum.reportserver.net/viewtopi … 5064#p5064
where you wrote "Thanks for posting query to track long running report and it helps! " ?

Why was it working there and here not working? What differences do you have to that case?

Regards,
Eduardo

Offline

#5 2019-01-24 14:28:31

VasanthR
Member
Registered: 2018-10-16

Re: Scheduled Report displays in execution for longer time

I tested in lower environment and query was running however, did not see any result and then eventually tested in PROD as we have several long running reports and no result even there. I mean to say that query is running and assumed it work then I realized something wrong when testing in PROD. Sorry for the confusion. Please advise.

Offline

#6 2019-01-29 08:38:24

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Scheduled Report displays in execution for longer time

Hi VasanthR,

did you run this query *while the long running report was executing*?
And if yes, didn't you get any result?

Regards,
Eduardo

Offline

#7 2019-01-29 14:37:45

VasanthR
Member
Registered: 2018-10-16

Re: Scheduled Report displays in execution for longer time

I did run this query while the long running report was executing but audit query returns 0 records found. I verified these Audit tables S_AUDIT_LOG_ENTRY, RS_AUDIT_LOG_PROPERTY and made sure it capturing audit logs but this scenario "to capture long running report" does not appears to be working.

Offline

#8 2019-01-29 14:51:20

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Scheduled Report displays in execution for longer time

Hi VasanthR,

this is the audit log query:

SELECT E.*, P.KEY_FIELD, P.VALUE
FROM RS_AUDIT_LOG_ENTRY E,
RS_AUDIT_LOG_PROPERTY P
WHERE
E.ENTITY_ID = P.LOG_ENTRY_ID

there you can see all audit logs. You can modify it to show the reports currently running ('REPORT_EXECUTION', 'END_REPORT_EXECUTION', 'REPORT_EXECUTED_FAILED', etc).

In our case, this worked:

SELECT initial.date_field, final.date_field, initial.action, final.action,  initial.KEY_FIELD, initial.VALUE FROM
(SELECT E.*, P.KEY_FIELD, P.VALUE
   FROM RS_AUDIT_LOG_ENTRY E,
        RS_AUDIT_LOG_PROPERTY P
  WHERE E.ENTITY_ID = P.LOG_ENTRY_ID AND E.ACTION IN ('REPORT_EXECUTION') AND P.KEY_FIELD = 'report_id'
) initial left join
(SELECT DISTINCT e.action, e.DATE_FIELD, P.VALUE
   FROM RS_AUDIT_LOG_ENTRY E,
        RS_AUDIT_LOG_PROPERTY P
  WHERE E.ENTITY_ID = P.LOG_ENTRY_ID AND E.ACTION IN ('END_REPORT_EXECUTION','REPORT_EXECUTED_FAILED') AND P.KEY_FIELD in ( 'report' , 'report_id' )
) final on initial.VALUE = final.VALUE
where final.value is null
order by final.DATE_FIELD desc

If this does not work for you you can modify the original query in order to work in your case.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB