March 25, 2009 at 8:22 am
hi experts 🙂 ,
Last day we had got a problem with our database.The passwords of our live application got resetted.And now i just want to check which all queries we had executed the very last day.I mean i want to know which all queries the application team had executed for past one day.Can anyone help me finding out this??? 🙂
The database of application is in an sql server 2000.
[font="Comic Sans MS"]+++BLADE+++[/font]:cool:
March 25, 2009 at 10:31 am
The only way I know of getting this info is if you had some kind of trace going on the box at the time the query occurred. You may be able to glean some information, but not the exact query with:
Select * from ::fn_dblog(null, null)
provided you have the transaction log for the Master DB available. This is not a very likely scenario though, since the Master DB is always in Simple recovery mode and the transactions go away at the next checkpoint.
Perhaps some else, more knowledgable than I, can help.
Chris
Learning something new on every visit to SSC. Hoping to pass it on to someone else.
March 25, 2009 at 10:43 am
Stamey is right;
sql server does not keep track of queries that were executed, or when a view/function/procedure was last used. You HAVE to have a trace running PRIOR to the SQL statement being called in order to track it.
the log would have any Updates/Deletes in it...IF the database recovery mode is set to FULL and not SIMPLE....if it's simple, then again, you'd have to have a trace set up before hand to track changes.
Lowell
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply