Delete log file and create new log file with minimum size in SQL Server

Sign up for an Office 365 SharePoint Online Business Subscription


In this post, we will discuss how we can delete log file and create a new log file with minimum size in SQL server 2008.

Also, you can check out:
The Microsoft SQL Server Database Transaction Log (.LDF) file becomes very huge. It’s wasting a lot of disk space and causing some problems if you want to backup and restore the database. We can delete log file and create a new log file with the minimum size.
So to delete log files, follow the Steps given below –
1. Backup the database
2. Detach the database
Right-click on the database => Tasks => Detach
Delete log file and create new log file with minimum size in SQL Server
Delete log file and create a new log file with minimum size in SQL Server
3. Delete or rename the big log file (path:C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA)
4. Attach the database again
Right-click Databases => Attach
Delete log file and create new log file with minimum size in SQL Server2012
Delete log file and create a new log file with minimum size in SQL Server2012
5. On Attach Database box, click Add.
6. Browser to the database (.mdf) file then click OK
Delete log file and create new log file with minimum size in SQL Server
Delete log file and create a new log file with minimum size in SQL Server
7. Finally, click OK.
8. You can see the new log file with the minimum size


 


You May Also like the Following SharePoint Online Tutorials:

About Navneet Singh

I am Navneet Singh, Working at C3it software solutions pvt. ltd. in Pune. My core skills are SharePoint 2013, Office 365, SharePoint 2010, SharePoint Designer, SharePoint Designer Workflow, Nintex Workflow, Infopath, Webpart, CSOM/SSOM, Power-shell, C#, ASP.NET and SQL Server.

View all posts by Navneet Singh →