Skip to main content
Home
Live to Learn!

Main navigation

  • Home
  • Learn
    • FoxPro
    • MS-DOS
    • C PRG
    • Java
    • ASP
    • Ruby on Rails
    • ASP.NET
    • E-Books
    • Exam Preparation
    • Tools
  • Blog
  • Forums
  • Contact
User account menu
  • Log in

Breadcrumb

  1. Home
  2. Forums
  3. Computers & Technology
  4. Hardware & Troubleshooting

Truncate MS SQL Database Log file

By Divya , 20 April, 2017
Large size of log file can be truncated using the below command. Make sure to take backup if log file is necessary. Replace the database name 'test' and log file name 'test_log' in the below below query then execute.

USE test
GO
ALTER DATABASE test SET RECOVERY SIMPLE WITH NO_WAIT
DBCC SHRINKFILE(test_log,1)
ALTER DATABASE test SET RECOVERY FULL WITH NO_WAIT
GO
Forums
Hardware & Troubleshooting
  • Add new comment

Featured Blog Posts

Convert Currency in Number to Words (Indian Rupees) - MS Excel
Foxpro Tutorial and Programs
Convert Currency in Number to Words in MS Word
Convert Currency in Number to Words (Indian Rupees) - Version 2
Best way to Use Rupee Symbol in Windows – Easy steps
Convert Currency in Number to Words - MS Access
Creating All in One Windows XP DVD with all Important Applications
RSS feed

© 2009-2025 Live to Learn.In

Terms of Use | Privacy Policy