Shrink a transaction log file Maintenance Plan in SQL Server

The Major factor that faces me when I was trying to create a Shrink a transaction log file Maintenance Plan is the shrink option in Maintenance Tasks that include shrink operation for both data file and transaction log file, and there is not an option for only log file!

maintinance plan wizard 29

In this article, I am trying to perform a shrink operation for only the transaction log file via Maintenance Plan to run on a regular basis or on demand based on your requirement.

Before you start, you should be aware of the following

  • To create or manage maintenance plans, you must be a member
    of the sysadmin fixed server role.
  • The SQL Server performance will be affected during executing The Shrink operation. Thence, I advise performing the shrink operation out working hours.
  • The Shrink operation causes index fragmentation and can slow the performance of queries that search a range of the index. So you should consider rebuilding the indexes to eliminate the fragmentation before the shrink operation has been completed .

Therefore, It’s not recommended to perform the shrink operation periodically! Only in some circumstances that you need to reduce the physical size. (Check the possible responses to a full transaction log and suggested how to avoid it in the future).

Steps: Continue reading Shrink a transaction log file Maintenance Plan in SQL Server

Advertisements

Create a LOG_BACKUP Maintenance Plan in SQL Server

In this article, I will explain

  1. How to create LOG_BACKUP Maintenance Plan in SQL Server?
  2. How to restore LOG_BACKUP that have already taken via Maintenance Plan?

maintinance plan wizard 10


Keep in mind

Before you getting started, you should be aware of Continue reading Create a LOG_BACKUP Maintenance Plan in SQL Server