I have just started using using temporal tables/system versioning, its very easy to setup and get going in terms of querying the data. The one thing missing for me is storing the change operation (update/insert/delete) or generating it on the fly from the system_time period. Can anyone point me in the right direction to achieve this? Or isn't this achievable?

Thanks in advance.

  • 1
    Just a shot in the dark, since the article got published recently -- are you looking for something like this? sqlblog.com/blogs/adam_machanic/archive/2017/02/14/… Feb 23 '17 at 19:38
  • 1
    Also see mssqltips.com/sqlservertip/3682/… Feb 23 '17 at 19:40
  • 1
    Note, temporal isn't really an auditing solution - it is meant to give you an accurate view of what a row looked at a point in time or during a time frame. It can show you all the versions of the rows but it doesn't really give any more insight into the DML activity that did that... Feb 23 '17 at 19:41
  • @AaronBertrand thats what i was thinking also, i kind of wanted a bit of the CDC functionality, but wondered if there was anything i could do with temporal table data as its so clean and easy to get going. Regarding the article above i had a go but the results i was getting matching up.
    – gdp
    Feb 23 '17 at 19:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.