Forum Discussion
Changing the Datasource from one SQL Server to Another Server for 100+ of Power BI Reports.
- 3 years ago
Hi. This might be a tricky thing to do. Usually when everything is at cloud you can do it. It might work if the reports only have one single source (the sql server to update) because otherwise it might be complicated to build the request.
The only way of doing this is building a script using the Power Bi Rest API. There is a request to update the data sources for a specific dataset. You can have the list of datasets to change the sever name and loop them posting this request: https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-datasources-in-group
Due to the fact that this might be on premise, there might be things with the gateway. Best case scenario would be just adding the source. Before starting I would suggest doing one without the loop to check if you must edit any credentials or create the source at gateway. Once that one is working continue with the script for all of them.
Developer/scripting skills are required for this task (any language programing)
I hope that helps,
Thanks. It really helped. I tried to create a power shell script to update on group, but ended with some error. So I used the API to manually for around 60 reports. Thank you so much..
Hi udhaya2089 ,
I am working on similar requirement and facing issues achieving this . would it be possible to share your script here please.