Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
cnschulz
Helper IV
Helper IV

SQL to Alter Refresh Schedules

Gday, 

 

On our DEV server, Id like to restrict users from creating long term refresh schedules to reduce the data impact. My plan is to use the "stop this schedule on" mechanism and stop all active schedules after one week. I have found 3 (!!) tables I need to edit on order for this to work correctly:

 

  • ReportServer.dbo.Schedule
  • ReportServer.dbo.Subscriptions (Stored in XML!!!!)
  • msdb.dbo.sysschedules

Each table has an "end date" but each is in a different format. While it is possible to do what I want in a scheduled SQL task, Im wondering if anyone else has considered this or can offer an alternative solution.

 

Cheers

 

1 REPLY 1
d_gosbell
Super User
Super User

It's not advisable to directly edit the tables behind the PBIRS instance. A better approach is to use the supported APIs to alter the subscriptions. You can use the PowerShell Reporting Services Tools (see https://github.com/Microsoft/ReportingServicesTools). It has get-RSSubscription/set-RSSubscription cmdlets that would let you find and alter subsciptions.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.