使用 localdb 的命令行启动 ssms 不起作用

Command line start ssms with localdb does not work

我需要从连接到 (localdb)\myinstance 的命令行启动 ssms (SQL Management Studio)。该实例存在

sqllocaldb info myinstance

但是在 (localdb)\myinstance 中使用命令行和 -S 参数会引发错误。

PS C:\workingArea> ssms -S(localdb)\myinstance
localdb : The term 'localdb' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:9
+ ssms -S(localdb)\myinstance

我可以使用命名管道进行连接,但最好使用已知名称。

您可以尝试以下操作:ssms -S LOCALHOST\myinstance连接到 LocalDb 实例