数据库“databasename"的事务日志已满. [英] The transaction log for database 'databasename' is full.

查看:32
本文介绍了数据库“databasename"的事务日志已满.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

数据库 '' 的事务日志已满.要找出无法重用日志中的空间的原因,请参阅 sys.databases 中的 log_reuse_wait_desc 列.请帮我解决这个问题.提前致谢.

The transaction log for database '' is full. To find out why space in the log cannot be reused, see the log_reuse_wait_desc column in sys.databases. Please Help me to solve this issue. Thanks in advance.

推荐答案

毫无疑问,您正在完全恢复模式 下运行数据库,并且未能进行事务日志备份.

Undoubtedly, you are running the database in Full Recovery Mode, and failed to take Transaction log backups.

在 SQL Server 管理器中右键单击您的数据库,然后检查选项"页面.将恢复模型从 Full 切换到 Simple,然后再次右键单击数据库.选择Tasks ShrinkFiles.将日志文件缩小到合适的大小(我通常坚持数据文件大小的 20-25%).

Right-click your database in SQL Server Manager, and check the Options page. Switch Recovery Model from Full to Simple then right-click the database again. Select Tasks Shrink, Files. Shrink the log file to a proper size (I generally stick to 20-25% of the size of the data files).

切换回完整恢复模式,并立即进行完整的数据库备份.

Switch back to Full Recovery Model, and take a full database backup straight away.

您现在需要确定是否需要将数据库恢复到某个时间点的能力.如果是这样,请根据您的业务要求安排定期事务日志和差异备份.

You now need to figure out whether you need the ability to recover your database to a point-in-time. If so, schedule regular transaction log and perhaps differential backups according to the requirements of your business.

如果企业可以承受一定数量的数据丢失,请安排完整备份并切换到简单模式.

In case the business can live with a certain amount of data loss, schedule full backups and switch to Simple mode.

这篇关于数据库“databasename"的事务日志已满.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆