直接替换 相应的数据库名 为你要清理的数据库 即可
USE [master] GO ALTER DATABASE [数据库名] SET RECOVERY SIMPLE WITH NO_WAIT GO ALTER DATABASE [数据库名] SET RECOVERY SIMPLE GO USE [数据库名] GO DBCC SHRINKFILE ([数据库日志文件名称] , 0,TRUNCATEONLY) GO USE [master] GO ALTER DATABASE [数据库名] SET RECOVERY FULL WITH NO_WAIT GO ALTER DATABASE [数据库名] SET RECOVERY FULL GO----查询数据库日志文件名use [数据库] select * from sys.database_files
评论