Search code examples
sql-serverdatabase-designtransaction-log

How to split SQL Server Transaction Log


My database server has just ran out of disk space. The Transaction log is taking over 100GB space and I have only 30GB free space. Because of this some transactions are taking infinite amount of time to process resulting in 9002 error.

I would like to ask is there a way I can split this transaction log and delete one of them to get some free space. There is no way now that I can take a backup or increase the disk space by adding another disk.

If any one has a better solution than splitting up the transaction log, then that would be great.


Solution

  • There are lots of good resources about dealing with large logs linked to from here:

    https://sqlblog.org/2009/07/27/oh-the-horror-please-stop-telling-people-they-should-shrink-their-log-files

    Basically, you either need to get more space, backup the logs, or switch to simple recovery mode on your databases. Each approach has its ups and downs.