SQLServer2008 收缩日志
USE [master] GO ALTER DATABASE DBName SET RECOVERY SIMPLE WITH NO_WAIT GO ALTER DATABASE DBName SET RECOVERY SIMPLE --简单模式 GO USE DBName GO DBCC SHRINKFILE (N'DBName_log',0, TRUNCATEONLY) GO USE [master] GO ALTER DATABASE DBName SET RECOVERY FULL WITH NO_WAIT GO ALTER DATABASE DBName SET RECOVERY FULL --还原为完全模式 GO
----------------
不知道日志名字,查询方法:
USE DBName GO SELECT file_id, name FROM sys.database_files; GO