SQL Profiler

  • How can I capture sesssions to and from a particular Database (excluding all others) in a SQL Profiler trace?

  • when you create the trace, in the Filter Tab select DatabaseID Like "Yourdatabase ID"

    AND check Exclude system IDs


    * Noel

  • I tried that..  actually I tried filtering on  DatabaseName because DatabaseID requires a numberic value and I don't know what that is.    When I filtered on DatabaseName, it returned ALL Database connections.   not sure what I'm doing wrong.

  • not sure about database name but:

    select db_id() -- gives you the number you need when runned on the desired db

     


    * Noel

Viewing 4 posts - 1 through 3 (of 3 total)

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