为啥我无法连接到 SqlLocalDB?
Posted
技术标签:
【中文标题】为啥我无法连接到 SqlLocalDB?【英文标题】:Why can I not connect to SqlLocalDB?为什么我无法连接到 SqlLocalDB? 【发布时间】:2017-07-30 16:44:06 【问题描述】:我创建并启动一个 SqlLocalDB-Instance
C:\Program Files\Microsoft SQL Server\110\Tools\Binn\SqlLocalDB.exe c proconact -s
当我跑步时
C:\Program Files\Microsoft SQL Server\110\Tools\Binn\SqlLocalDB.exe info proconact
我明白了
Name: proconact
Version: 11.0.3000.0
Shared name: proconact
Owner: SUNNY-AME\sunny
Auto-create: No
State: Running
Last sttart time: 09.03.2017 16:40:30
Instance pipe name: np:\\.\pipe\LOCALDB#SH2D214E\tsql\query
当我尝试连接时
"C:\Program Files\Microsoft SQL Server\110\Tools\Binn\Sqlcmd.exe" -S (LocalDB)\.\proconact -E
或
"C:\Program Files\Microsoft SQL Server\110\Tools\Binn\Sqlcmd.exe" -S (LocalDB)\proconact -E
我总是收到以下错误:
Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Named Pipes Provider: Could not open a connection to SQL Server [2]. .
Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Login timeout expired.
Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : 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..
希望有人能帮助我,我能做些什么。
【问题讨论】:
【参考方案1】:你需要使用:
-S "(LocalDB)\proconact" -E
【讨论】:
以上是关于为啥我无法连接到 SqlLocalDB?的主要内容,如果未能解决你的问题,请参考以下文章