30.06.2013 Views

SQL Server Backup and Restore - Simple Talk

SQL Server Backup and Restore - Simple Talk

SQL Server Backup and Restore - Simple Talk

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 5: Log <strong>Backup</strong>s<br />

There are several other issues that can be revealed through the log_reuse_wait_<br />

desc column, mainly relating to various processes, such as replication, which require<br />

log records to remain in the log until they have been processed. We haven't got room<br />

to cover them here, but Gail Shaw offers a detailed description of these issues in her<br />

article, Why is my transaction log full? at www.sqlservercentral.com/articles/<br />

Transaction+Log/72488/.<br />

Excessive logging activity<br />

If no problems are revealed by the log_reuse_wait_desc column then the log growth<br />

may simply be caused by a very high rate of logging activity. For a database using the<br />

FULL recovery model, all operations are fully logged, including bulk data imports, index<br />

rebuilds, <strong>and</strong> so on, all of which will write heavily to the log file, causing it to grow rapidly<br />

in size.<br />

It is out of scope for this book to delve into the full details of bulk operations but, essentially,<br />

you need to find a way to either minimize the logging activity or, if that's not<br />

possible, then simply plan for it accordingly, by choosing appropriate initial size <strong>and</strong><br />

growth settings for the log, as well as an appropriate log backup strategy.<br />

As noted in Chapter 1, certain bulk operations can be minimally logged, by temporarily<br />

switching the database from FULL to BULK_LOGGED recovery, in order to perform the<br />

operation, <strong>and</strong> then back again. Assuming your SLA will permit this, it is worth considering,<br />

given that any bulk logged operation will immediately prevent point-in-time<br />

recovery to a point within any log file that contains records relating to the minimally<br />

logged operations. We'll cover this option in a little more detail in Chapter 6.<br />

175

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!