• sqlsurfing (5/26/2013)


    The backups are no longer failing. They were failing due to lack of disk space and this has now been sorted, partly down to allocating more disk space, and partly down to shrinking the file. Also found a very old, huge backup file which I deleted..

    Both the shrink to 50% and 40% ran quick and as I am deleting more data every night (10's of millions) the database is progressively getting smaller.

    Since I am deleting one months worth of data at a time, I expect to take another couple of weeks to get to a point where I only have 6 months worth of data left and will continue to shrink to 50% as I continue.

    This might be a moot point, since you're gone so far down this path "shrinking" and "deleting"....

    I wonder if it's not too late to update add a thought. Have you considered.. copying the "6 months" of data needed into another table/filegroup instead of deleting 10's of millions in the database? I'm assuming last 6 month set is much smaller.

    +1 to that. It might also be a good time to consider partitioning the table to make future once-per-moth deletes easier.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)