How to TRUNCATE transaction log of a SQL Server database?
I hav installed BW 3.5 on Windows / MS SQL database.
Now my transaction log is growing very high in my Quality & Production server. Please guide me how can i truncate its size.
In PRD currently log size has reached 140 GB.
Wat shd i do system is becoming too slow.
Regards & Thanks,
Run the following Transact-SQL statements in Query analyzer:
1. Clear log file :
BACKUP LOG DatabaseName WITH NO_LOG
2. Shrink the transaction log file.
DBCC SHRINKFILE (<FileName>, <TargetSize>) WITH NO_INFOMSGS
3. If the DBCC SHRINKFILE statement does not shrink the transaction log file to the target size, run the BACKUP LOG statement that is mentioned in step 1 to make more of the virtual log files inactive
4. Run the DBCC SHRINKFILE statement that is mentioned in step 2. After this operation, the transaction log file should be similar to the target size.