How to trace LocalDB

Sep 11, 2013 at 2:51 PM
I was a little lost trying to connect to LocalDB, so as a documentation: when visual studio works with mssql database file, it starts the LocalDB server (somewhere \Program Files\Microsoft SQL Server\110\LocalDB\Binn\sqlservr.exe), its server address for connection is
(LocalDB)\v11.0
It can be also seen as a data source in the connection string, created by VS.
Sep 12, 2013 at 11:18 PM
I've attempted to connect with the same string but the application throws an unhandled exception.
Sep 18, 2013 at 9:36 AM
Edited Sep 18, 2013 at 9:38 AM
Is LocalDB server started? Check it in task manager.
Can VS connect to it?
Sep 23, 2013 at 1:37 AM
I can connect to, view, query and modify the DB through through SQL Express, Visual Studio Express 2012 and via the browser.

Do I need to explicitly start the LocalDB instance as well? I'm fairly new to (and still confused by) the LocalDB vs .SQLExpress instance.

In any case, the server name for both SQL and my web.config use (LocalDB)\v11.0.
Sep 23, 2013 at 5:10 PM
Edited Sep 23, 2013 at 5:15 PM
I connect to an already running instance of localdb, started by VS. I probably don't have sql express, as .\SQLExpress doesn't connect.
Sep 25, 2013 at 10:30 AM
Not helpful. :) If I wasn't connected my guess is the app wouldn't run, the db wouldn't update and I wouldn't be seeing DB connected in VS.

Oct 16, 2013 at 11:50 PM
Edited Oct 16, 2013 at 11:54 PM
After some googling I could connect it.

I followed the steps in this link to get the "Server" connection.

Try the following:
  1. Open the command prompt and type: Sqllocaldb info v11.0
  2. It returns some data, but the important here is the "Instance pipe name". That is the server connection. In my case is something like "np:\.\pipe\LOCALDB#1243324\tsql\query"
  3. Finally paste it in the server field of the ExpressProfiler.
Good luck.
Jun 18, 2014 at 12:49 PM
It could also depend on whether you installed 64-bit sql components as VS is 32-bit, but ExpressProfiler can run as 64-bit.