Sql Server2014資料庫日誌佔用特別大,清理方法。直接貼程式碼
USE[master] GO ALTER DATABASE db_Name SET RECOVERY SIMPLE WITH NO_WAIT GO ALTER DATABASE db_Name SET RECOVERY SIMPLE --簡單模式 GO USE db_Name GO DBCC SHRINKFILE (N`db_Name_log` , 11, TRUNCATEONLY) GO USE[master] GO ALTER DATABASE db_Name SET RECOVERY FULL WITH NO_WAIT GO ALTER DATABASE db_Name SET RECOVERY FULL --還原為完全模式 GO