Solved

How to tell when a row was last updated

Posted on 2009-05-15
6
403 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

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

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
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.

635 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