{"id":3190,"date":"2015-12-01T09:21:37","date_gmt":"2015-12-01T14:21:37","guid":{"rendered":"https:\/\/academy.sqlbak.com\/?p=3190"},"modified":"2023-10-17T05:26:35","modified_gmt":"2023-10-17T09:26:35","slug":"simple-recovery-model","status":"publish","type":"post","link":"https:\/\/academy.sqlbak.com\/simple-recovery-model\/","title":{"rendered":"Simple Recovery Model"},"content":{"rendered":"
The simple recovery model allows full and differential database backups only, and there is no chance of making transaction log backup. At the time when a checkpoint is created in a simple recovery model, all committed transactions are removed from the transaction log. That means that point-in-time recovery isn’t possible.<\/p>\n
So in which cases is it better to use a simple recovery model? There are four of them:<\/p>\n
Suppose full and differential backups are regularly created:
\nAs seen from the picture above, the full database backup was made at 10:00 and 22:00 and the differential backup was made at 16:00. Assume that some crucial data were deleted at 19:00. The best thing that is possible to do is to restore the database as of\u00a016:00. First you need to restore the full backup (from 10:00) and then followed by the differential backup (from 16:00). In this case, all changes that were made within the time period from 16:00 to 22:00 will be lost.<\/p>\n
The database can be restored in the following way:<\/p>\n
RESTORE DATABASE<\/span> your_database<\/em> FROM DISK<\/span> = 'full_10_00.bak'<\/span> WITH NORECOVERY<\/span>, REPLACE<\/span>\r\nRESTORE DATABASE<\/span> your_database<\/em> FROM DISK<\/span> = 'diff_16_00.bak'<\/span> WITH RECOVERY\r\n<\/span><\/pre>\nThis is how you can change your database recovery model to Simple:<\/b><\/p>\nALTER DATABASE<\/span> your_database<\/em> SET RECOVERY SIMPLE<\/span><\/pre>\n","protected":false},"excerpt":{"rendered":"The simple recovery model allows full and differential database backups only, and there is no chance of making transaction log backup. At the time when a checkpoint is created in a simple recovery model, all committed transactions are removed from the transaction log. That means that point-in-time recovery isn’t possible.<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[158],"tags":[],"yoast_head":"\n
Simple Recovery Model - Sql Server Backup Academy<\/title>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\n\t\n\t\n