SQL Server 2000 Whole Table Time Stamp

  • To All

    Is there a native function in SQL Server 2000 that keeps track of a table data, i.e., it would change if a record is updated, inserted or deleted!

    I know I can create a trigger on these events and store the table name and datetime or timestamp in another table, but I was wondering if such a function already there.

    Thanks for your help!

  • To the best of my knowledge unless undocumented there is no such function or feature already built into the table rows themselves.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • Not sure if this fits what you're asking, but a timestamp/rowversion column will change each time any part of the row changes. Useful for doing optimistic locking.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • Yes every time a record is added or updated the timestamp will increase.

    So by remembering what the last timestamp was you can very easily check wich columns have been updated

  • Thanks a lot all. I am talking about table level time stamp or marker, not record level. Whenever a table is changed in any way this marker changes.

    For example, if you have a lookup table in a a database that is accessed remotely, I would download the table to the client computer and access it from there. During the client log in I would like to check if this table has changed, then I can download.

    Thanks again

  • Tables dastetime stamp for creation is not updated in anyway. ANd there is no modified datetime which I have put into MS for request in future version.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

  • Agree. We've got a couple places where we cache data and only want to pull it if changed, eventually built our own versioning scheme - basically we know that once populated for a specific version it will never change, will just get superceded by a newer version.

    Andy

    http://www.sqlservercentral.com/columnists/awarren/

  • I was almost certain that there is a function or something that return this info, I just couldn't find it! Thanks for the info, it certainly saved me the extra effort.

Viewing 8 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic. Login to reply