I came to work today and I saw the transaction log with 441GB, using almost all disk space. I use SQL Server 2012 and have Full backup, but somehow I lost control of the t-log. So, I need to do 2 things: first, clear the log, so I have the disk space back and control it. I thought to control it doing daily backups. But I just can't figure how to reduce it. Shriking is not a good thing to do, and anyway will take AGES to do it. I've try to bakcup the log like this: Backup Log DB_1 TO DISK = 'Nul:' but nothing changed. So what exatcly can I do to fix this situation?
Thank you!
NUL? If you don't care about transaction log backups (and point-in-time recovery), stop using full recovery. If you do care, then start backing up your log properly (not toNUL). – Aaron Bertrand Mar 09 '15 at 15:33CHECKPOINT;twice, then useDBCC SHRINKFILE. – Aaron Bertrand Mar 09 '15 at 16:59Nothing changed.
– Antonio Mar 09 '15 at 17:06SELECT recovery_model_desc, log_reuse_wait_desc FROM sys.databases WHERE name = N'demo';say? – Aaron Bertrand Mar 09 '15 at 17:10