Tuesday, May 19, 2020

The transaction log for database 'Database Name' is full due to 'LOG_BACKUP

This error faced by me, during huge data insert in one table. In between Pentaho got crashed, using which i am inserting huge random data in table.

Can we fix this. If you are working in IT industry, should i do this my self, or should i approach the database administrator. I suggest we can do this in without any data loss, if you stuck in emergency requirement.

This error you will face cause of transaction logs got full cause of LOG_BACKUP when high insert update delete operation performed. At this stage we will not able to perform any kind of task on database.

To solve the issue we need to execute below steps:
  • Take Full database backup
  • Shrink log file to reduce the physical file size (ldf file)
  • Create a LOG Backup

Below are the steps need to perform on database:
ALTER DATABASE "Database Name" SET RECOVERY SIMPLE;
GO
DBCC SHRINKFILE ("Database Name", 1);  -- Shrink the log file to 1 MB
GO
ALTER DATABASE "Database Name" SET RECOVERY FULL;  
GO

No comments:

Post a Comment

web stats