3
votes

I have a requirement to start ssms (SQL Management Studio) from the command line that connects to a (localdb)\myinstance. The instance exists

sqllocaldb info myinstance

but using the command line and the -S parameter with (localdb)\myinstance throws an error.

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

I can connect using the named pipe but would ideally like to use the known name.

1
Do you have to share the instance? The only other thing I have found is something about (localdb)\.Luke Duddridge

1 Answers

1
votes

You can try the following: ssms -S LOCALHOST\myinstanceto connect to a LocalDb instance