Backup and Restore MSSQL Database with Temporal Tables

Some of us are now using Temporal Tables in most purpose to have historical information on our records. Its interesting that the current SSMS doesn’t have this available and using the said feature will result that Temporal Tables are not restored correctly.

To backup database with Temporal tables use the following code:

BACKUP DATABASE YourDatabase
TO DISK = ‘C:\Backup\YourDatabase.bak’
WITH FORMAT;

To restore the database use the following:

RESTORE DATABASE YourDatabase
FROM DISK = ‘C:\Backup\YourDatabase.bak’
WITH REPLACE;

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.