Solved

How to tell when a row was last updated

Posted on 2009-05-15
6
389 Views
Last Modified: 2012-05-07
What is the best way to find out when a row was last updated when I have read-only access to a DB?

0
Comment
Question by:stephi01
6 Comments
 
LVL 1

Accepted Solution

by:
whittet earned 500 total points
ID: 24399714
At minimum the table in question must have a datetime column with default set to now() or date().  

If your table doesn't have this yet, I think you're out of luck.
0
 
LVL 31

Expert Comment

by:RiteshShah
ID: 24401168
whittet,

his database is readonly so no matter when his row is going to update, field will not get update anyhow. I don't think so this is possible in this perticular case.
0
 
LVL 1

Expert Comment

by:whittet
ID: 24401210
The question clearly stated that only reading data was to occur.  My prior comment is intended to allow inspection of SQL 2005 configuration (i.e. DDL) to determine whether a particular datetime field was populated with the relevant time stamp.
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 31

Expert Comment

by:RiteshShah
ID: 24401241
whittet,

you are right indeed, I wasn't arguing that you were wrong, I just wanted to update Author that it is somehow not possible with any DMVs or anything else, if he has updated timestamp or other datetime field, he is not able to do so.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 24402989
>>his database is readonly so no matter when his row is going to update<<
Actually, no.  The author stated they "have read-only access to a DB" which is not the same as the "database is readonly".

But unless they have some way of identifying when a row is changed it really does not matter.
0
 

Author Closing Comment

by:stephi01
ID: 31582106
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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how the fundamental information of how to create a table.

820 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