• GAWDS
  • Nik Makris is a Learning Tree .NET Enterprise Application Development Certified Professional
    .NET Enterprise Application Development
    Certified Professional
    Learning Tree International
  • Nik Makris is certified under the CCNA® program
    Nik Makris is certified under the CCNA® program
  • Nik Makris is Google Analytics Qualified
    Nik Makris has obtained the Google Analytics Individual Qualification
Blog

Truncating and Shrinking a SQL Server logfile

19. December 2005 04:29

It's such a pain when a SQL Server log file runs away with it's self on a development machine. I always forget the T-SQL to truncate and shrink the log file, so I thought I'd post it here for future reference.

BACKUP LOG <database name> WITH TRUNCATE_ONLY

DBCC SHRINKFILE ('<datbase file minus extension>',1)

Tags:

Filed under: Databases

Comments are closed