SQL Server Home
Maintenance plan error in Backup Database task
as Not Reproducible
12/26/2007 8:48:12 AM
User(s) can reproduce this bug
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.
SQL Server 2005 SP2 - Standard Edition
Tools (SSMS, Agent, Profiler, etc.)
Windows Server 2003 (all Win32 editions)
Operating System Language
Steps to Reproduce
Create a daily maintenance plan that includes a "Backup Database" task with the option to create a subdirectory for each backed up database. Specify a UNC path for the backup folder location. Execute plan until described error occurs.
Error raised as detailed in the Description.
Successful execution of maintenance plan.
to post a comment.
Please enter a comment.
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.
on 1/24/2008 at 7:31 PM
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.
on 1/24/2008 at 6:40 AM
Hi Dimitri Furman,
Can you share the profiler trace when the task was failed??
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.
to post a workaround.
Please enter a workaround.
on 3/9/2011 at 4:06 PM
I simply created a network share to get around the problem.
© 2014 Microsoft