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.

  • 0 Kasutajad peavad seda kasulikuks
Kas see vastus oli kasulik?

Seotud artiklid

 I am not able to login to SQL Server with the SQL authentication. What should i do?

Enabling SQL Server Authentication through SQL Management Studio Open SQL Server Management...

 I am not able to restore database (or attach) created in the upper version into lower version. What should I do?

The only way is to create a script for all objects and use the script to generate database....