Assume that you use the SqlLocalDB feature in Microsoft SQL Server 2019 or 2017. In this situation, you can't start correctly or connect to a shared instance of SqlLocalDB.
This problem is fixed in the following cumulative updates for SQL Server:
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
This issue occurs when you try to connect to a shared instance of LocalDB.
REM Create named instance FOO
SqlLocalDB.exe create FOO
REM Run the following command from an elevated command prompt
REM Share instance FOO as FOOSHARED
SqlLocalDB.exe share FOO FOOSHARED
When you run the following command, you may receive an error message as shown below:
SqlCmd.exe -S (localdb)\.\FOOSHARED -E
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Named Pipes Provider: Could not open a connection to SQL Server . .
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..
Learn about the terminology that Microsoft uses to describe software updates.