Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL Server 2005 table last used

Posted on 2010-11-18
2
Medium Priority
?
415 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 2000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

If you having speed problem in loading SQL Server Management Studio, try to uncheck these options in your internet browser (IE -> Internet Options / Advanced / Security):    . Check for publisher's certificate revocation    . Check for server ce…
Recently, when I was asked to create a new SQL 2005 cluster, Microsoft released a new service pack for MS SQL 2005 what is Service Pack 3. When I finished the installation of MS SQL 2005 I found myself troubled why the installation of SP3 failed …
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Screencast - Getting to Know the Pipeline

972 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