用存储过程清除数据库日志
搞个SP来清日志也比较爽 呵呵
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
-- =============================================
-- powered by donets.cnblogs.com
-- =============================================
CREATE PROCEDURE [dbo].[ClearLog]
AS
BEGIN
SET NOCOUNT ON;
-- =============================================
-- powered by donets.cnblogs.com
-- =============================================
DECLARE @DB_Name nvarchar(500)
Set @DB_Name=db_name()
BACKUP LOG @DB_Name WITH NO_LOG;
DBCC SHRINKDATABASE (@DB_Name,0);
END
set QUOTED_IDENTIFIER ON
GO
-- =============================================
-- powered by donets.cnblogs.com
-- =============================================
CREATE PROCEDURE [dbo].[ClearLog]
AS
BEGIN
SET NOCOUNT ON;
-- =============================================
-- powered by donets.cnblogs.com
-- =============================================
DECLARE @DB_Name nvarchar(500)
Set @DB_Name=db_name()
BACKUP LOG @DB_Name WITH NO_LOG;
DBCC SHRINKDATABASE (@DB_Name,0);
END