SQL Server 删除数据库log文件

USE [master]
GO
ALTER DATABASE EMFDoc SET RECOVERY SIMPLE WITH NO_WAIT
GO
ALTER DATABASE EMFDoc SET RECOVERY SIMPLE --简单模式
GO
USE EMFDoc
GO
DBCC SHRINKFILE (N'EMFDoc_Log' , 11, TRUNCATEONLY) 
GO
USE [master]
GO
ALTER DATABASE EMFDoc SET RECOVERY FULL WITH NO_WAIT
GO
ALTER DATABASE EMFDoc SET RECOVERY FULL --还原为完全模式
GO

你可能感兴趣的:(SQL Server 删除数据库log文件)