When we use a ing drive to back up the SQL Server database, the following error may occur:
"Failed. Error:" unable to open the backup device 'z: \ gbdb_backup_201306302002.bak '. Operating System Error
3 (the system cannot find the specified path .).
The database cannot find the path, but if we open it directly, it can be accessed normally. Why is SQL server inaccessible?
Because SQL server runs as a service, it cannot perceive the network drive disk mapped to the shared path. Because SQL
Server Service uses SQL Server to start the account security context and run in the local console context environment. The ing disk drive is only visible to specific sessions and invisible to services started in the context of the local console.
You can use the following method to back up data to a mapped Disk:
1. Open SQL Server and run the following commandExec xp_cmdshell 'net use <drivename> <Share Name>'
-- <Drive name>: ing drive letter -- <Share Name>: UNC shared path
2. You should be able to back up the drive letter created above.
Net use Documentation Reference:Http://technet.microsoft.com/en-us/library/bb490717.aspx
The disadvantage is that when the SQL Server service is restarted, the mapped disk will be lost. To continuously map disks, you need to create a startup stored procedure. In addition, security considerations (Xp_mongoshell)
A simple method is to use UNC for backup. In this way, you only need to ensure that the SQL server startup account has full control permissions on the remote shared folder.
Ideally, the service should not access the local ing drive, because the local ing drive has different features in different Windows versions, and the methods mentioned above are not necessarily available in all scenarios.
Refer to: 180362 info: Services and redirected drives.
Original article from:
How to backup SQL Server databases to a mapped drive