SqlConnectionLocalDB shared instance

Both automatic and named instances of LocalDB can be shared.

Server=(localdb)\.\MyInstanceShare;Integrated Security=true;

Use SqlLocalDB.exe to share or unshare an instance. For example execute SqlLocalDB.exe share "MyInstance" "MyInstanceShare" to share an instance.


This connection string (LocalDB shared instance using SqlConnection) can be used for connections to SQL Server 2012, SQL Server 2014 and SQL Server 2016.

Articlesread all »

Not the right connection string for you?

Start over in the connection string reference index.

You can also get help in the Q&A forums where you can ask your own question.

The kb articles contains how-tos and instructions and you can search for anything if you're not sure were to look.