• dxu (4/18/2016)


    Hi Jeff,

    Thanks for your reply.

    The full back up normally take over than an hour. For example full backup start on 1AM, and finish around 2:30AM. The log is backed up every hour. So the log backup on 2AM is still looking at old full backup from previous day?

    I do have a couple of lines of code to delete old backup. But I only delete the backup from three days ago or earlier. It has been running ok for month so should not be the issue.

    Regards

    Daniel

    Yes and no. You have to understand the log chain. If you took only one proper full backup 5 years ago and never broke the chain, you could restore to a point in time. If you had any of a hundred full backups and never broke the log chain, ANY of the full backups and the log files that follow (in LSN order) could be used to do a restore.

    Once the log file chain starts, it matters little when you take subsequent full backups provided the log chain isn't broken.

    If you take more frequent log file backups, then the log file backups will be shorter. If the full backup you're taking fails, then the previous full backup and all the log files that follow will effectively get you to a point in time restore.

    All that being said, I'll say it again... there is absolutely no reason to delay taking log file backups while full backups are running. Make it easy on yourself... schedule full backups without regard to when log file backups occur and vice versa. Log files don't look back at anything. They're based on log sequence number and it doesn't have to be the latest full backup to use them for a restore.

    Difs are a different story. They record only the extents that have changed since the last full backup.

    --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)