This presentation discusses several aspects of the new temporal tables feature in SQL Server 2016 and 2017.
- Slide deck (PDF) (727 KB)
- Scripts (32 KB)
- bkhUtility Database (6 MB) used by the scripts. Last updated 8 June 2017.
- LegacyAutoTracker Database (1 MB) used by the scripts. Last updated 8 June 2017.
You don’t need the bkhUtility database unless you want to run the workload, which is useful to present how to purge from a temporal table while activity is running against it.
You don’t need the LegacyAutoTracker database except to run the “Convert Existing History” demo.
Instructions for running through the demo scripts:
- Run the script to create the auto tracker database (change the paths as appropriate for your system).
- If you want to run the workload, restore bkhUtility and then execute the script to create the functions and procs. Then run the workload scripts. I typically run two copies of the scripts in different connections, but feel free to run as many or few as desired. Keep the scripts running until you are done with the demos.
- Skip the script to create AutoTracker2. It’s pretty much the same as the script to create AutoTracker. (I just use it walk through the details without disturbing the workload.)
- Starting with the temporal DML script, run through as many of the scripts as desired.
Presentation History:
- SQL Saturday 634 (Iowa City, Iowa), 10 June 2017
- SQL Saturday 654 (Omaha, Nebraska), 22 July 2017
- SQL Saturday 662 (Sioux Falls, South Dakota), 19 August 2017
- SQL Saturday 767 (Lincoln, Nebraska), 27 October 2018
- SQL Saturday 881 (Chattanooga, Tennessee), 22 June 2019
- SQL Saturday 883 (Louisville, Kentucky), 3 August 2019
- Kansas City SQL Server User Group, 29 August 2019
- SQL Saturday 997 (Salt Lake City, Utah), 29 August 2020