question

JackChuong-4469 avatar image
0 Votes"
JackChuong-4469 asked Yufeishao-msft edited

SQL server cannot create backup to network map drive from NAS

Hi all,
My environment : SQL server 2014 (OS Windows server 2016) (192.168.0.12) , NAS QNAP QTS TS-453BU-RP (192.168.0.106)
Create shared folder "test" on NAS.
Mount shared folder "test" to SQL server 2014.

 net use /PERSISTENT:YES Q: \\192.168.0.106\test /USER:admin ******

From SQL server I can create/edit/delete files/folders on Q:
Because SQL server backup cannot see network drive , I map it to a link folder on C: drive

 mklink /D "C:\test" Q:

I granted "NT Service\MSSQLSERVER" and "NT SERVICE\SQLSERVERAGENT" full permission on "C:\test" (these accounts running SQL server and agent services)
SSMS cannot backup DB to C:\test , event id 18204

 BackupDiskFile::CreateMedia: Backup device 'C:\test\test.bak' failed to create. Operating system error 3(The system cannot find the path specified.).

It used to work before, the issue happened since yesterday.
Please give me some advice , thank you very much.

sql-server-generalwindows-server-2016
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

OlafHelper-2800 avatar image
1 Vote"
OlafHelper-2800 answered JackChuong-4469 edited

Why that complicated, why not simply using UNC path?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi OlafHelper,
I would like to use SSMS to create backup plan for many DB witch schedule, I need SSMS can see network drive.
Thank for your hints, I google and find useful tip here : https://www.mssqltips.com/sqlservertip/3499/make-network-path-visible-for-sql-server-backup-and-restore-in-ssms/
It works now.

0 Votes 0 ·
Yufeishao-msft avatar image
0 Votes"
Yufeishao-msft answered Yufeishao-msft edited

Hi @JackChuong-4469,

Operating system error 3

The possible case of this error is thay SQL Server is not able to locate mapped drive, it is suggested to use fully qualified UNC path(e.g. \\remote_server\share_db) rather than the mapped drive(e.g. Z:\ ) for the temporary directory.

Refer to: Backup Devices

https://stackoverflow.com/questions/23916628/mapping-a-drive-and-backing-up-a-sql-server-database
https://www.mssqltips.com/sqlservertip/3499/make-network-path-visible-for-sql-server-backup-and-restore-in-ssms/




If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.