Here’s what more than 2,500 business decision-makers around the world say.Download the report
...with the Facility Hero app in hand! Discover how you can optimize your maintenance efforts today.Learn more
Access tailored services, 24/7 self-service and expert help. Anywhere, anytime, any project.Discover now
Everything you need to know about our IoT technology backbone.Learn more
Explore our global offerings or select your country from one of our five regions.Global
Découvrez nos offres globales ou sélectionnez votre pays dans l’une de nos cinq régions.
When executing a backup on a SQL Server database where the resulting backup file is directed onto a mapped drive you receive the following error message:
"The system cannot find the path specified."
Struxureware Power Monitoring
Power Monitoring Expert
SQL Server 2005, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014
A network share that is mapped using a local drive letter will not be visible to a SQL Server instance as it is running as a service.
The SQL Server service runs in the environment of the local console with the security of the startup account of SQL Server applied.
Mapped drives are specific to a session and not visible to a service started on the local console.
To backup a SQL Server database to a mapped drive using a local drive letter:
1. Run the following command from a query window EXEC xp_cmdshell 'net use <drivename> <share name>'
Where: <drive name>: Letter used to map the drive
<share name>: UNC path to the share
2. You should be able to backup using the mapped drive letter, as the Management Studio Object Explorer drive window should now list the above mapped drive
A drawback of this resolution is that once the SQL Server service is restarted, the mapped drive will no longer be visible as it will become unmapped.
If you want to retain the mapped drive information then you need to create a startup procedure for executing the script in Step 1.
One simple method would be to create a backup device using the UNC path of the remote share that you would like to take the database backups on.
It is important to keep in mind that the SQL Server startup account needs to have full permissions on the remote share.