SQL server 2008 backup error - Operating system error 5(failed to retrieve text for this error. Reason: 15105)


Can anyone help me, I'm trying to backup a database located on localhost\SQLEXPRESS but i keep getting the following error:

Backup failed for Server 'localhost\SqlExpress'.  (Microsoft.SqlServer.SmoExtended)

For help, click:


System.Data.SqlClient.SqlError: Cannot open backup device 'C:\backup.bak'. Operating system error 5(failed to retrieve text for this error. Reason: 15105). (Microsoft.SqlServer.Smo)

For help, click:

Can anyone explain what I'm doing wrong here ??


10/16/2012 1:58:32 AM

Accepted Answer

It looks like the SQL Server doesn't have permission to access file C:\backup.bak. I would check the permissions of the account that is assigned to the SQL Server service account.

As part of the solution, you may want to save your backup files to somewhere other that the root of the C: drive. That might be one reason why you are having permission problems.

11/24/2015 9:14:27 AM

Assuming that the *.bak file is on the same machine as the SQL Express instance it might be a permissions issue.

If you download procmon you can filter on that file path, look for ACCESS_DENIED errors and if any are there you can see the account name that's failing get to access.


I got this error too.

The problem turned out to be simply that I had to manually create the full directory structure for the file locations of the MDF & LDF files.

Shame on SQL-Server for not properly reporting the missing directory!


I've got the same error. I have been trying to fixing this by setting higher permission to account running SQL Client service, however it didnt help. The problem was that I run MS Sql Management studio just within my account. So, next time... assure that you are running it as Run as Administrator, if using Win7 with UAC enabled.


Yes, it is security issue. Check folder permissions and service account under which SQL server 2008 starts.


I had this error. Nothing worked for me until I opened the SQLServer log file in the "MSSQL10_50" Log folder. That clearly stated which file could not be overwritten. It turned out that the .mdf file was being written into the "MSSQL10" data folder. I made sure that folder had the same SQLServer user permissions as the "MSSQL10_50" equivalent folder. Then it all worked.

The issue here is that the error detail is logged but not reported, so check the logs.


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Email: [email protected]