Please I got this error message when trying to delete some rows a table on my database :
message 9002, level 17, state 2, line 48 The transaction log for database 'NewHopeHospial' is full due to 'log_backup'.
Please what do I do
Please I got this error message when trying to delete some rows a table on my database :
message 9002, level 17, state 2, line 48 The transaction log for database 'NewHopeHospial' is full due to 'log_backup'.
Please what do I do
Your database is in full recovery mode and you're not taking log backups, either because they were never set up or they are failing.
It's also possible that you are taking log backups, you've run so many transactions that the log file has filled up, and you have to wait for the next log backup. But 99% of the time this error message means that you're in FULL recovery without scheduled log backups.
So either start taking log backups, figure out why they are failing, or switch the database to SIMPLE recovery mode, and shrink the log file. eg
use NewHopeHospial
go
ALTER DATABASE current SET RECOVERY SIMPLE WITH NO_WAIT
declare @log nvarchar(200) = (select name from sys.database_files where type = 1)
DBCC SHRINKFILE (@log , 50)