Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I am wondering if there is anyway to configure the number of history records per subscription kept in dbo.SubscriptionHistory. From my testing, I can only see the previous 10 subscription history records.
Example: If I have a scheduled Power BI report refresh set to refresh every hour, I cannot see if the refresh failed yesterday or what the error messages might have been as I only have the previous 10 hours of refreshes for that subscription.
Let me know if there is any configuration option or how you keep a longer refresh history.
Solved! Go to Solution.
Upon further evaluation, it is pretty clear that it is hard coded to be 10 records within the stored procedure dbo.AddSubscriptionHistoryEntry.
Code snippet from dbo.AddSubscriptionHistoryEntry
DELETE FROM [dbo].[SubscriptionHistory] WHERE [SubscriptionID] = @SubscriptionID AND [SubscriptionHistoryID] NOT IN (
SELECT TOP (10) [SubscriptionHistoryID]
FROM [dbo].[SubscriptionHistory]
WHERE [SubscriptionID] = @SubscriptionID
ORDER BY [StartTime] DESC )
I am pretty hesistant to make any changes to the stored procedures of the Power BI Report Server.
Upon further evaluation, it is pretty clear that it is hard coded to be 10 records within the stored procedure dbo.AddSubscriptionHistoryEntry.
Code snippet from dbo.AddSubscriptionHistoryEntry
DELETE FROM [dbo].[SubscriptionHistory] WHERE [SubscriptionID] = @SubscriptionID AND [SubscriptionHistoryID] NOT IN (
SELECT TOP (10) [SubscriptionHistoryID]
FROM [dbo].[SubscriptionHistory]
WHERE [SubscriptionID] = @SubscriptionID
ORDER BY [StartTime] DESC )
I am pretty hesistant to make any changes to the stored procedures of the Power BI Report Server.
Hi @AustinS !
You can make the change in stored procedure dbo.AddSubscriptionHistoryEntry to only let it delete entries which are older than 60 days.
The thing to remmeber is when you upgrade to newer version from Jan 2021 to May 2021 or may be more latest, you will always need to make sure these maintainence sp's preserve your customize code.
Glad you find out the solution.
Regards,
Hasham
Hi @AustinS !
You can increase the Retention days for Execution logs by setting [ExecutionLogDaysKept] propterty to [-1];
This will keep Report Execution Logs but it seems there is no setting to increase subscription retention period.
Regards,
Hasham
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |
| User | Count |
|---|---|
| 10 | |
| 5 | |
| 5 | |
| 4 | |
| 3 |