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

Sql ServerBackup

Sql Server Problem Overview


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: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.2531.0+((Katmai_PCU_Main).090329-1045+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Backup+Server&LinkId=20476


ADDITIONAL INFORMATION:

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: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.2531.0+((Katmai_PCU_Main).090329-1045+)&LinkId=20476

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

thanks

Sql Server Solutions


Solution 1 - Sql Server

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.

Solution 2 - Sql Server

I've faced this error when there was not enough free space to create a backup.

Solution 3 - Sql Server

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 http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx 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.

Solution 4 - Sql Server

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!

Solution 5 - Sql Server

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.

Solution 6 - Sql Server

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

Solution 7 - Sql Server

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.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionc11adaView Question on Stackoverflow
Solution 1 - Sql ServerPaul KeisterView Answer on Stackoverflow
Solution 2 - Sql ServerThe SmallestView Answer on Stackoverflow
Solution 3 - Sql ServerMartin SmithView Answer on Stackoverflow
Solution 4 - Sql ServerCoder_DanView Answer on Stackoverflow
Solution 5 - Sql ServerJaroslav UrbanView Answer on Stackoverflow
Solution 6 - Sql ServerAndrii StarikovView Answer on Stackoverflow
Solution 7 - Sql ServerhillstukView Answer on Stackoverflow