Shrink user defined TEMP DB in SQL Server 2005

  • Hi All,

    I have user defined temp db in sql server 2005 with below configuration : -

    Initial size of temp db .mdf file = 147 GB

    Auto growth = 2 GB with unrestricted growth

    How can I shrink this .mdf file ? And how much I can shrink it ?

    AND SECOND QUESTION IS

    If my db .mdf initial size is 100 gb, with autogrowth 1 gb unrestricted growth. If .mdf file size becomes 200 gb. how much i can shrink this file ? can i shrink it upto 50 gb ?

  • You can try to shrink it as much as you want, but since it's tempdb it might not always work (or only partialy shrink).

    The best way to handle tempdb is to limit it's max size (to keep it from filling the disk), put it on it's own disk and leave it be.

    If the shrink doesn't work you can do a stop/start of the sql service to reset tempdb to it's original size (initial size).

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

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