清除SqlServer AlwaysOn日志

Posted on Jun 30, 2018

--dbName为数据库名

use dbName

BACKUP LOG dbName To DISK = N'nul'

go

dbcc shrinkfile(dbName_log,0, TRUNCATEONLY)

go

dbcc shrinkdatabase(dbName,0, TRUNCATEONLY)

go