TrialUser
asked on
Transaction log is full for the ASP state db. How do I shrink or delete the transaction log?
The transaction log for database 'ASPState' is full due to 'ACTIVE_TRANSACTION'. My production website is down because of this error. My database is on SQL server 2014. How do I shrink or clear the transaction log Please help.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Given that your website is down, I would go into emergency mode and first just get it running. We can, and should and will, worry about other related issues later.
Run these commands, then report the log file total size and the % free.
USE ASPState
ALTER DATABASE ASPState SET RECOVERY SIMPLE;
CHECKPOINT
WAITFOR DELAY '00:01:00'
CHECKPOINT
EXEC sp_helpfile
DBCC SQLPERF ( LOGSPACE )
If the log file is (very) large, run this command too to see how many VLFs you have:
DBCC LOGINFO
Run these commands, then report the log file total size and the % free.
USE ASPState
ALTER DATABASE ASPState SET RECOVERY SIMPLE;
CHECKPOINT
WAITFOR DELAY '00:01:00'
CHECKPOINT
EXEC sp_helpfile
DBCC SQLPERF ( LOGSPACE )
If the log file is (very) large, run this command too to see how many VLFs you have:
DBCC LOGINFO
Here is the technet article for backing up SQL 2014, please review in adjust to meet your needs.
https://msdn.microsoft.com/en-us/library/ms179478.aspx