Link to home
Start Free TrialLog in
Avatar of Alexandre Takacs
Alexandre TakacsFlag 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 '\\\\172.16.200.253\\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 :
User generated image
Isn't that the correct way of doing it ?
Avatar of Raja Jegan R
Raja Jegan R
Flag of India image

Try mapping the network path to a mapped drive and use the Mapped drive path..
https://www.mssqltips.com/sqlservertip/3499/make-network-path-visible-for-sql-server-backup-and-restore-in-ssms/
Avatar of Alexandre Takacs

ASKER

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 ?
ASKER CERTIFIED SOLUTION
Avatar of lcohan
lcohan
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>> 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
Thanks - mapped the drive within the SQL service account and all works fine now