Skip to content

Instantly share code, notes, and snippets.

@alexruzenhack
Last active November 27, 2018 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexruzenhack/41e4f2b0167df417e465080a5aabee71 to your computer and use it in GitHub Desktop.
Save alexruzenhack/41e4f2b0167df417e465080a5aabee71 to your computer and use it in GitHub Desktop.
✂️ Shrink log file of #sqlserver
USE [nomeSeuBancoDeDados];
CHECKPOINT;
GO
CHECKPOINT; -- run twice to ensure database file wrap-around last transactions
GO
-- 200 MB
DBCC SHRINKFILE(nomeSeuBancoDeDados_log, 200);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment