DBCC SHRINKFILE question

  • Hi everyone, my question is if I run DBCC SHRINKFILE to shrink and truncate my logs, do I have to do a full backup afterwards? If yes, is there a way to shrink the log files without having to do a full backup afterwards? Thanks.

  • Every time you truncate the logs you should do a full backup. Because if a dissaster occurs the you won't be able to recover until the last minute, only until the last backup you made.

    To truncate the log use the backup statement.

    If your log file is too big or is growing too fast, then implement a backup strategy to backup the log more often. Every time you backup the log, the commited transactions that are saved in the log are deleted, so the log file size decrese.

  • When my log file sizes increases I truncate log file and I shrink it though EM. then I take DB backup if it's production DB. Is this a right way to do it or truncate should work implicitly?

  • racosta, you wrote:

    "Every time you backup the log, the commited transactions that are saved in the log are deleted, so the log file size decrese."

    Thats what I thought would happen and implemented a backup schedule that would backup the logs more often. But my log file sizes do not decrease. Is it that SQL Server only truncates the log but does not shrink it?

    hirenk, you can truncate and shrink the logs through EM. Right click on a database, go to All Tasks>Shrink Database>Files and choose your log file from the top. Choose the appropriate options and it will truncate and shrink for you.

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

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