sqlserver LDF 文件过大 清理日志

USE [master]
GO
ALTER DATABASE 库名 SET RECOVERY SIMPLE WITH NO_WAIT
GO
ALTER DATABASE 库名 SET RECOVERY SIMPLE --简单模式
GO
USE 库名
GO
DBCC SHRINKFILE (N'日志文件逻辑名' , 11, TRUNCATEONLY)
GO
USE[master]
GO
ALTER DATABASE 库名 SET RECOVERY FULL WITH NO_WAIT
GO
ALTER DATABASE 库名 SET RECOVERY FULL --还原为完全模式
GO
 

  


日志文件逻辑名如果不确定,可以这样查出来

USE 库名
GO
select * from sysfiles

  

上一篇:Cyber-Physical Systems Security Based on a Cross-Linked and Correlated Vulnerability Database


下一篇:H2 DataBase入门