I’m building a project using entity framework and wanted to ensure it wasn’t going mental and spamming the database with more queries than it should- this requires SQL Profiler, but i didn’t know how to connect it to my local instance of sql (I had just added an MDB file to the app’s app_data folder, so it was running via local sql express)
Turns out it’s easy- you just connect to .\SQLEXPRESS database and then execute this query against the master database;
SELECT owning_principal_name, instance_pipe_name FROM sys.dm_os_child_instances
From the results you will be able fish out the “named pipe” that you can just put into the server name box when connecting with profiler.

Sql Profiler connection dialogue
via Brad Wilson: Profiling SQL Server Express User Instances.
Related posts: