SQL stops working in every 15 days displaying message that
database log file is full. Log file size is 3.95 GB. It is
happening after shrinking the database also. What is
solution to overcome this problem. Please help me as it's
urgent.

Answer Posted / sujay kumar

You should schedule the job for shrinking the database log.
Sometime, it looks impossible to shrink the Truncated Log
file. Following code always shrinks the Truncated Log File
to minimum size possible.
USE DatabaseName
GO
DBCC SHRINKFILE(<TransactionLogName>, 1)
BACKUP LOG <DatabaseName> WITH TRUNCATE_ONLY
DBCC SHRINKFILE(<TransactionLogName>, 1)
GO

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are subquery and its properties?

731


What the different components in replication and what is their use?

713


How to maintain a fill factor in existing indexes?

701


How to execute a sql statement using mssql_query()?

712


How to find the service pack installed? : sql server database administration

770






tell me what is blocking and how would you troubleshoot it? : Sql server database administration

673


What is a file group?

787


Define full outer join in sql server joins?

668


What is sql azure database?

198


Explain few examples of RDBMS?

764


What is the purpose of sql profiler in sql server?

699


Explain cross join or cartesian product in sql?

698


What is field with example?

680


What is updatable resultset?

688


What are the differences between triggers and stored procedures?

724