Share via

Unable to delete encrypted sql server backup file

John Abel 211 Reputation points
2020-09-14T16:53:24.13+00:00

Greetings, I created an encrypted backup on our windows 2016 standard ed, with sql 2014 standard ed installed with the following options :

  • WITH copy_only, compression, ENCRYPTION (ALGORITHM = AES_256, SERVER CERTIFICATE = sqldbcert)

This worked fine, I was able to restore the database to another server, then I noticed a backup file copy job failing when it tried to access/copy this file. I have found that I can't remove this file now, when I right click and try to delete it does act as if it deletes the file but if you refresh the folder, it shows back up. When I right click the file and select the security tab it gives me a message "you must have read permissions to view the properties of this object. click advanced to continue". When I do that it shows under owner "unable to display the current owner". If I click change here, I get a message "you do not have permissions to view or edit the objects permission settings". I am a local admin on this machine.

Does anyone have any suggestions as to what to do/where to look further on what is going on here? I checked event viewer and I didn't see any errors when i "deleted" the file. Thanks for any reply.

SQL Server | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories

0 comments No comments

Answer accepted by question author

CathyJi-MSFT 22,431 Reputation points Microsoft External Staff
2020-09-15T06:20:46.713+00:00

Hi @John Abel ,

Please check if below blog could help you.

https://www.online-tech-tips.com/software-reviews/how-to-fix-access-is-denied-file-may-be-in-use-or-sharing-violation-errors-in-windows/

Best regards,
Cathy


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?


2 additional answers

Sort by: Most helpful
  1. John Abel 211 Reputation points
    2020-09-14T18:19:07.047+00:00

    Hello, when I run that on the file i get an error "ERROR: Access is denied". I have run the command on a different file and it works with a "Success: .... " message

    Was this answer helpful?


  2. Tom Phillips 17,786 Reputation points
    2020-09-14T17:10:40.333+00:00

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.