Deleting of transaction logs. | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Deleting of transaction logs.

I have a database, and i want to delete the transaction logs which is taking a majority of the disk space. can i delete the transaction log file or is there any other better solution.
I feel deleting txlog can create few issues while backup and restore.
U can take backup of tx_log and then shrinking the log would be better solution i feel using
DBCC shrinkfile(2,10)

The transaction log is the important file to record all the activities on the database, and you cannot delete it. As suggested by Ranjit its better to maintain frequent backup logs or keep the database recovery model to SIMPLE, and ensure to maintain full database backup in regular intervals. Refer to the books online and thishttp://support.microsoft.com/kb/317375 andhttp://www.devx.com/getHelpOn/10MinuteSolution/16493/1954?pf=true for your reference. 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.
Hi,
this is the command used to truncate / Delete the log file : backup log master with truncate_only hsGoswami
[email protected]
There is no need to truncate the log for master database, as its recovery model is SIMPLE by default and never attempt to delete a log file for a database. It will mark the user database as SUSPECT. Managing regular database backups for system database is sufficient.
And regular monitoring for disk space where the user databases are located. 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.
Hi,
it seems theirs confusion becoz i have just give a example of the truncating log and nitingulati7 has use his database name(for which he wants to delele log) and not master table….
hsGoswami
[email protected]
Its better to avoid confusion and always refer the database name as DBNAME or some other name instead of using MASTER database. I appreciate your concern in helping the originator but I feel there is another way to represent the solution. HTH 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.
]]>