Forum Discussion
Cannot connect to LocalDB with Power BI Desktop
I have a similar issue. Just started after working fine. Did not update PowerBI or SQL Server.
There seems to be an identity issue but I am not sure what or where. If I first connect with SSMS the connection works fine and I can run queries in SSMS. However if I then try and connect to the same database from PowerBI I get the following error.
DataSource.Error: Microsoft SQL: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start.If I disconnect SSMS and kill the sqlservr.exe process associated with my windows account then the query that has just failed in PowerBI works perfectly. However, if I now try and connect again with SSMS, it fails to connect with a similar error message
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 50 - Local Database Runtime error occurred. Error occurred during LocalDB instance startup: SQL Server process failed to start.
) (Microsoft SQL Server, Error: -1983577846)My deduction from this is that the two applications are somehow running as two different verions of my Windows Identity (don't ask me how - and note that the username reported in Task Manager is identical) so that when the other connects, it does not recognise the previous connection's process and rather tries to start a new process, which then fails to start as per the error messages.
Has anyone come across this? Need a resolution urgently as I need to get a report out, but PowerBI is not build for developing and testing native sql queries