Truncating the log

  • I just wanted to make sure that I am doing what I think I am doing with the following statements.

    My goal is to copy a database from one server to the next and then shrink the log file down to a reasonable size and the create a normal maintenance plan for backups.

    Step 1 - Do the Restore to the new server

    Step 2 - Backup Log ESIKWV7P WITH TRUNCATE_ONLY

    Step 3 - DBCC ShrinkFile ('bpa98_Log', 500)

    Step 4 - Take a full backup and create maintenance plans to continue to take full and log backups

    I believe I will not loose any data by doing this. I do have to do Step 2 because otherwise Step 3 will not get down to 500 MB.

    Is this correct?

    Any comments or suggestions?

  • Yes, you won't loose any committed data by doing that. If step 2 doesn't work well, you can change the db option to be simple and change back to full right before step 4.

  • I have tried to use the sp_force_shrink_log SP in the past and it seems to work but takes quite a while on really large databases. Step 2 does cut the log size back to the size I am looking for, so I think I will stick with it. I just wanted to make sure that I was loosing no data by doing this. It's really a one time shot for this upgrade we are doing.

    Thanks for your help.

    Cory

Viewing 4 posts - 1 through 3 (of 3 total)

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