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

Please explain what is “asynchronous” communication in sql server service broker?

513


What is cross join in sql server joins?

604


What is the purpose of self join?

507


Can you pass expressions to function parameters?

546


What are the differences between web role and worker role?

100






What are the aggregate and scalar functions?

530


What options are there to delete rows on the publisher and not on the subscriber? : sql server replication

687


What are different types of replication in sql server?

576


What will be the maximum number of indexes per table?

539


Where can you add custom error messages to sql server?

589


What is field with example?

520


What is the difference between varchar and varchar(max) datatypes?

565


Explain the phases a transaction has to undergo?

558


What do you understand by integration services in sql server?

560


What is a subquery in a select query statement in ms sql server?

593