last query fired at a database

  • Hi All,

    Do you have any way to know the text of the last query that was fired at a SQL Server 7.0 database?

    In Oracle a user having DBA role is allowed to query a special table v$sql to get the queries that are fired at the database. What do you do in SQL Server ?

    Thanks & Regards,

    Abhijit

  • This was removed by the editor as SPAM

  • the inputbuffer has the values for each user. Not for the database. Guess you could query sysprocesses to find out who had the last query (there's a timestmap in here) and then get their inputbuffer (dbcc inputbuffer)

    Steve Jones

    sjones@sqlservercentral.com

    http://www.sqlservercentral.com/columnists/sjones

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

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