Avatar of Alexandre Takacs
Alexandre Takacs
Flag for Switzerland asked on

SQL server backup to CIFS share - syntax issue ?

I am trying to perform an SQL server "built-in" backup (part of a maintenance plan that was working so far) to a file share.

I understand that I have to use UNC in my file path and that the user running the SQL service should have access to the share - as such I have changed the DSQL service user to a domain user.

Checking my logs I see

Failed:(-1073548784) Executing the query "BACKUP DATABASE [model] TO  DISK = N'\\\\172.16.200...." failed with the following error: "Cannot open backup device '\\\\\\Backup\\SQLDB\\model\\model_backup_2019_11_25_220003_1049249.bak'. Operating system error 67(The network name cannot be found.).
BACKUP DATABASE is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Open in new window

Seems that it is actually an issue in finding the network share. This is how I have defined my destination :
server management
Isn't that the correct way of doing it ?
DatabasesMicrosoft SQL ServerSQL

Avatar of undefined
Last Comment
Alexandre Takacs

8/22/2022 - Mon
Raja Jegan R

Try mapping the network path to a mapped drive and use the Mapped drive path..
Alexandre Takacs

hmm problem is that the mapped path will not be available to the user running the backup (unless I do a scripted map before I run it). Is that the best practice ?

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Raja Jegan R

>> problem is that the mapped path will not be available to the user running the backup

As mentioned by lcohan, just ensure that the startup account of SQL Server Agent service is having access to the share folder.
And use net use option if SSMS can't see the shared folder while configuring backups
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Alexandre Takacs

Thanks - mapped the drive within the SQL service account and all works fine now