Custom history data retention

Unfortunately, you cannot configure a history table to automatically move data to some other table or repository according to a user-defined retention policy. That means that you have to implement this kind of data retention manually. This is not very complicated, but it is not a trivial action. I expected it as a part of the implementation and would be disappointed if this was not delivered in the next SQL Server version. As mentioned, you can use some other SQL Server features to implement data retention for history tables:

  • Stretch databases allow you to move entire parts of historical data transparently to Azure.
  • Partitioning history tables allows you to easily truncate the oldest historical data by implementing ...

Get SQL Server 2017 Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.