3

I have a SQL Server 2012 maintenance plan which backs up all of the databases. Today I had an issue with a failed backup which I was able to resolve by viewing the detail in the 'Log File Viewer' through SSMS:

FullBackupError

The three 'child' items read as follows:

03/02/2014 05:36:48: Could not find a part of the path 'F:\\sql\\log\\Full Backup All Dbs_Subplan_1_20140203053648.txt'.

03/02/2014 05:36:48: Could not generate mail report.An exception occurred while executing a Transact-SQL statement or batch.No global profile is configured. Specify a profile name in the @profile_name parameter.

03/02/2014 04:00:01: Executing the query "BACKUP DATABASE [MainDb..." failed with the following error: "Write on "M:\\sql\\full\\MainDb\\MainDb_backup_2014_02_03_040001_7658846.bak" failed: 112(There is not enough space on the disk.)
BACKUP DATABASE is terminating abnormally.
10 percent processed.
20 percent processed.
30 percent processed.
40 percent processed.
50 percent processed.
60 percent processed.
70 percent processed.
80 percent processed.
90 percent processed.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

I have now sorted out the disk space issue and have re-run the full backup successfully, but I remain concerned about the log item above which references F:\sql\log because the machine does not have an F: drive at all, just a C: and an M: drive. It does appear that the 'Could not generate mail report' issue is related but again this error is a bit odd; I am receiving emails when the various jobs complete and I was alerted to the disk space error via an email, so I wonder why an error is logged if the email was sent successfully?

I've dug through the SQL Server, SQL Agent, Database Mail and the maintenance plan configurations but I can find nothing which is set to F:\sql\log and so I have no idea why the maintenance plan is trying to write to that path, or why it is logging an error when email is sent successfully. Can anyone help me to work out how to resolve this?

Thanks for any assistance.

5
  • 2
    Did you check the Reporting and Logging option in the maintenance plan?
    – DenisT
    Commented Feb 3, 2014 at 14:44
  • 1
    Are you trying to use a mapped drive ? Also, regarding the mail profile error, it seems that you dont have a default one assigned. Go to profile security and make the profile default.
    – Kin Shah
    Commented Feb 3, 2014 at 18:02
  • Can you run Profiler against the server while you run the job? This should tell you where the rogue path is coming from. The second error is probably coming from a Notify Operator step -- this is a Database Mail error message.
    – Jon Seigel
    Commented Feb 3, 2014 at 18:28
  • Thanks for these suggestions. DenisT and Kin, your comments led me to sqlgoutham.blogspot.co.uk/2012/02/… and bartlannoeye.be/blog/editing-maintenance-plan-for-file-location. I am wondering how I missed that logging and reporting button! With your help I've been able to correct the log file path now and am testing the database mail change after setting a default profile.
    – Elliveny
    Commented Feb 4, 2014 at 10:23
  • Yes! All is working now; no database error and log files are being written correctly. Great :-) Now regarding this question... I'd like to mark an accepted answer but as I only have comments I can't do so. I've voted up the helpful comments - should I do more? Thanks again to DenisT and Kin for the hints I needed.
    – Elliveny
    Commented Feb 4, 2014 at 10:34

1 Answer 1

1

Elliveny's comment on Feb 4, 2014 links to a page that no longer exists, but I found it on the wayback machine:

https://web.archive.org/web/20210917073611/https://bartlannoeye.com/blog/editing-maintenance-plan-for-file-location/

It indicates where the Report and Logging dialog can be found for the maintenance plan.

Another current link that describes this feature is: https://www.mssqltips.com/sqlservertip/3225/sql-server-maintenance-plans-reporting-and-logging/

The Maintenance Plan reporting and logging option is enabled by default, but a lot of DBA’s and developers don’t even realize it is an option, much less that it’s enabled.

To configure this option, open a maintenance plan and on the top bar beside Manage Connections…. you’ll notice a little chart/paper icon. It’s not hidden, but it doesn’t jump out at you and that’s probably why a lot of DBA’s don’t pay any attention.

Thank You!

1
  • As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Sep 15, 2023 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.