Truncate Log File in SQL Server

Author by Hozafa Motiwala

Here is a quick SQL Query to truncate the log file for a SharePoint Database or any SQL Database: ~ First: Copy the below query in SQL ~ Second: Change @DatabaseName to < Database Name>, @DatabaseName_log to ~ Third: Check and Execute the SQL Query  
ALTER DATABASE @DatabaseName SET RECOVERY SIMPLE WITH NO_WAIT
DBCC SHRINKFILE(@DatabaseName_log, 1)
ALTER DATABASE @DatabaseName SET RECOVERY FULL WITH NO_WAIT
GO
Author

Hozafa Motiwala

Technical Architect