当前位置:Gxlcms > mysql > 对SQLServer2008的日志文件进行截断

对SQLServer2008的日志文件进行截断

时间:2021-07-01 10:21:17 帮助过:24人阅读

需要将@DBName改为实际的数据库名 SQL Server 源码与演示: 源码出处 ALTER DATABASE @DBName SET RECOVERY SIMPLE WITH NO_WAITDBCC SHRINKFILE(@DBName_log, 1)ALTER DATABASE @DBName SET RECOVERY FULL WITH NO_WAITGO

需要将 @DBName 改为实际的数据库名 SQL Server

源码与演示:源码出处

ALTER DATABASE @DBName SET RECOVERY SIMPLE WITH NO_WAIT
DBCC SHRINKFILE(@DBName_log, 1)
ALTER DATABASE @DBName SET RECOVERY FULL WITH NO_WAIT
GO  

人气教程排行