SQLServer清空日志

 

USE [master] 
GO 
ALTER DATABASE TRAVEL SET RECOVERY SIMPLE WITH NO_WAIT 
GO 
ALTER DATABASE TRAVEL SET RECOVERY SIMPLE
GO 
USE TRAVEL
GO 
DBCC SHRINKFILE (N'TRAVEL_Log' , 11, TRUNCATEONLY) 
GO 
USE [master] 
GO 
ALTER DATABASE TRAVEL SET RECOVERY FULL WITH NO_WAIT 
GO 
ALTER DATABASE TRAVEL SET RECOVERY FULL
GO

你可能感兴趣的:(sqlserver)