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

  • coolchaitu


    Points: 10276

    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.

  • Jeff Moden

    SSC Guru

    Points: 996475

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

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

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