首页 > 代码库 > SQLServer清空日志

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清空日志