Tag Info

Hot answers tagged


This is an older question, but there are some things that were not explained well and this will hopefully shed some light. The how to shrink was answered, mostly, but this will explain the "why" part of what you are actually doing. Backups, specifically log backups, do several things. The data is written to disk as a backup set to be used or discarded ...


The script is loosely based on this one in the accepted answer. It has been updated for SQL 2014, with exception handling, atomic transactions, and a few other improvements. -- Script for SQL 2014 DECLARE @JobID UNIQUEIDENTIFIER declare @servername sysname set @servername = @@SERVERNAME SELECT @JobID = job_id FROM msdb_old.dbo.sysjobs WHERE name='My ...

Only top voted, non community-wiki answers of a minimum length are eligible