0

I have a database that is regenerated daily from an external source, so I don't care about backing it up. The transaction log can grow to several gb as it is wiped and updated every day with new data.

I tried limiting the size but I started getting The transaction log for database 'myDB' is full due to 'ACTIVE_TRANSACTION'

I tried setting it to SIMPLE, but the same error as above.

What can I do to ensure it doesn't break and it doesn't take up space?

4

1 回答 1

0

这可能不是最好的,但如何执行备份日志。

来自 BOL:事务日志截断 为了避免填满数据库的事务日志,例行备份是必不可少的。在简单恢复模式下,备份数据库后会自动发生日志截断,而在完全恢复模式下,备份事务日志后会自动发生日志截断。但是,有时截断过程可能会延迟。有关识别和响应延迟因素的信息,请参阅可以延迟日志截断的因素。

注意:
BACKUP LOG WITH NO_LOG 和 WITH TRUNCATE_ONLY 选项已停用。如果您正在使用完整或批量日志恢复模式恢复,并且必须从数据库中删除日志备份链,请切换到简单恢复模式。有关详细信息,请参阅从完整或批量日志恢复模型切换的注意事项。

有关一般日志截断的更多信息,请参阅事务日志截断。

于 2013-11-07T17:49:21.967 回答