Shrink Database

  • I have 200GB DB I want to Shrink I can there is 75GB of space available....IF I shrink this DB how long will it take??

    ANy idea this is in 2000?

    Nita

  • Shrinking databases is generally a bad idea. A database needs some space in it for normal operation.

    How long is a question that's very hard to answer. It depends on the drives the DB is on, any concurrent access, anything else on the server and a number of other factors.

    If you do decide to shrink the DB, be sure to rebuild all your indexes afterwards. Shrinking a DB shuffles index pages badly. See - "Shrinking databases[/url]"

    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
  • How much is your data growing by? 75GB isn't that much and it's good to keep free space in there. It's used during index rebuilds, data growth, etc.

    As Gail mentioned, I wouldn't shrink unless you had to and even then, I'd make sure you have a few months of free space in there.

  • In addtiontion to Gail & Steve;

    Shrink database is resource consuming hence use cautiously on the production server.

    ---------------------------------------------------
    "Thare are only 10 types of people in the world:
    Those who understand binary, and those who don't."

  • ...AND...

    Until you figure out what made it grow that big to begin with, it's not gonna do you any good to shrink it because the same something is gonna make it grow again. The more times you do this, the more fragmented the disk storage will be for the DB and the slower your DB will become over time... unless you also have a good disk defrag program running on the server.

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

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

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