Release memory to OS

  • Hi my DB is 130GB and one of the tables is 40GB. I doesnt need this table for test environments; hence I truncated or even dropped the table. but the memory is not brought back to the o/s. I have tried DBCC shrinkfile, shrinkdatabase, reindex, etc., but still the mdf file hasnt come down. Is there anyway possible. I have 10 test DBs, and space is a consraint so I need to delete the table in all the DBs except production.

  • Karthikeyan.Ponniah (1/19/2009)


    Hi my DB is 130GB and one of the tables is 40GB. I doesnt need this table for test environments; hence I truncated or even dropped the table. but the memory is not brought back to the o/s. I have tried DBCC shrinkfile, shrinkdatabase, reindex, etc., but still the mdf file hasnt come down. Is there anyway possible. I have 10 test DBs, and space is a consraint so I need to delete the table in all the DBs except production.

    You don't mean "memory"... you mean "disk space". If the database is in some recovery mode other than "SIMPLE", you will likely need to flip the test environment to "SIMPLE", do the shrink, and then change it back. Do NOT do this on the production environent... not ever. If will disrupt the backup cycle and, maybe, make recovery to a point in time usless.

    --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 2 posts - 1 through 1 (of 1 total)

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