Error : "The log file for database 'Database_Name' is full."
After facing this problem , i want to share solution with all of you .
Use these following steps ,
this will shrink database log files and removes this ERROR
Queries :-
USE Database_Name
GO
SELECT * FROM sysfiles WHERE name LIKE '%LOG%'
GO
USE [Database_Name]
GO
ALTER DATABASE [Database_Name] SET RECOVERY SIMPLE
GO
USE [Database_Name]
GO
CHECKPOINT
GO
USE [Database_Name]
GO
BACKUP LOG [Database_Name] WITH NO_LOG
GO
USE [Database_Name]
GO
SELECT Name FROM sysfiles WHERE name LIKE '%LOG%'
GO
USE [Database_Name]
GO
DBCC SHRINKFILE ([Database_Name_log], 1)
GO
USE [Database_Name]
GO
SELECT * FROM sysfiles WHERE name LIKE '%LOG%'
GO
USE [Database_Name]
GO
ALTER DATABASE [Database_Name] SET RECOVERY Full
GO
Just replace your database name with "Database_Name".
Thanks
Cheers
After facing this problem , i want to share solution with all of you .
Use these following steps ,
this will shrink database log files and removes this ERROR
Queries :-
USE Database_Name
GO
SELECT * FROM sysfiles WHERE name LIKE '%LOG%'
GO
USE [Database_Name]
GO
ALTER DATABASE [Database_Name] SET RECOVERY SIMPLE
GO
USE [Database_Name]
GO
CHECKPOINT
GO
USE [Database_Name]
GO
BACKUP LOG [Database_Name] WITH NO_LOG
GO
USE [Database_Name]
GO
SELECT Name FROM sysfiles WHERE name LIKE '%LOG%'
GO
USE [Database_Name]
GO
DBCC SHRINKFILE ([Database_Name_log], 1)
GO
USE [Database_Name]
GO
SELECT * FROM sysfiles WHERE name LIKE '%LOG%'
GO
USE [Database_Name]
GO
ALTER DATABASE [Database_Name] SET RECOVERY Full
GO
Just replace your database name with "Database_Name".
Thanks
Cheers
No comments:
Post a Comment