When: tempdb too large

xiaoxiao2021-03-06  21

How to shrink tempdb.mdf:

Exec Backup log tempdb with no_log the restart SQL Service If not used, then execute: use tempdbdbcc shrinkfile (Tempdev, 1)

How to shrink tempdb.log

1: DBCC ShrinkDatabase (Tempdb, 10) --- 10 Percent2: DBCC ShrinkFile (LogicalFileName, Newsize) --- Newsize: MB

Why:

When Tempdb is used to store temporary table data, it is reset to its initial size each time you start the database engine.

转载请注明原文地址:https://www.9cbs.com/read-60886.html

New Post(0)