SQL Profiler

  • I am trying to use the SQL Profiler with the default template.  It does not matter what Database Name Like <dB name> Filter I choose, when I run the Profiler it just spits out all activity on all databases on the server I chose to run Profiler on.   It also does not show what database name each trace row is recording.  What is the trick to filter the Database Name?  Is it possible to only trace one database name?  Why am I getting activity traced from all the other databases on this SQL 2000 Server running on Windows 2003 Server?

  • Try filtering on databaseID.  You can find it out with the sp_helpdb <database name> command, the dbid column.  That works better for me.

    Kathi 

    Aunt Kathi Data Platform MVP
    Author of Expert T-SQL Window Functions
    Simple-Talk Editor

  • I once read that this is due to a bug in Sql2k - something to do with the order in which filters are processed.  I always have this problem and usually use the Group facility instead (in the 'Data Columns' tab, move DatabaseName to the top of the list so it falls under 'Groups').  It's not ideal, but does the job if you are just running the trace for a short period of time.

    It will still return everything, but at least all the traces for the database you are interested in will still be together.

    Hope that helps,

    Martin

  • Hi, have had similar problems and used the option where database name 'not like' as opposed to 'like' and listed all the others.  Depends how many you have I guess...long winded but worked.

  • As KAthi said, I would use the DBID instead.



    Shamless self promotion - read my blog http://sirsql.net

  • for some reason, the like database name filter has never worked for me.  yeah, the advice given of using the database ID works well.  look in sysdatabases in the master database to find the ID of the right database.  Good luck.

  • see if you can put your requirements in the text field. I used to have a similar situation, but even limiting to dbid and objectid( that what i also had) didnt do the trick. Only text did.

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply