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
Describe in brief system database.
What are SSL and TSL protocols?
What is Dependency Injection and provide example?
How to call a function from a stored procedure in SQL Server ?
What are the differences between union, intersect, and minus operators?
what's sql server? : Sql server database administration
What is dimension table? : sql server analysis services, ssas
What are character string data types in ms sql server?
Explain contrast amongst grouped and non-bunched records?
What can be used instead of trigger?
Do you know what is normalization of database? What are its benefits?
What is the difference between deallocate cursor and close cursor?
What are views used for?
How to disable stored procedure sql server?
How to view the error log for any specific instance? : sql server database administration