Running a shrink on a database and log file.

  • Hi guys!

    I have a large database (around 2TB in total) and I am running a shrink at the main filegroup. There is a reason for this, tables have moved in different folders etc...

    The question is when i Run this shrink and i take the transaction log backups (i have them every 15 min) how much space would one think it will require?

    To make it clearer my question is if the shrink dbcc command produces a lot of LOG activity. (as much as inserts etc...)

    Thank you in advance

  • 2GB or 2 TB?

    2 GB is nothing. If you're out of room buy a bigger HD. Never run shrink regularly on a db, it just brings you trouble.

  • you are correct it is 2TB.

    Yes i know it brings trouble but it is the only solution. I am searching for an answer to my question, the shrink is already running so although i appreciate the warnings, it is already late 🙂 😛

  • You can stop a shrink... 😀

    Though if this is a once-off after moving tables to different filegroups, it's OK. Just rebuild all your indexes afterwards (and preferably don't shrink the log, just the individual data files that you've moved objects from)

    If you have shrink the log then, once the shrink is finished grow the log back to a reasonable size before you rebuild the indexes.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

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

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