Backup file not deleting

  • SKYBVI (9/6/2010)


    @ jeffrey

    EXECUTE master.dbo.xp_delete_file 0,N'\\server_name\Priya',N'bak',N'09/05/2010 12:21:24'

    Regards,

    Sushant

    The only thing I see wrong with the above command is that it is missing the option to include first-level subfolders. If your backups are in subfolders, this will not delete anything in those subfolders.

    I would also verify that the service account has full control over the folder and subfolders. If it does not have full control, it won't be able to delete the files.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • @ jeffrey

    The exact location of the bak file is :-

    \\server_name\D:\ABC(shared)\Priya(shared)\db_name.bak

    in back up task, I' mentioned \\server_name\Priya (option of subdirectory unchecked)

    in maintenence task I mentioned \\server_name\Priya (same as above)

    Regards,

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

  • SKYBVI (9/6/2010)


    @ jeffrey

    The exact location of the bak file is :-

    \\server_name\D:\ABC(shared)\Priya(shared)\db_name.bak

    in back up task, I' mentioned \\server_name\Priya (option of subdirectory unchecked)

    in maintenence task I mentioned \\server_name\Priya (same as above)

    Regards,

    Sushant

    Okay, how is the Priya folder shared? What share permissions are granted to your service account for the share, and what permissions are granted for security?

    Also, verify the permissions on the file itself - make sure the service account has the right to delete the file.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • @ jeffrey

    The priya folder is shared by everyone with full control, change ,read.

    In security, admins, domain admins and sql server agent are given the permissions.

    Admins hav all permission, domian admins have read , write and sql server agent has all permissions.

    Regards,

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

  • Well, I don't know what to tell you - are you creating those backup files from a different system/instance? Could you be creating those backups with a non-native backup utility?

    There is something you have mis-configured, or a typo or permissions issue.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

  • @ jeffrey

    I am taking backups and storing them on different server..

    I am also clueless, what mistake I did.

    Anywayz, thanks for your replies.

    Regards,

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

  • Hmm, think it's tricky to do it that way... What kind of account is the SQL Agent running as? Is it a domain user?

  • on a light note, i think its problem with name(Priya) which is female name and ladies are always main reason of any problem.......hahahahahahaha 😀 😀 😀 😀 😀

    ----------
    Ashish

  • @NJ-DBA

    Yes the sql agent is running as a domain user.

    @ashish

    hahaha.....so true buddy

    Regards,

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

  • I would lean towards rights. Can you log in as the SQL Agent service account and manually delete the files?

  • @ steve

    Ya, i logged in as the sql agent service account and was able to delete the files manually.

    Thanks.

    Regards,

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

  • I agree with Steve- I would do it by logging on to the sql server as the agent service account, then from start>run enter "\\server_name\Priya" just like in your maintenance plan. Don't test by logging on to the server you have the backup files sitting on... maybe it's a problem with mapping the share and then deleting

  • ashish.kuriyal (9/6/2010)


    try to change maintenance plan to delete last 2 days file its 1 day as of now or just add one more day. And then once it run successfully on its next 2 schedule then change it back to original.

    quote]

    have you tried this?

    ----------
    Ashish

  • @ nj-dba

    Its confusing wat u intend to say?

    @ashish

    Ya, i changed it . hav to wait to c the results. I shld wish nobody else manually deletes the bak files after seeing tht it is taking up the disk space too much

    Regards,

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

  • @ ashish

    I did that too..

    no difference...

    I today deleted the last 2 days backup manually.

    Regards,

    Sushant

    Regards
    Sushant Kumar
    MCTS,MCP

Viewing 15 posts - 31 through 44 (of 44 total)

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