sqlserver清理temlog

DBCC SHRINKFILE (N'templog', 256);

 

 

 


USE lqtest
GO

-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE lqtest
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
DBCC SHRINKFILE (JSTW_Log);
GO
-- Reset the database recovery model.
ALTER DATABASE lqtest
SET RECOVERY FULL;
GO

posted @ 2024-04-11 14:48  zhaoguanhao  阅读(18)  评论(0编辑  收藏  举报