You are not logged in.
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
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
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
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
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
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
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
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