【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