Delete SQL log file | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Delete SQL log file

Hi
How to delete the sql log file periodically ?
Autoshrink property don’t work in some situations.
An trigger or a stored procedure to do this.

I believe you mean to say TRUNCATE the Transaction log, as you cannot delete the transaction log file. To shrink the TLog use DBCC SHRINKFILE and refer to books online for more information.
You can schedule the event as per the requirement. Also you can keep the database recovery model to SIMPLE and perform frequent database backups, or in FULL recovery model perform transaction log backups frequently in order to truncate the logical size of Tlog. Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
]]>