?
Solved

SQL2000 know last data modification

Posted on 2011-10-11
5
Medium Priority
?
488 Views
Last Modified: 2012-05-12
Hi,
There's a way to know the date of the last row was add or modify on a MS SQL 2000 database/table?
Thanks
0
Comment
Question by:hvillanu
5 Comments
 
LVL 17

Accepted Solution

by:
Barry Cunney earned 750 total points
ID: 36952092
The following shows date of  last statistics update for a table - If your table has an index this may help

SELECT 'Index Name' = i.name, 'Table Name' = o.name,  

'Statistics Date' = STATS_DATE(i.id, i.indid)  

 FROM sysobjects o, sysindexes i  

where o.id = i.id
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 36953091
>>There's a way to know the date of the last row was add or modify on a MS SQL 2000 database/table?<<
No.
0
 
LVL 15

Assisted Solution

by:Anuj
Anuj earned 750 total points
ID: 36955182
There is no way to get this details unless you have designed auditing based on DML triggers on the table.  
@BCUNNEY, you cannot relay on STATS_DATE for this because it only says about the date when the statistics are Last updated, Also statistics are not update each time when you do inserts.
0
 
LVL 5

Author Comment

by:hvillanu
ID: 36956046
@BCUNNEY... they helps, but not accurate... the difference between statistics date and datadevice/logdevice date was over +1 day.
Thanks any way.
0
 
LVL 5

Author Closing Comment

by:hvillanu
ID: 36958986
Good if checking statistics update dates
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When trying to connect from SSMS v17.x to a SQL Server Integration Services 2016 instance or previous version, you get the error “Connecting to the Integration Services service on the computer failed with the following error: 'The specified service …
This shares a stored procedure to retrieve permissions for a given user on the current database or across all databases on a server.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

864 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