SQL Profiler across multiple databases

  • Trying to figure out if any applications are hitting a database, when you set the filter for this database with DatabaseID it doesn't show any activity.  However, the DatabaseID is filtered by the "ID of the database specified by the USE statement or the default database".

    The problem with this is that what if we query the database from another database.  For example, I want to find activity for DatabaseB, but when I filter SQL Profiler with the DatabaseID for DatabaseB, it doesn't show activity when I run the query below :

    USE DatabaseA

    SELECT * FROM DatabaseB.dbo.TableB

     

    I tried using DatabaseName, but it shows more data than it should. Please help.

     

    Thanks.

     

  • How about closing all the databases.  Come back a while later.  If the db is on then it's used by someone.

  • Can't really do that on a production system.. 

  • I was reffering to something like the auto-close option.  Where it gets opened when needed, but I haven't been able to find a way to do something like this... anyone know how to do this (close with auto-restart).

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

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