I know the SYSOBJECTS table has a CRDATE field for the table creation date. Is there a built-in way to tell when a table was last updated? (by built-in, I mean without triggers and code).
-thanks
As a follow-up note, what I *really* need to know is not so much when, but if a table has changed. Perhaps one of the other fields in the SYSOBJECTS record changes every time there is a change in the table?? Then I would just have to keep track of this value.
SQL Server has TIMESTAMP datatype which can be used in tables. With SQL Server 2000 the TIMESTAMP is really being called it's true name ROWVERSION as it's not a true time.
This value gets updated everytime there is a change made to the row.
Refer to the BOL on TIMESTAMP and ROWVERSION
-SQLBill
BOL=Books OnLine=Microsoft SQL Server's HELP
Installed as part of the Client Tools
Found at Start>Programs>Microsoft SQL Server>Books OnLine
Thanks Bill. Yes, I knew about the [timestamp] column but was hoping to save the 8 bytes per row since I don't need to know specifically what row changed. Heck, disk is cheap so this is the way I'll go.
-thanks again.
You might also be able to use Profiler to create a trace file that could capture when UPDATES are done to a table. I've never done that myself, so I wouldn't be able to help - but it might be worth looking at.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.