SQL server cannot create backup to network map drive from NAS

Jack Chuong 331 Reputation points
2022-05-24T02:15:29.457+00:00

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.

Windows Server 2016
Windows Server 2016
A Microsoft server operating system that supports enterprise-level management updated to data storage.
2,347 questions
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,483 questions
0 comments No comments
{count} votes

Accepted answer
  1. Olaf Helper 40,156 Reputation points
    2022-05-24T05:02:03.127+00:00

    Why that complicated, why not simply using UNC path?

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. YufeiShao-msft 7,046 Reputation points
    2022-05-24T07:08:02.72+00:00

    Hi @Jack Chuong ,

    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.

    0 comments No comments