April 6, 2009 at 8:58 am
Hello all,
I am needing help reading SQL Profiler... We are needing to know what databases are being used on the server so we decided to use Profiler and just monitor Audit Logins and Audit Logouts... I saw where you can limit your trace down to the database level when you filter Database Name --> Like --> and I put the database name that we were seeing if it was used or not... However when I start the trace thinking that this will work, I notice as it starts tracing for every login that under the databaseID column that there are different database id's... So does this mean that it is tracing different database logins that are on that server or ??? I have no clue. This is my first time using Profiler!
So if someone can tell me how to correctly use the Profiler to use it to trace logins on a particular database OR if someone can tell me how to figure out which of the Database ID goes with each database? It is greatly appreciated! Thanks
April 6, 2009 at 9:29 am
??? Any help guys???
April 6, 2009 at 10:00 am
Does anyone have a solution to my problem???
Thanks
April 6, 2009 at 3:40 pm
Adam,
The solution is to filter by Database ID.
In the past I did not have luck with Database Name and always used Database ID for Profiler. Today I tried to do what you said: selected Audit Login and Audit Logout and Existing Connections events and filtered on the Database Name, setting it to one of my databases. This DB ID is 9 (just for the reference). At first I thought it worked because only connections with DB ID = 9 and the specified DB name were shown. But then I got logout events for the DB ID = 5 (???) . After that I logged in to another database with DB ID 7 this login was not recorded by Profiler. BUT... the logout event was recorded (???)
Not sure what is the reason for this behavior, but it sort of confirms what you say.
Just to clarify, I selected all 3 event's checkboxes for both Database Name and Database ID columns to trace.
Please try to use Database ID for filtering and let us know if it helped.
Yelena
Regards,Yelena Varsha
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply