Monthly Archives: July 2014

Profiling LocalDb

I have become quite enamoured with LocalDb and find myself preferring to use it over SQL Server or SQL Server Express. It was created for developers, so it kinda makes sense that I’d adopt it.

My first hitch came when I tried to use SQL Server Profiler to profile LocalDb. The tricky bit was connecting. A bit of Googling sorted me out and here are the steps:

  1. open the Visual Studio Command Prompt and enter Sqllocaldb info MSSQLLocalDB
  2. one of the details returned will be Instance pipe name. Copy that value to clipboard. For me it was np:\\.\pipe\LOCALDB#3B4A343D\tsql\query
  3. Open SQL Server Profiler and start a new trace. In the Server Name textbox of the Connect To Server dialog which launches, paste the pipe name.

And that’s it!

Note: if you have version 11.0 on your machine, the command to enter is Sqllocaldb info v11.0