1

I have a SQL job which created a transaction log backup which is around ~2.1Tb. Using the same SQL job few more log backups are created and those are of low size. (~200 MB). When I tried to delete the first log backup(~2.1 TB) I get the message that "You require permission from the computer's administrator to make changes to this file" and I am not able to delete it. My user is an admin user and I am able to delete the other log backups(of less size) created.

For the first log backup, the properties are also different as shown below. I cannot see the owner etc.

First back file

For the other backups of less size, I can see the owner and the permission details as shown.

Second backup file

I tried different methods to delete the log backup file like:

  • Tried command prompt
  • Tried to delete SQL script using exec xp_cmdshell
  • Tried to delete form a network share

Please help me if you guys have any idea on this issue.

I think it has something to do with the file size,not sure though.

Here is the contents of Advanced settings. Adanced settings

10
  • Try to take ownership and then fix the permission. After that, try to delete the file.
    – DxTx
    Aug 7, 2019 at 20:25
  • Has the job finished successfuly when it created the log backup of 2.1Tb? Have you tried taking ownership of the file? take ownership of file in windows
    – Ronaldo
    Aug 7, 2019 at 20:26
  • Just an observation: If you successfuly deletes this log backup file, you might break the backup log chain and end up with subsequent log backups that won't work until you take next full backup.
    – Ronaldo
    Aug 7, 2019 at 20:30
  • @Ronaldo I have full log backup after that log backup.So i don't mind deleting this log backup.
    – spark
    Aug 7, 2019 at 20:31
  • Tried to take ownership.I went to security--> Advanced --> Then i shows that cannot display owner and on clicking change i get the message that "You do not have permission to view or edit this objects's permission settings." "
    – spark
    Aug 7, 2019 at 20:32

1 Answer 1

0

Try taking ownership through Command Prompt:

Try the following in CMD Administrator:

TAKEOWN /F "path"

Then:

ICACLS "path" /grant administrators:F

Replace path with the file destination and you can also change "Administrator" to what ever admin you are using. Remove quotes around the path.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .