SQL Server Express – No Profiler!

January 21, 2013

SQL Server express is great – It lets me develop SQL databases on a system that very closely matches the ‘real thing’ for zero cost. One thing sadly lacking is profiler, which is a pain and in my opinion an odd move to leave it out. I use profiler on production systems for troubleshooting, and often during development when I have the luxury of working on a full SQL product.

I’ve found a workaround for this situation – Its far from ideal (i.e. Not as convenient or flexible as profiler), but does give you a log of server activity, which removes some of the uncertainty – e.g. At the moment I’m developing my first entity framework web site – I want to see what SQL queries the ORM is running on my behalf.

1) Connect to your SQL instance, open a query window, run: dbcc traceon(3605, -1)

2) Examine C:\Program Files\Microsoft SQL Server\MSSQL10_50.SQLEXPRESS\MSSQL\Log – You’ll find a log file for every day.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: