Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 419
  • Last Modified:

SQL Server 2005 table last used

Is there any way to determine the date/time when a table in an SQL Server 2005 database has been used (read from or written to) ?
0
alcindor
Asked:
alcindor
1 Solution
 
keustermansCommented:
The query below will indicate when last the data in a table changed and by whom.

SELECT OBJECT_NAME(OBJECT_ID) AS DatabaseName, last_user_update,*
FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID( 'Your Database Name')
AND OBJECT_ID=OBJECT_ID('Your Table Name')

0
 
alcindorAuthor Commented:
This answers my question nicely, Thanks.
0
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

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

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