Set Database Recovery Mode to Simple and Shrink Database

PHOTO EMBED

Tue Jul 05 2022 21:26:13 GMT+0000 (Coordinated Universal Time)

Saved by @dhfinch #sqlserver #dbmaintenance

-- First backup the database and Log.

-- Then set Recovery Mode to Simple
ALTER DATABASE MOI_20161206024518612 SET RECOVERY SIMPLE
Go

-- Then Shrink the Database Log to (almost) nothing
DBCC SHRINKDATABASE (MOI_20161206024518612)
go
content_copyCOPY

DBs were set to recovery mode Full and log files had grown to 90Gb in some cases.