USE ABC--数据库名
select * from sys.database_files--查看日志文件名
USE [master]
GO
ALTER DATABASE ABC SET RECOVERY SIMPLE WITH NO_WAIT--TechMisDB为要清理的数据库名
GO
ALTER DATABASE ABC SET RECOVERY SIMPLE --简单模式
GO
USE ABC
GO
DBCC SHRINKFILE (N'ABC_log' , 11, TRUNCATEONLY)--用上面有Select查看到的日志的文件名
GO
USE [master]
GO
ALTER DATABASE ABC SET RECOVERY FULL WITH NO_WAIT
GO
ALTER DATABASE ABC SET RECOVERY FULL --还原为完全模式
GO
标签:USE,ABC,--,清理,SqlServer,SET,GO,日志,ALTER From: https://www.cnblogs.com/liaoweiyang/p/17044120.html