none
SQL SERVER2005镜像 宕机后如何恢复? RRS feed

  • Question

  • 宕机重启以后,原主机显示的是“(主体,已断开连接)”,原镜像机显示的是“(镜像,已断开连接/正在恢复)”,请问,如何操作才能将镜像正常恢复呢?


    emyueguang
    Thursday, December 23, 2010 4:45 AM

Answers

  • 我解决的方法是将镜像重做了一下,即删除master key及其之前镜像应用在数据库实例上面所有的object. 早期在做镜像的时候就出现过无法一次做成功的,然后再做就成功的案例. 不过我怀疑是证书到期的原因(这一点我还没有考证),因为镜像是我在去年做的,而就在2010-12-31服务器又出现了一次宕机,此次我将服务器启动以后,数据库服务器与镜像服务器没有我的干涉就已经自己运行起了镜像功能,而恰好是前几天宕机的时候我做的镜像. 还有就是,我在去年做服务器镜像的时候将所有的SQL语句都保存了起来,上次宕机的时候,我将那些SQL语句直接COPY过去运行,而时间还是去年我做镜像的时间,sql manager就报错,说证书的时间已经过期,这是我怀疑镜像服务器第一次宕机后不能自己恢复,而第二次宕机后却能自动恢复的原因,但我还没有用实例来考证,以上仅是我的猜测.
    emyueguang
    Tuesday, January 4, 2011 1:03 AM

All replies

  • 宕机重启以后,原主机显示的是“(主体,已断开连接)”,原镜像机显示的是“(镜像,已断开连接/正在恢复)”,请问,如何操作才能将镜像正常恢复呢?


    emyueguang

    Translation -
    "Downtime after the restart the original host shows "(principal, disconnected)," the original mirror machine shows "(mirror, disconnected/restoring)", I ask, how can the mirror normal recovery?
    "

    Alter database <databaseName> set partner resume

    Also check SQL ERRORLOG if there are any errors about mirroring.


    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    --------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------------------------------------------------------------------
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq
    Thursday, December 23, 2010 5:24 AM
    Moderator
  • Are you sure Balmukund? Isn't SET PARTNER RESUME only intended for "Suspended" state? A disconnected state normally means that something is wrong with the endpoints or the network connection.

    Lucifer

    Thursday, December 23, 2010 6:13 AM
  • Are you sure Balmukund? Isn't SET PARTNER RESUME only intended for "Suspended" state? A disconnected state normally means that something is wrong with the endpoints or the network connection.

    Lucifer


    Sometimes... that why next action is to check errorlog.
    Normally stopping and starting endpoint also helps.
    Balmukund Lakhani | Please mark solved if I've answered your question, vote for it as helpful to help other user's find a solution quicker
    --------------------------------------------------------------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
    --------------------------------------------------------------------------------
    My Blog: http://blogs.msdn.com/blakhani
    Team Blog: http://blogs.msdn.com/sqlserverfaq
    Thursday, December 23, 2010 6:19 AM
    Moderator
  • Hi E米阳光,

     

    Any progress?

     

    Meanwhile this is an English forum. We suggest you go to the local forum or local Microsoft Customer Service. Please refer to this link: http://social.microsoft.com/Forums/zh-CN/sqlserverzhchs/threads

     

    If anything is unclear, please let me know.


    Regards,
    Tom Li
    Friday, December 24, 2010 9:22 AM
    Moderator
  • thank for your suggest,I have resolve this question<^_^!>


    emyueguang
    Monday, December 27, 2010 1:52 AM
  • Hi E米阳光,

    Could you please share the solution?

    I believe it will help more people in the future.


    Regards,
    Tom Li
    Monday, December 27, 2010 2:15 AM
    Moderator
  • 我解决的方法是将镜像重做了一下,即删除master key及其之前镜像应用在数据库实例上面所有的object. 早期在做镜像的时候就出现过无法一次做成功的,然后再做就成功的案例. 不过我怀疑是证书到期的原因(这一点我还没有考证),因为镜像是我在去年做的,而就在2010-12-31服务器又出现了一次宕机,此次我将服务器启动以后,数据库服务器与镜像服务器没有我的干涉就已经自己运行起了镜像功能,而恰好是前几天宕机的时候我做的镜像. 还有就是,我在去年做服务器镜像的时候将所有的SQL语句都保存了起来,上次宕机的时候,我将那些SQL语句直接COPY过去运行,而时间还是去年我做镜像的时间,sql manager就报错,说证书的时间已经过期,这是我怀疑镜像服务器第一次宕机后不能自己恢复,而第二次宕机后却能自动恢复的原因,但我还没有用实例来考证,以上仅是我的猜测.
    emyueguang
    Tuesday, January 4, 2011 1:03 AM