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

  • coolchaitu

    SSChampion

    Points: 10267

    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: 994680

    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.
    "If you think its expensive to hire a professional to do the job, wait until you hire an amateur."--Red Adair
    "Change is inevitable... change for the better is not."
    When you put the right degree of spin on it, the number 3|8 is also a glyph that describes the nature of a DBAs job. 😉

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

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

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