My transaction log for database is full due to 'LOG_BACKUP’ in MSSQL. Solution. What should I do?

1. Login into SQL management studio.

2. Click on new query.

3. Run below query after updating your database name and db log file name.

USE {database-name}; 

GO 

-- Truncate the log by changing the database recovery model to SIMPLE. 

ALTER DATABASE {database-name}

SET RECOVERY SIMPLE; 

GO 

-- Shrink the truncated log file to 1 MB. 

DBCC SHRINKFILE ({database-file-name}, 1); 

GO 

-- Reset the database recovery model. 

ALTER DATABASE {database-name}

SET RECOVERY FULL

GO

4. Click on execute button.

5. It will shrink your database log file.

Ask a question

"Hey couldn't find what you were looking for in our knowledgebase? Please enter your question here".

First Name *
Last Name *
Email Address *
Question *
Captcha *