简体   繁体   English

SQL Server在完全恢复模型的数据库集中进行事务日志备份有哪些要求?

[英]What are the requirements for SQL Server taking transaction log backup in database set for Full Recovery Model?

I have implemented Ola Hallengren's maintenance solution and transaction log backup is running every hour. 我已经实现了Ola Hallengren的维护解决方案,并且事务日志备份每小时都在运行。 I was going to perform restore test for one particular database today and noticed that although the database is in Full Recovery Mode there have been no transaction log backup taken. 我今天打算对一个特定的数据库执行还原测试,并注意到尽管数据库处于完全恢复模式,但尚未进行任何事务日志备份。 There were about 100 other databases running on this particular instance and about 95 of them had transaction log backups successfully taken. 在该特定实例上还运行着约100个其他数据库,其中约有95个已成功进行了事务日志备份。

I have just recently taken over this environment so I have no history as to how things have been set up or how these databases have been created. 我刚刚接手了这个环境,因此我没有关于如何设置事物或如何创建这些数据库的历史记录。

When comparing the settings I against a database which was getting transaction log backup taken I see that the "Log Reuse Wait Description" is set to DATABASE_SNAPSHOT_CREATION for the database that does not have transaction log backup but LOG_BACKUP or NOTHING for those having successful transaction log backups taken. 将设置I与正在获取事务日志备份的数据库进行比较时,我看到对于没有事务日志备份但对于成功事务日志备份的数据库,LOG_BACKUP或NOTHING的数据库,“日志重用等待描述”设置为DATABASE_SNAPSHOT_CREATION拍摄。

I checked backup history and those that had transaction log backup today had history of successful backup last months but there was no history of any transaction log backup being taking for the databases that I am not seeing transaction log backup. 我检查了备份历史记录,今天进行了事务日志备份的那些数据库在上个月已具有成功备份的历史记录,但是对于我没有看到事务日志备份的数据库,没有任何事务日志备份的历史记录。 I also checked and there are no long running transactions going on. 我还检查了,没有长时间运行的事务正在进行。

  1. What should I check and how should I fix it so that the log backups start to generate for all the user databases? 我应该检查什么并且应该如何解决它,以便开始为所有用户数据库生成日志备份?
  2. And is there something I can do to prevent this from happening in future? 还有什么我可以做的事情来防止这种情况将来发生?

Thanks in advance! 提前致谢!

When you restored the last full backup, the database was in simple recovery mode. 还原上一个完整备份时,数据库处于简单恢复模式。 Databases in simple recovery mode do not use transaction log backups. 简单恢复模式下的数据库不使用事务日志备份。 In order to do transaction log backups you need: 为了进行事务日志备份,您需要:

  1. Database in Full Recovery mode. 数据库处于完全恢复模式。
  2. At least one full backup after switching to Full Recovery mode. 切换到完全恢复模式后,至少要进行一次完整备份。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SQL Server 数据库在简单恢复模式下的巨大事务日志 - Huge transaction log with SQL Server database in simple recovery mode 系统数据库日志备份与恢复模型 - System database Log backup and recovery model SQL server-数据库的事务日志已满 - SQL server- Transaction log for database is full 如何模拟将非空事务日志文件添加到 SQL 服务器完整数据库备份文件的情况 - How to simulate a situation when non-empty Transaction Log file will be added to the SQL Server Full Database backup file SQL Server log_reuse_wait_desc LOG_BACKUP,事务日志已满,日志备份后不会变小 - SQL Server log_reuse_wait_desc LOG_BACKUP, Transaction log full, does not become smaller after log backup 事务日志已满(由于没有)...但此数据库处于简单恢复模式 - Transaction log is full (due to NOTHING)... but this database is in simple recovery mode SQL SERVER事务日志已满 - SQL SERVER Transaction log full Sql Server 全数据库备份 - Sql Server Full DataBase Backup “由于'LOG_BACKUP',数据库的事务日志已满”在共享主机中 - “The transaction log for database is full due to 'LOG_BACKUP'” in a shared host 由于“LOG_BACKUP”,数据库的事务日志已满 - The transaction log for database is full due to 'LOG_BACKUP'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM