The log file of my user db is full. Please confirm if below resolves issue

  • Good morning experts,

    The log file of my user db is full. Could you please confirm if the below resolves the issue:

    Take log backup->Change the recovery model from full to simple->shrink the log file->Change the recovery model back to full and take an immediate full backup

     

    Please let me know otherwise.

  • No.  Not quite right.  I hope you've recently taken a full backup.  If so, then you can take your log file backup and then immediately do a shrink if you need to for rapid recovery for DR purposes.  If it doesn't shrink, take another log file backup followed by a shrink.

    Only go to SIMPLE Recovery if you need the log file to shrink and it won't.  Since you've taken a recent full backup, you only need to take a DIF backup followed by a log file backup both after returning to the full recovery model.

    You also need to figure out why your log file was full.  Is it because you're not backing up the log file on a regular basis or too long a basis?  Easy fixes for those.  If it was something else, you really need to figure out what it was and fix it.  Another consideration... Could it be that the log file is simply too small?

     

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

Viewing 2 posts - 1 through 1 (of 1 total)

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