xp_delete not working

  • Running sql 2005 SP2 Ent edition on Active/passive cluster. I have tried several maint plans to delete backup files older than 36 hours. The files are all in a subfolder with dbname as folder name. Regradless of what I try to delete (even turned on profiler and captured and ran statements). Regardless it will not delete. No errors?

  • timscronin (9/14/2009)


    Running sql 2005 SP2 Ent edition on Active/passive cluster. I have tried several maint plans to delete backup files older than 36 hours. The files are all in a subfolder with dbname as folder name. Regradless of what I try to delete (even turned on profiler and captured and ran statements). Regardless it will not delete. No errors?

    Can you post the command that is running and that you captured. does this command run from the command line, if not what is the error.

    --------------------------------------------------------------------------------------
    [highlight]Recommended Articles on How to help us help you and[/highlight]
    [highlight]solve commonly asked questions[/highlight]

    Forum Etiquette: How to post data/code on a forum to get the best help by Jeff Moden[/url]
    Managing Transaction Logs by Gail Shaw[/url]
    How to post Performance problems by Gail Shaw[/url]
    Help, my database is corrupt. Now what? by Gail Shaw[/url]

  • i thought i read here on the forum that xp_delete would only delete certain extensions of for file names....

    when i ggogled "SQL SERVER xp_delete file extensions", i found some different things...unreliable deleted over a network with XP_DELETE....only BAK files, hotfix for SP2 to delete SSRS files...

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • tried this

    EXECUTE master.dbo.xp_delete_file 1,N'T:\sqlbackups\',N'*.bak',N'2009-09-13T10:32:50',1

  • I had a similar problem whereby it was the folder that was the problem. Just try doing the backup straight to the C: drive and then run the delete command. If this fails then have you checked the permissions on that drive to ensure the user you are using has R/W permissions to all the cascading folders. Get one of your network admins to check both the C drive and the additional folder you have placed the backups to.

    Hope this helps!

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply