Monday, May 13, 2019

Error: PowerBI does not refresh report via schedule.

Recently started working closely with PowerBI and got very strange error when tried to refresh reports on a schedule.


The message actually says:
"Several errors occurred during data refresh. Please try again later or contact your administrator."

SessionID: 1b80301e-3898-417a-af9c-2e77ec490728
[0] -1055784932: Credentials are required to connect to the SQL source. (Source at SQLServerName;DBA_Pro.). The exception was raised by the IDbCommand interface.
[1] -1055784932: The command has been canceled.. The exception was raised by the IDbCommand interface.
[2] -1055784932: The command has been canceled.. The exception was raised by the IDbCommand interface.

In my case the cause of the problem was very silly thing. PowerBI Server assigned only one data source connection string to my report, while in my report I had two data sources with only the difference in a Database Name capitalization:

In order to fix that I had to open each of my queries, which referred to capitalized "DBA_PRO" database and change it to "DBA_Pro".

As soon as I fixed all queries I've got only one data source in my report:

And after re-uploading it to the server my schedule nicely updated the report:


Hope it helps a lot of people.