SQL Server Bulk-Logged Recovery Model (SET RECOVERY BULK_LOGGED) |
http://www.mssqltips.com/tutorial.asp?tutorial=5
Overview
The "Bulk-logged" recovery model sort of does what it implies. With this model there are certain bulk operations such as BULK INSERT, CREATE INDEX, SELECT INTO, etc... that are not fully logged in the transaction log and therefore do not take as much space in the transaction log.
Explanation
The advantage of using the "Bulk-logged" recovery model is that your transaction logs will not get that large if you are doing bulk operations and it still allows you to do point in time recovery as long as your last transaction log backup does not include a bulk operation as mentioned above. If no bulk operations are run this recovery model works the same as the Full recovery model. One thing to note is that if you use this recovery model you also need to issue transaction log backups otherwise your database transaction log will continue to grow.
Here are some reasons why you may choose this recovery model:
- Data is critical, but you do not want to log large bulk operations
- Bulk operations are done at different times versus normal processing.
- You still want to be able to recover to a point in time
Type of backups you can run when the data is in the "Simple" recovery model:
- Complete backups
- Differential backups
- File and/or Filegroup backups
- Partial backups
- Copy-Only backups
- Transaction log backups
How to set the bulk-logged recovery model using T-SQL.
ALTER DATABASE dbName SET RECOVERY recoveryOption GO |
Example: change AdventureWorks database to "Bulk-logged" recovery model
ALTER DATABASE AdventureWorks SET RECOVERY BULK_LOGGED GO |
How to set using SQL Server Management Studio
- Right click on database name and select Properties
- Go to the Options page
- Under Recovery model select "Bulk-logged"
- Click "OK" to save