USE [master]
GO
ALTER DATABASE [数据库名称] SET RECOVERY SIMPLE WITH NO_WAIT
GO
ALTER DATABASE [数据库名称] SET RECOVERY SIMPLE
GO
USE BaoBeiGuanLi
GO
DBCC SHRINKFILE ( [数据库日志文件名]‘ , 0,TRUNCATEONLY)
GO
USE [master]
GO
ALTER DATABASE [数据库名称] SET RECOVERY FULL WITH NO_WAIT
GO
ALTER DATABASE [数据库名称] SET RECOVERY FULL
GO
--不知道数据库名称怎么办?
--下面是查询数据库的日志文件名称的sql语句
USE [数据库名称]
GO
SELECT name FROM SYS.database_files WHERE type_desc=‘LOG‘