Getting database accessed from profiler

  • Does anyone know how I track database access in Profiler so it shows the database being accessed. I tried Database name and ID with no avail.

     

    Thanks

  • You can filter your results by DatabaseID or DatabaseName.

    I prefer filtering by DatabaseID (DatabaseID equals <YourDatabaseID> rather than DatabaseName since I have noticed that sometimes SQL Server doesn't filter by DatabaseName properly.

  • How do I equate the database ID to a database? That is what I am trying to figure out. Thanks

  • USE master

    GO

    SELECT DB_ID(MyDB)

    John

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

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