none
Connecting Localdb using Sql Server Management Studio Express

    Question

  • Hello Guys,

    Wanna know how do I connect 2012 LocalDB to Sql Server Management Studio Express got the 2005 version? The DB engine does not get populated in the object explorer-connect to server. Any help appreciated...

    Tuesday, April 03, 2012 10:12 AM

Answers

  • Hi,

        Try (localdb)\V11.0   as the server name.

        Note.., the instance name V11.0 is case sensitive    Capital V   then 11.0 

    • Proposed as answer by Chevex Wednesday, September 26, 2012 7:22 PM
    • Marked as answer by Papy NormandModerator Friday, September 13, 2013 10:03 PM
    Friday, August 31, 2012 8:03 PM
  • You can connect SSMS 2005/2008 to a LocalDB (2012) instance using named pipes.

    1. Get the address of a (localdb) instance by running the following command:

    "C:\Program Files\Microsoft SQL Server\110\Tools\Binn\SqlLocalDB.exe" info [InstanceName]

    (if its the default instance you're interested in, specify v11.0 as the [InstanceName]

    2. Copy the value returned in the "Instance pipe name", e.g. np:\\.\pipe\LOCALDB#13E05E01\tsql\query

    3. Add a new server registration in SSMS and paste the "Instance pipe name" value as the Server Name.
    NOTE: It is not necessary to specify "Named pipes" as the protocol. SSMS should detect the appropriate protocol for you.

    Monday, April 30, 2012 7:35 AM

All replies

  • have you installed SSMS 2012 ?

    http://uk.linkedin.com/in/ramjaddu

    Tuesday, April 03, 2012 10:30 AM
  • hi, the below link may help you.

    http://stackoverflow.com/questions/360141/how-to-connect-to-local-instance-of-sql-server-2008-express

    Monday, April 16, 2012 4:39 PM
  • You can connect SSMS 2005/2008 to a LocalDB (2012) instance using named pipes.

    1. Get the address of a (localdb) instance by running the following command:

    "C:\Program Files\Microsoft SQL Server\110\Tools\Binn\SqlLocalDB.exe" info [InstanceName]

    (if its the default instance you're interested in, specify v11.0 as the [InstanceName]

    2. Copy the value returned in the "Instance pipe name", e.g. np:\\.\pipe\LOCALDB#13E05E01\tsql\query

    3. Add a new server registration in SSMS and paste the "Instance pipe name" value as the Server Name.
    NOTE: It is not necessary to specify "Named pipes" as the protocol. SSMS should detect the appropriate protocol for you.

    Monday, April 30, 2012 7:35 AM
  • Hello,

    I am not sure that server registration is working with SSMSEE 2005 ( which is not upgradeable to SSMSE 2008/2008 R2 )

    Useful link :

    http://blogs.msdn.com/b/sqlexpress/archive/2011/10/27/net-framework-4-now-supports-localdb.aspx

    On the same blog, you will find useful several articles about the use of LocalDB

    Have a nice day


    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.

    Wednesday, May 02, 2012 9:27 PM
  • Hi,

        Try (localdb)\V11.0   as the server name.

        Note.., the instance name V11.0 is case sensitive    Capital V   then 11.0 

    • Proposed as answer by Chevex Wednesday, September 26, 2012 7:22 PM
    • Marked as answer by Papy NormandModerator Friday, September 13, 2013 10:03 PM
    Friday, August 31, 2012 8:03 PM
  • I am grateful to Daniel for his answer but yours Ramesh is so much simpler and works like a charm.

    Note: for me "v11.0" had a lower case 'v'.

    Wednesday, September 26, 2012 7:23 PM
  • Thank you, you are my new hero!
    Wednesday, December 12, 2012 8:12 AM
  • This works only if SSMS 2012 is installed.

    programmer

    Thursday, December 13, 2012 7:31 AM
  • Thanks to everyone here for your suggestions and support.

    Although Ramesh option is more fancy, Daniel's more effective as it is not related to upper nor lower cases.

    Just remember to copy everything in the output starting with the "np:\\"

    Sudhev, I tried Daniel's option with a SQLServer 2012-LocalDB instance, using SSMS 2008R2 and it registered perfectly.

    Regards.-

    Friday, January 11, 2013 10:08 PM
  • Tried it on SSMS 2008 R2 and it works. Thanks!
    Sunday, April 28, 2013 7:36 AM
  • Thanks a lot! Ramesh Nadella
    Friday, September 13, 2013 8:13 PM
  • Excelent... thank you!

    Friday, October 18, 2013 6:58 PM
  • Its March 2014 and I have an update for SQL Server 2014 Express LocalDB:

    Use ServerName = (LocalDb)\MSSQLLocalDB
    to connect to the default LocalDb 2014 instance with SQL Server Management Studio. Using (LocalDb)\V11.0 does not work!
    using (LocalDb)\MSSQLLocalDB also works as the server name when creating an ODBC data source with the V11 Native Client drivers.

    How did I find this out ?
    Browsing the internet I found that the executable for LocalDb is: SqlLocalDb.exe
    Executing the command:> where SqlLocaldb.exe ;revels the location of the server executable in:
    "C:\Program Files\Microsoft SQL Server\120\Tools\Binn\SqlLocalDB.exe"
    You can get more help on SqlLocaldb.exe with the command:> SqlLocaldb -?

    Executing the command:> SqlLocalDB.exe info MSSQLLocalDB ;Will yield the the named pipe that the (LocalDb)\MSSQLLocalDB instance is configured for.
    in my case: Instance pipe name: np:\\.\pipe\LOCALDB#E965B440\tsql\query.
    Leave out the leading "np:", so the pipe name I used was: \\.\pipe\LOCALDB#E965B440\tsql\query

    It turns out that (LocalDb) is a build in alias for the following directory:
    "C:\Users\<user>\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\"
    And the default LocalDb instance created during installation is found in:
    "C:\Users\<user>\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\MSSQLLocalDB"

    A new LocalDb instance created with the command:> SqlLocalDb.exe create <NewInstanceName> ;is stored in:
    "C:\Users\<user>\AppData\Local\Microsoft\Microsoft SQL Server Local DB\Instances\<NewInstanceName>
    This new instance can be connected to with ssms by specifying ServerName=(LocalDb)\<NewInstanceName>


    Software Developer

    • Proposed as answer by Steve Falzon Sunday, July 20, 2014 8:36 AM
    Saturday, March 29, 2014 11:33 PM
  • Its April 2014 and I just installed my first version of MSLocalBD and SSMS - installing is a breeze but then progress halted.

    So I've been looking and surfing for the proper ServerName to be used in the 2014 versions of SSMS but couldn't find it untill I hit your entry.

    Your extrea explanation makes it easier to complete the picture - thanks for the effort! 

    Sunday, April 13, 2014 12:03 PM
  • David R, thanks for a very comprehensive answer, without it I suspect I would have spent several more hours looking as the instance of mssqllocaldb wasn't running, I had to start it to connect. Perhaps I should have known that. I assumed, incorrectly, it would be running as I had just successfully created and populated the database. It appears it's started and stopped automatically by EF.

    thanks

    Steve

    Sunday, July 20, 2014 8:42 AM