在咱們平常的數據庫運行中,通常數據庫文件才幾十M ,但ldf 的日誌文件就佔到了 幾個G的空間,因此 有時須要清理一下。下面是運行腳本的語句:數據庫
declare @db nvarchar(20)set @db='你的數據庫文件名'dump transaction @db with no_logbackup log @db with no_logdbcc shrinkdatabase(@db)日誌