LLI Wiki — My Digital Knowledge Base

SQL Server LocalDB: start and inspect an instance with sqllocaldb

sqllocaldb commands to show the state, start a LocalDB instance and connect to (localdb)\MSSQLLocalDB.

sqllocaldb is the command-line utility that manages SQL Server Express LocalDB instances. Use it to check an instance, start it and find the connection name.

sqllocaldb info MSSQLLocalDB
sqllocaldb start MSSQLLocalDB

The short forms i and s are equivalent to info and start.

To connect to the default instance from SSMS, sqlcmd or a connection string, use this server name:

(localdb)\MSSQLLocalDB
Mastodon LLIMastodon SocialFosstodon