statistics of a database

  • Is there a way to find out the statistics of all the tables in a given database.

    Can we also get the information as how many times what table/column was updated in a given year in a given database ( I guess not but not sure)

  • Are you talking about DDL commands?

    -Roy

  • Not exactly. I want to know how the database was used in the recent time , the kind of updates that were done on various tables ......so I was looking for statics which could explain the same.

  • Unless you trace for specific events or setup triggers, the only thing that I can think of that may be of use is the sys.dm_db_index_usage_stats system view. This will show you number of updates and "selects".

  • You'll have to walk through the database using some type of cursor and calls to DBCC SHOW_STATISTICS in order to look at the database statistics.

    As already stated, unless you put something in place, trace events, triggers, or 2008 change data capture, there's no way after the fact to determine what data has been changed.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

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

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