Solved

SQL Server 2005 table last used

Posted on 2010-11-18
2
404 Views
Last Modified: 2012-08-14
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
Comment
Question by:alcindor
2 Comments
 
LVL 7

Accepted Solution

by:
keustermans earned 500 total points
ID: 34168647
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
 
LVL 2

Author Closing Comment

by:alcindor
ID: 34168991
This answers my question nicely, Thanks.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
SQL Server Remove all trailing commas 10 72
Problem with SqlConnection 4 160
Grid querry results 41 72
Replace Dates in query 14 20
by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
When writing XML code a very difficult part is when we like to remove all the elements or attributes from the XML that have no data. I would like to share a set of recursive MSSQL stored procedures that I have made to remove those elements from …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now