Forum Discussion
MIN
4 years agoRegular Visitor
How to connect to any available database when primary one is offline
I have 2 identical SQL databases on 2 server. PBI gateways are installed on each server and registered under same cluster for alternate routing purpose.
I setup connections to each database and count rows of each identical tables to detect the connection is OK aiming to select one of any available database.
The issue is, when primary database is offline, "try Sql.Database("address","database")" do not catch the error and the schedule refresh fails showing "Invalid Connection Credentials"; error code = -2147467259 and it was not able to route to next database.
In this case, can we catch that error in Power Query OR is there any solution for routing the request to any online database for redundancy purpose?