清空数据库日志
use 数据库
dump transaction 数据库 with no_log
backup log 数据库 with no_log
dbcc shrinkdatabase(数据库)
--下面是sqlserver2008的方法
USE [master]
GO
ALTER DATABASE arpdb SET RECOVERY SIMPLE WITH NO_WAIT
GO
ALTER DATABASE arpdb SET RECOVERY SIMPLE --简单模式
GO
USE arpdb
GO
DBCC SHRINKFILE (N'arpdb_Log' , 11, TRUNCATEONLY)
GO
USE arpdb
GO
USE [master]
GO
ALTER DATABASE arpdb SET RECOVERY FULL WITH NO_WAIT
GO
ALTER DATABASE arpdb SET RECOVERY FULL --还原为完全模式
GO