Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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
User | Count |
---|---|
8 | |
3 | |
2 | |
2 | |
1 |