--数据库名称sjjhzx,日志文件名称ksoa_zuizhong_Log' USE sjjhzx GO ALTER DATABASE sjjhzx SET RECOVERY SIMPLE WITH NO_WAIT GO ALTER DATABASE sjjhzx SET RECOVERY SIMPLE GO USE sjjhzx GO DBCC SHRINKFILE (N'ksoa_zuizhong_Log' , 11, TRUNCATE…
USE [master] GO ALTER DATABASE F360DW SET RECOVERY SIMPLE WITH NO_WAIT GO ALTER DATABASE F360DW SET RECOVERY SIMPLE --简单模式 GO USE F360DW GO , TRUNCATEONLY) /* --这里的DNName_Log 如果不知道在sys.database_files里是什么名字的话,可以用以下注释的语句进行查询 USE F360DW GO SELECT file_i…
第一步: Use 数据库名 Select NAME,size From sys.database_files 将“数据库名”改为需要清除日志的数据库名字,点击“执行”查询出需要清除的日志名称:**_Log 第二步: Use 数据库名 Select NAME,size From sys.database_files ALTER DATABASE 数据库名 SET RECOVERY SIMPLE WITH NO_WAITALTER DATABASE 数据库名 SET RECOVERY SIM…
USE [master] GO ALTER DATABASE [数据库名] SET RECOVERY SIMPLE WITH NO_WAIT GO ALTER DATABASE [数据库名] SET RECOVERY SIMPLE GO USE [数据库名] GO DBCC SHRINKFILE (N'[数据库日志文件名称]' , 0,TRUNCATEONLY) GO USE [master] GO ALTER DATABASE [数据库名] SET RECOVERY FULL WITH NO_…
/*设置为简单模式*/ USE [master] } SET RECOVERY SIMPLE WITH NO_WAIT } SET RECOVERY SIMPLE /*获取日志文件名称*/ } ) /*收缩日志文件*/ , TRUNCATEONLY) /*还原为完全模式*/ USE [master] } SET RECOVERY FULL WITH NO_WAIT } SET RECOVERY FULL {0}替换成数据库名称即可.…
USE [master] GO ALTER DATABASE DBNAME SET RECOVERY SIMPLE WITH NO_WAIT GO ALTER DATABASE DBNAME SET RECOVERY SIMPLE --简单模式 GO USE DBNAME GO DBCC SHRINKFILE (N'DBNAME_log' , 11, TRUNCATEONLY) GO USE [master] GO ALTER DATABASE DBNAME SET RECOVERY FULL…
m缪国瑞 11:10:17 --'这里的DNName_Log 如果不知道在sys.database_files里是什么名字的话,可以用以下注释的语句进行查询USE dochuanGOSELECT file_id, name FROM sys.database_files;GO --开始清理USE [master]GOALTER DATABASE dochuan SET RECOVERY SIMPLE WITH NO_WAITALTER DATABASE dochuan SET RECOVERY…