Maintenance plan error in Backup Database task - by Dimitri Furman

Status : 

  Not Reproducible<br /><br />
		The product team could not reproduce this item with the description and steps provided.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 319801 Comments
Status Closed Workarounds
Type Bug Repros 4
Opened 12/26/2007 8:48:12 AM
Access Restriction Public


Intermittently, a Backup Database task in a maintenance plan raises the following error (taken from extended log):

Failed:(-1073548784) Executing the query "EXECUTE master.dbo.xp_create_subdir N'\\\\backupserver\\backupshare$\\sqlservername$instancename\\dbname'
" failed with the following error: "xp_create_subdir() returned error 123, 'The filename, directory name, or volume label syntax is incorrect.'". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

In the task, the option to "Create a sub-directory for each database" is enabled, and the "Folder" is specified as "\\backupserver\backupshare$\sqlservername$instancename".

The apparent cause of the error is the extra two backslashes at the beginning of the path passed to the xp_create_subdir procedure. The procedure call mentioned in the error message fails with the same error when executed "as is", but succeeds if two backslashes at the beginning of the path are removed (the double backslashes in the middle of the path string do not cause the error).

The actual BACKUP DATABASE statement succeeds, and since the directory already exists on disk, the error is non-critical in this case. It would be more serious if occurred the first time the maintenance plan is run, when the directory actually needs to be created.

The plan works fine most of the time, and the path passed to xp_create_subdir does not contain double backslashes in those cases (as verified with a Profiler trace). To date, the error has happened 10 times since this daily maintenance plan has been created in mid-September of 2007.

This occurs on post-SP2 build 3186.
Sign in to post a comment.
Posted by Microsoft on 4/27/2008 at 11:30 PM
Hi Dimitri Furman,
Thanks for reporting this issue. We are closing this bug as we could not able to repro this in the lab. Please reactivate this bug if you still able to repro it in Katmai.

Posted by Dimitri Furman on 1/24/2008 at 7:31 PM
Hi Rajesh,

To answer your questions: The backup itself was successful on the days that the plan failed. I suppose it is possible that the path was inaccessible only for a short period of time when the plan attempted to create the directory, but that seems unlikely, as such an intermittent problem would sooner or later have caused the backup itself to fail, which never happened.

Unfortunately, I cannot provide a trace of the failure because I no longer have access to that site.
Posted by Microsoft on 1/24/2008 at 6:40 AM
Hi Dimitri Furman,
Can you share the profiler trace when the task was failed??
Posted by Microsoft on 1/24/2008 at 6:25 AM
Hi Dimitri Furman
     Thanks for reporting this issue. Actuavally while executing the query we never include the "extra two backslashes", but if the query is failed while logging the error(sp_maintplan_update_log) we include "extra two backslashes". When ever your UNC path is not accessable your plan will fail. Is the backup really happening on the day you got the backup failure with "xp_create_subdir"?? If the UNC path is not accessable the backup should also fail.