• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

SQL Server Transaction Logging and Reporting

I would like to create a log of transactions over a given period on a table.  

I hope to log the ten largest tables in the database so I can gain an idea of activity and growth on the database.
1 Solution
Barry CunneyCommented:
Hi Alyanto
For logging activity against a table, use SQL Server Audit - create a Database Audit specification.

You can use the following SQL to get a list of largest tables.

SELECT OBJECT_NAME(OBJECT_ID) TableName, st.row_count
FROM sys.dm_db_partition_stats st
WHERE index_id < 2
ORDER BY st.row_count DESC

Open in new window

AlyantoAuthor Commented:
Cheers :)

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now