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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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