Skip to content

Instantly share code, notes, and snippets.

@umair-me
Created October 31, 2017 16:02
Show Gist options
  • Save umair-me/28d51c7fb3c9de3a110b8812c9bc50ab to your computer and use it in GitHub Desktop.
Save umair-me/28d51c7fb3c9de3a110b8812c9bc50ab to your computer and use it in GitHub Desktop.
Shrink database
-- change the database > properties > options > recovery model to "simple" in database
-- or use this ALTER DATABASE testdb SET RECOVERY SIMPLE;
USE {DatabaseName}
DBCC SHRINKFILE ('{Log file logical name}')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment