As a part of my VS2019 installation, I had LocalDB v13 (SQL Server 2016) on my machine. I could share a named instance and I could -
- login to the shared instance (in SSMS) with Server Name - (LocalDB)\.\SharedName
- access a database from my .NET Core app with connection string -
"Server=(LocalDB)\.\SharedName;Database=MyDB;Trusted_Connection=True;"
- host the app in a Windows Service running under a different user account and access a database with above connection string
Recently, I uninstalled the v13 and installed v15 (SQL Server 2019). Created new instance and shared it as before, but I cannot do anything listed above.
When I try to login through SSMS, I meet with the following message -
When I try to access the database from my .NET Core app, an exception says -
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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
and similar message in Event Viewer with Window Service hosting.
I tried v14 (SQL Server 2017) too. Same result as v15.
Is there something new with LocalDB v14 and v15 when sharing an instance which I might be missing? I checked the documentation(Connect to a shared instance of LocalDB) but couldn't find anything helpful.
How do I solve this issue? Thanks.