SQL Server Cannot open backup device. Operating System error 5


Microsoft SQL Server EXPRESS üzerinden veritabanı yedeği almak istediğimde  aşağıdaki hatayı alıyorum.

Backup failed for server …  Microsoft.SqlServer.SmoExtended

System.Data.SqlClient.SqlError:
Cannot open backup device 'C:\BackUp\DB.Bak'. Operating system error 5(Access is denied.).

BACKUP DATABASE is terminating abnormally.

failed to retrieve text for this error Reason :15105

SQL EXPRESS’de  Backup failed for server Cannot open backup device. Operating System errorhatasının sebebi nedir?

SQL EXPRESS’de  Backup failed for server Cannot open backup device. Operating System error hatasının çözümü:

Bu hatanın sebebi yedek almak istediğiniz klasöre SQL hizmetini çalıştıran kullanıcının erişim yetkisinin olmamasıdır.

Eğer bir değişiklik yapmadıysanız SQL Hizmetini başlatan kullanıcı NETWORK SERVICE kullanıcısıdır.

Yedek almak istediğiniz klasörün özelliklerinden Güvenlik sekmesinden NETWORK SERVICE kullanıcısına yazma yetkisi verirseniz sorun çözülecektir.

 

 

SQL SERVER -Fix Error – Cannot open backup device. Operating system error 5(Access is denied.)

 

This has to be the most popular error in taking database backups. There are many reasons for this error and there are different ways to resolve it. I recently faced this error and for a while I was taking backup and found a very interesting solution to the problem. The error was as mentioned below:

Msg 3201, Level 16, State 1, Line 1
Cannot open backup device ‘d:\Log\aw.bak’. Operating system error 5(Access is denied.).
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.

error5 1 SQL SERVER  Fix Error   Cannot open backup device. Operating system error 5(Access is denied.)

Personally, I know this error happens when

  1. There is no directory with Log
  2. There is not enough space on drive d:\
  3. There is not enough permissions on d:\Log drive

In my case all of the above were not the reason for above error. The error was there because of the file was read only. There was already another backup file which existed in the folder with the name aw.bak and it was marked as read only. Due to the same reason, my backup was failing. Once I removed the checkbox for reading only, the backup was successful.

error5 2 SQL SERVER  Fix Error   Cannot open backup device. Operating system error 5(Access is denied.)

error5 3 SQL SERVER  Fix Error   Cannot open backup device. Operating system error 5(Access is denied.)

Share Button

Comments 0

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

* Copy This Password *

* Type Or Paste Password Here *

12.695 Spam Comments Blocked so far by Spam Free Wordpress

More From: Ms-Sql

DON'T MISS