use databasename BACKUP LOG databasename WITH NO_LOG DUMP TRANSACTION databasename WITH NO_LOG DBCC SHRINKDATABASE(databasename)
--查看数据库日志文件名等信息 select name from sysfiles
USE[master] GO ALTER DATABASE databasename SET RECOVERY SIMPLE WITH NO_WAIT GO ALTER DATABASE databasename SET RECOVERY SIMPLE GO USE FDCS_BJLDHX_BSN GO DBCC SHRINKFILE (N'databasename_log' , 1, TRUNCATEONLY) GO USE[master] GO ALTER DATABASE databasename SET RECOVERY FULL WITH NO_WAIT GO ALTER DATABASE databasename SET RECOVERY FULL GO
原文地址:http://blog.csdn.net/zhoujiaoshou/article/details/44243433