询问者
sql server 2008 r2 日志传输模式 如何实现主从数据库服务切换?

问题
全部回复
-
可以参考:
Change Roles Between Primary and Secondary Log Shipping Servers (SQL Server)
这个是2017的
2008已经是不支持的版本了。
family as water
-
Hi grantzhou,
SQL Server 2008/r2 已经不受微软支持,所以尽快升级到较新的版本上。
你是想把辅助服务器转变成主服务器是吗?事实上,邹建已将告诉了你最为关键的一步就是使用with recovery选项来还原你做日志传送的用户数据库。如果你想完全将辅助数据库转变成主数据库,根据以下的步骤:
1.在主服务器上再做一次日志备份最好用with norecovery选项,这样可以使主数据库进入还原状态,以防你在做之后操作以后,还有其他数据进入主数据库中,让主数据库和辅助数据库的内容不一致。
2.将此最后一次的日志备份和主服务器上共享目录下的中所有未被复制的备份文件,复制到辅助服务器上日志传送所用的本地目录中。
3.在辅助服务器上通过检查还原作业历史记录,知道最后一个被还原的日志备份是哪个,将所有为还原的日志备份按顺序还原到辅助数据库上(前面的日志备份都使用with norecovery选项,直至还原最后一次的日志备份使用with recovery选项进行还原)使数据库进入联机状态,然后删除辅助服务器上的复制作业和还原作业,这样故障转移就完成了。
4.日志传送只同步用户数据库的内容,不会同步登陆信息,你需要手动将登陆信息从原始主服务器上迁移到这个新的zhu服务器上,请按照下面链接中的步骤 (http://support.microsoft.com/kb/918992)
5.最后你需要修改应用程序中配置文件的连接字符穿,把应用重定向到新的主服务器上。
你最后的还原时的报错信息,建议在还原语句前加 USE [master] GO
Hope this could help you .
Best regards,
Dedmon Dai
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com- 已建议为答案 Dedmon DaiMicrosoft contingent staff 2019年4月22日 9:14
-
Hi grantzhou,
我建议你把有用的回复标记为答案,这样有利于其他有相似问题的人更快找到解决方法,感谢你对社区做的贡献。
Hope this could help you .
Best regards,
Dedmon Dai
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com