question

GordonLederman-1343 avatar image
0 Votes"
GordonLederman-1343 asked GordonLederman-1343 commented

SSRS and manually purging the ExecutionLogStorage table

In SSRS, is it allowable to delete records from the [ReportServer].[dbo].[ExecutionLogStorage] table manually?

In a situation where the ExecutionLogDaysKept option has been set to -1 (keep all records), the accumulation of historic data may cause the ExecutionLogStorage table to become quite large. This can affect performance and take up significant storage. To reduce the number of records in this table, without changing to the ExecutionLogDaysKept parameter, could older data be deleted manually?

For example, delete all entries over 1,000 days old.

DELETE FROM [ReportServer].[dbo].[ExecutionLogStorage] WHERE TimeStart < DATEADD(day,-1000,GETDATE());

Is this allowable, or would it cause integrity issues for the application?

Thanks

Gordon

sql-server-reporting-services
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

OlafHelper-2800 avatar image
0 Votes"
OlafHelper-2800 answered GordonLederman-1343 commented

See stored ExpireExecutionLogEntries; I would say, deleteing directly from ExecutionLogStorage should work without any side effects.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Excellent point.

The SSRS cleanup procedure is running a straight delete against ExecutionLogStorage without touching any additional tables.

Thank you

0 Votes 0 ·
Isabellaz-1451 avatar image
0 Votes"
Isabellaz-1451 answered Isabellaz-1451 commented

Hi @GordonLederman-1343

By default, log entries are kept 60 days. Why don‘t you set the ExecutionLogDaysKept back to 60 days
Refer to:https://docs.microsoft.com/en-us/sql/reporting-services/report-server/report-server-executionlog-and-the-executionlog3-view?view=sql-server-ver15

140348-screenshot.png


Best Regards,
Isabella


If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


screenshot.png (18.4 KiB)
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.


Hi IsabellaZhangMSFT-7746

Without going into details, modifying the ExecutionLogDaysKept parameter is not an option.

Thanks,

Gordon

0 Votes 0 ·

I did a test locally,after i delete the log 30 days old ,the report manager runs well,and the report can open correctly. I think there is no harm to delete the old logs .

0 Votes 0 ·