SQLTeam.com | Weblogs | Forums

SQl Query


#1

Hi. I need SQL query to get all tables in DB effected in last 15 minutes


#2

This is not possible as stated. You can do it if you have tracing on, but it is not straight forward.


#3

As @djj55 stated, the information is not available as it is. You can use SQL Profiler or trace to record all query for the required time frame. Output the result to a staging table and then query from that


#4

DDL Changes can be tracked easily by using SYS.Tables

SELECT * FROM sys.tables
WHERE datediff(minute,modify_date,getdate()) < 16