镜像 主库备库问题

来源:互联网 发布:程序员背包推荐 编辑:程序博客网 时间:2024/06/12 01:25

 

              今天在重启服务器的时候,发现一个数据库XXXX(镜像主库)一直处于恢复状态,查看日志,错误如下:


         Bypassing recovery for database 'XXXX because it is marked as an inaccessible database mirroring database. A problem exists with the mirroring session. The session either lacks a quorum or the communications links are broken because of problems with links, endpoint configuration, or permissions (for the server account or security certificate). To gain access to the database, figure out what has changed in the session configuration and undo the change.
         

              此实例上有一个数据库的镜像备库AAA,一个数据库的镜像主库XXXX,AAA的日志大概600KB/S,恢复速率大概900KB/S,由于重启的时候部分日志回滚,导致AAA的日志积累了1.5GB左右,备库的日志还没恢复完毕,主库的日志又传送过来,表面现象是AAA的备库一直在恢复,而XXXX一直没有机会恢复。
         当然出问题的时候,连接和权限是正常的,根据SQL日志的提示,很有可能是Endpoint在同一时间只能供一个数据库使用?或者Endpoint在同一时间只能供某一类型的操作使用?没办法确认这个问题的原因。
         
          解决办法:
          暂停镜像备库AAA,等待镜像备库恢复完成,镜像主库XXXX立刻恢复完毕。

          看来一个实例上同时有镜像的备库和主库,存在风险。

          能找到关于镜像更详细资料的同学可以测试一下,如果有微软内部的资料更好。

原创粉丝点击