Solved

How to tell when a row was last updated

Posted on 2009-05-15
6
398 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

 
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

751 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