Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a simple C# app that iterates through all databases on a server examining their schema. As such it performs a SELECT name from sys.database, iterated through those and does a SELECT name from sys.tables WHERE name='Something'. Then if it finds the table its looking for it does some queries, and does stuff with the data.

The connection string has an application name. If I setup a trace with a column filter on that application name looking for start/complete transaction, start/complete stored procedure, and complete statement. I see the queries I perform on the actual database tables, but not the queries to sys.databases and sys.tables.

share|improve this question
The book "Mastering SQL Server Profiler" by Brad McGehee can answer your questions on profiler. The PDF download is free. – MarlonRibunal May 11 '12 at 21:26
up vote 2 down vote accepted

There's nothing inherent in Profiler that would prevent those queries from being displayed. I think you're just not catching the right events. It sounds like you're filtering for Stored Procedure events. Try also filtering for TSQL events.

share|improve this answer
Yes I'm going with it was a PEBKAC error. – Justin Dearing Dec 10 '14 at 14:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.