对于SQL Server 2008 命令backup log [POS20130726] with no_log 已不再适用。
此命令在SQL Server 2008中会报如下提示错误:
One or more of the options (no_log) are not supported for this statement. Review the documentation for supported options.
于是又到网上搜其他方法
1.直接用命令执行
GO
ALTER DATABASE POSTESTQC
SET RECOVERY SIMPLE--设置简单恢复模式
GO
DBCC SHRINKFILE (POS_Log, 1)
GO
ALTER DATABASE POSTESTQC
SET RECOVERY FULL--恢复为原模式
GO
2.用sql server 管理工具
1.将数据库设置成 简单 模式
选择要收缩的数据库,点右键 属性->选项,选择 简单模式

2.选择任务->收缩->文件

3.选择日志
