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 will happen if a column containing char type data is changed to the nchar data type?

633


What is an execution plan? How would you view the execution plan?

555


How does using a separate hard drive for several database objects improves performance right away?

540


What are date and time data types in ms sql server?

543


Explain logical operators in sql server?

582






Define synonym?

736


Write SQL queries on Self Join and Inner Join.

629


Give an example of SQL injection attack ?

578


Explain “@@rowcount” and “@@error” in sql server?

549


What are the properties of the transaction?

557


What is msdb database? : SQL Server Architecture

553


Where is trigger in sql server?

549


What is a performance monitor?

566


What are the new features introduced in SQL Server 2000 (or the latest release of SQL Server at the time of your interview)? What changed between the previous version of SQL Server and the current version?

601


What is table level trigger?

600