query execution

  • 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:

  • 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.

  • This is a double post. Let's try and keep everything in one thread, here. Especially since this is a SQL Server 2000 question, it really doesn't belong in a SQL Server 2005 forum.

  • 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


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

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

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