Migrating a database table with timestamp columns

I am migrating a SQL 2008 R2 database between software versions (from 6 years to the current schema). They have several audit tables with SQL TimeStamp columns. I do this by copying data from the source tables into a new structure - the change is quite difficult, as you might expect in 6 years.

Is there a way to keep the timestamp fingerprint when I switch to a new database, or is there a better way to track the tracking of this data?

thanks

+4
source share
1 answer

You can convert timestamp to varbinary(8) to save it:

 select cast([timestamp] as varbinary(8)) 

But the meaning of the timestamp itself is not particularly useful: it does not translate at a specific time. In the future, MSDN suggests renaming it to a more suitable rowversion .

+4
source

All Articles