SQl 2008 Shrinking the transaction Log

by ebarcza 7/31/2012 9:38:00 AM

When issuesing these TSQL commands, make sure you're an admin and the target database is selected/active

 

  1. Open a query window
  2. make sure your target database is active by issueing a 'use databasename' statement, or selecting the appropriate database in the dropdown
  3. Change the Recovery Model to Simple; Alter database databaseName SET Recovery Simple
  4. Shrink the file using DBCC ShrinkFile; DBCC Shrinkfile('Logical name of Log', 1)
  5. Then switch it back to FULL database recovery mode if desired


Tags:

SQL SERVER

Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen

About the author

Name of author Author name
Something about me and what I do.

E-mail me Send mail

Calendar

<<  July 2018  >>
MoTuWeThFrSaSu
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345

View posts in large calendar

Recent comments

Tags

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2018

Sign in