November 18, 2013 at 10:18 pm
How to check that how many raw are inserted, updated, deleted in last one hours for all the databases of Server ?
Regards,
Arjun
November 19, 2013 at 4:00 am
Do you have some sort of auditing enabled on the instance?
Auditing = Auditing, Profiler Trace, XEvents, Triggers
November 19, 2013 at 6:53 am
Without some sort of auditing process in place - it's gonna be extremely difficult to get what you want.
You could examine the transaction log with fn_dblog but transaction logs get truncated, unless they're not being taken care of.
November 19, 2013 at 7:02 am
like SQLSACT said, you need something in place already to get "by hour" counts.
for example, this query gets the # of rows in each table. if you saved the results in a table, you could subtract the differences compared to each time you ran this process,and get your totals...so you could have something going forward, but nothing to report the past, since it was never captured.
most likely, you really only want to report on three or four tables related to your processes, and not *all* tables.
Select OBJECT_NAME(object_id) as TableName,SUM(rows) as NumRows,index_id
From sys.partitions p
Inner Join sys.sysobjects o
on p.object_id = o.id
Where index_id in (0,1)
And o.type = 'U'
Group By object_id,index_id
Order By NumRows Desc
Lowell
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply