none
SQL Server搭主备Mirror失败:Error:insufficient transaction log RRS feed

  • 问题

  • 在搭建Mirror时,失败,报如下的错误:[SQL Server]The mirror database, "test
    db", has insufficient transaction log data to preserve the log backup chain of the principal database.  This may happen if a log backup from the principal database has
    not been taken or has not been restored on the mirror database. (1478)

    2013年7月18日 5:27

答案

  • 备份日志然后在Mirror上还原一下。使用norecovery。一般的做法是:

    The basic steps for establishing a mirroring session are as follows:

    1. Create the mirror database by restoring the following backups, using RESTORE WITH NORECOVERY on every restore operation:

      1. Restore a recent full database backup of the principal database, after making sure that the principal database was already using the full recovery model when the backup was taken. The mirror database must have the same name as the principal database.

      2. If you have taken any differential backups of the database since the restored full backup, restore your most recent differential backup.

      3. Restore all the log backups done since the full or differential database backup.


    Please Mark As Answer if it is helpful.


    2013年7月18日 6:38
  • 如果仅做了完全备份,那么当完全备份的时间和配置Mirror的时间差距过大的时候,有些时候就配置不了。

    这个时候就只需要新做一个日志备份,使用norecovery选项恢复到Mirror端。


    If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

    2013年7月18日 7:14

全部回复

  • 备份日志然后在Mirror上还原一下。使用norecovery。一般的做法是:

    The basic steps for establishing a mirroring session are as follows:

    1. Create the mirror database by restoring the following backups, using RESTORE WITH NORECOVERY on every restore operation:

      1. Restore a recent full database backup of the principal database, after making sure that the principal database was already using the full recovery model when the backup was taken. The mirror database must have the same name as the principal database.

      2. If you have taken any differential backups of the database since the restored full backup, restore your most recent differential backup.

      3. Restore all the log backups done since the full or differential database backup.


    Please Mark As Answer if it is helpful.


    2013年7月18日 6:38
  • 我之前做的都是只做bak,没有备份日志,为什么有的可以,有的不可以呢
    2013年7月18日 6:46
  • 从还原完整备份完成到配置Mirror的间隔不一样吧。


    Please Mark As Answer if it is helpful.

    2013年7月18日 6:58
  • 你的意思是说如果从还原完整备份完成到配置Mirror的时间间隔足够短的话,是可以的,如果时间间隔长的话,就会有问题,如果填加了log的备份,如果中间间隔的时间比较长的话,会不会也有问题呀?
    2013年7月18日 7:10
  • 如果仅做了完全备份,那么当完全备份的时间和配置Mirror的时间差距过大的时候,有些时候就配置不了。

    这个时候就只需要新做一个日志备份,使用norecovery选项恢复到Mirror端。


    If you haven't all the things you want,be grateful for the things you don't have that you didn't want.

    2013年7月18日 7:14
  • 楼上说的很对。

    Please Mark As Answer if it is helpful.

    2013年7月18日 8:43
  • It's not about timing but changes in the db. 
    2013年7月18日 13:14
  • 如果做了bak,没有备份日志,只要日志没有截断,可以继续配置mirror,不需要在备份日志,反之,如果截断了,就必须要备份日志了。

    chenl

    2013年7月30日 9:24