I cannot connect to a SQL Server 2017 (14.0.1000.169) Local DB shared instance.
I tried on a laptop that previously had some SQL Server Express and stuff that I all have uninstalled. And also on a fresh Win10 VM.
Both always have the same error:
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Named Pipes Provider: Could not open a connection to SQL Server 2. .
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login timeout expired.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
This error is from SQLCMD
but I've also tried with SSMS and Visual Studio connection string.
I tried connecting with the owner of the instance and could not. Also tried with a SQL Login with sysadmin right and could not.
I can only connect with the pipe name.
I also tried everything from:
- Why can't I connect to a SQL Server 2012 LocalDB shared instance? on Stack Overflow
- SQL 2016 sp1 SQLLocalDB versions errors with "Windows API call "RegGetValueW" returned error code: 0." on MSDN Forums
Why can't I connect?