【SQLServer2019管理】事务日志备份策略

查询日志大小:

dbcc sqlperf(logspace)

go

备份事务日志,之后清理掉3天前的备份,最后的目的是进行日志收缩

收缩的T-SQL语句

USE [infusion]
GO
DBCC SHRINKFILE (infusion_log,100)
GO
DBCC SHRINKFILE (infusion_log,100)
GO
USE [WIN60]
GO
DBCC SHRINKFILE (win60_baseline_v2_log,100)
GO
DBCC SHRINKFILE (win60_baseline_v2_log,100)
GO

 

posted on 2023-12-08 18:37  HelonTian  阅读(69)  评论(0编辑  收藏  举报