I have .\SQLEXPRESS installed, but the code assumes that I have a server named (LocalDB)\MSSQLLocalDB.
How do I create an alias so that I don't have to install SQLLocalDb ?
Start Sql Server configuration manager
Add an alias for the 64-bit SQL Native Client Configuration with the following parameters (see screenshot). Try the 32-bit if this doesn't work.

Properties screen:
Alias Name - (LocalDB)\MSSQLLocalDB
Pipe Name - \\.\pipe\MSSQL$sqlexpress\sql\query
Protocol - Named Pipes
Server - .\SQLEXPRESS
There is an additional step if you have (LocalDB)\v11.0
installed but you want to create an alias (LocalDB)\MSSQLLocalDB.
You should first work out the pipe name for (LocalDB)\v11.0 as
it varies from machine to machine.
C:\>"C:\Program Files\Microsoft SQL Server\110\Tools\Binn\sqllocaldb.exe" info v11.0
Name: v11.0
Version: 11.0.2318.0
Shared name:
Owner: SOMEDOMAIN\Some.User
Auto-create: Yes
State: Running
Last start time: 13/01/2016 1:38:36 PM
Instance pipe name: np:\\.\pipe\LOCALDB#14A493ED\tsql\query
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With