USE abframeworkf2
DECLARE @LogFileLogicalName sysname
SELECT @LogFileLogicalName=Name FROM sys.database_files WHERE Type=1
PRINT @LogFileLogicalName
DBCC SHRINKFILE (@LogFileLogicalName, 1);
ALTER DATABASE abframeworkf2 SET RECOVERY SIMPLE
GO
-- 收缩
DBCC SHRINKFILE (2,1) --30单位为M,日志文件的大小
GO
-- 更改模式为FULL ,再改回来,如果本身就已是simple,那就不必要了
ALTER DATABASE abframeworkf2 SET RECOVERY FULL
GO