Welcome to deBUG.to Community where you can ask questions and receive answers from Microsoft MVPs and other experts in our community.
0 like 0 dislike
9.3k views
in SQL Server by 1 1 1
I have configured, multiple tasks in the maintenance plan like Db integrity check, shrink DB and rebuild index, however when I look for a log in SQL server logs it shows only DBCC Check DB, the logs corresponding to shrink and index rebuild does not appear there.

Can you please advise where do I see the detailed logs of each task in SQL server management studio?

1 Answer

0 like 0 dislike
by 163 204 403

The Log location of Maintenance Plan In SQL Server

  • By default, The maintenance plan logs are located in the Log folder that hosts all SQL Server Logs includes the Maintenance Plans Logs.
  • In the SQL Log, you can find the log of a specific Maintenance Plan by its name and date as shown below:

Open Maintenance Log location

  • Once you open the Maintenance plan log file, you can find the log details for each task in your Maintenance Plan as shown below:

check logs of maintenance Log

Change the log location for a specific Maintenance Plan in SQL Server

You can change the default Log location for a specific Maintenance Plan by doing the following:

  1. Open SQL Server Management Studio.
  2. Expand "Management" > "Maintenance Plans".
  3. Double-Click on your plan name to edit it.
    Edit Maintenance plan in SQL Server
  4. At the Maintenance Plan, click on the "Reporting and Logging" button.
  5. Specify the path that folder path that you would like to save your Log report.
    Maintenance Log location

View History for a specific Maintenance Plan in SQL Server

In SQL Server Management Studio, you can also view the running history of all tasks in a specific Maintenance Plan by doing the following:

  1. Open SQL Server Management Studio.
  2. Expand "Management" > "Maintenance Plans".
  3. Right-Click on your Maintenance Plan > Select "View History".
    View history for a Maintenance plan in SQL Server
  4. The Log file Viewer will be opened, and you can check the running duration for each task in your plan categorized by date as shown below:
    Log file viewer for a Maintenance plan in SQL Server

See Also

If you don’t ask, the answer is always NO!
...