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.
Answers were Sorted based on User's Feedback
Answer / nixo
You will have to backup the Transaction Log. You may
schedule a job which backs up the log every night.
Backup the log before shrinking the database.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / 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 |
Answer / rajesh ranjan
In MS SQL Server 2005
select * from sys.database_files
Above Query will return .mdf , .ldf file & all other
details releted to these files of the database
After that you should run following DBCC Statement
DBCC Shrinkfile(Log_file_name.ldf,1,truncateonly)
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / rajkumar
You should schedule the job for shrinking the database log.
or you have to minimize the growth of the log file.
Is This Answer Correct ? | 0 Yes | 0 No |
What is Transaction?
What will happen when a Rollback statement is executed inside a trigger?
1 Answers Flextronics, Hexaware,
Can we join two tables without primary key?
What is normalization? What number of normalization shapes are there?
Explain throw statement in sql server 2008?
What are the type of Indexes? which one is best, why?
How to transfer Logins from SQL Server 2000 to 2005
Explain what is public role in sql server?
What are different types of statement?
How can we determine what objects a user-defined function depends upon?
How to retrieve range of 10th rows to 20 th rows from total rows from a database table.? (Not from Dataset)
10 Answers Cognizant, Infosys,
sql server architecture ?