Search code examples
sql-serverentity-frameworkazure-sql-databaseazure-data-sync

timestamp vs date column sql azure for data sync and optimistic concurrency


Using Sql Azure with entity framework. Most of our tables have a date column where we store when the record was edited and by whom. Is there a benefit of making those columns into a timestamp column for the following reasons

  1. Does timestamp help if we want to synchronize this db with another db with SQL Data Sync i.e. if we have a timestamp column that we can use both for our logging and data sync especially if data sync insists on all the tables having a timestamp column
  2. Will having this column help with optimistic concurrency (via entity framework)?

Solution

  • To answer your first question, No. the SQL Data Sync service will create its own change tracking mechanism and you cant configure it to reuse your timestamp column.