收縮數據庫日誌

--收縮日誌
USE DBNAME;
GO
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE DBNAME
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (DBNAME_Log, 1);
GO
-- Reset the database recovery model.
ALTER DATABASE DBNAME
SET RECOVERY FULL;
GO
相關文章
相關標籤/搜索