To shrink tempdb

Many times we try to shrink Tempdb due to space issue, but even after more than 90% space free it doesn't shrink

Script to shrink

CREATE TABLE freefilespace
    (
         fileid       INT,
         filegroup    INT,
         totalextents INT,
         usedextents  INT,
         dbname       VARCHAR(256),
         filename     VARCHAR(2000)
    )

Amazon Contextual Product Ads

Popular Posts