TempDB: need to resize Data File

  • Hello Everyone

    Data File for TempDB is 32 GB big in File size and it uses only 13.5 MB so I need to re size the data file to 1GB.

    This is production server so please help me to do so with out restarting server.

    namefilenameFileSizeMBSpaceUsedMBFreeSpaceMB

    tempdevS:\Data\tempdb.mdf32617.8113.4432604.38

    templogS:\Data\templog.ldf672.25456.84215.41

    Thanks for Your Help

  • Why do you need to do this? The database would not have grown to this size unless SQL needed it to..

    CEWII

  • tempdb will be used as required for temporary storage.

    There's a good chance you have a SProc or some query that's generating a huge amount of temp storage that's requiring a high growth.

    I'd advise that you set the growth to something like 10%, that'll be 3.2GB which should be plenty judging by how much space you're using. That or you can set it to something like 50MB, I think the default is 1MB.

    I'm not an expert when it comes to the physical database settings, so please take my words lightly. I typically consult a close friend on these issues, his name is google.

    Whatever you do, don't set the size to 1GB. More than likely you'll corrupt your database.

  • Voide is correct, it might be a good idea to research why it's so large.

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

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