自动日志传送故障转移
是否可以在日志传送中自动进行日志传送故障转移并恢复辅助数据库,这是 Powershell 中的某些功能,它会检查是否还有要复制的 .trn 文件、恢复所有未应用的事务并恢复辅助数据库?
Is it possible to automate Log Shipping Failover and Recover Secondary Database in Log Shipping, something in Powershell where it checks for are there any more .trn files to be copied, restore all the unapplied transactions and recover secondary database?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
日志传送是手动故障转移:您可以将其用于“灾难恢复”。
您可以使用数据库镜像进行自动故障转移:这就是“高可用性”。
不过,您可以两者都使用。
所以,不,如果你想实现这一点,你就使用了错误的 SQL Server 功能
Log shipping is manual failover: you'd use it for "disaster recovery"
You'd use Database Mirroring for automatic fail-over: this is "high availability".
You can use both though.
So, no, if you want to achieve this you're using the wrong feature of SQL Server
日志传送故障转移
无自动故障转移。如果需要自动故障转移,请考虑使用镜像。
故障转移:
- 停止作业
获取日志备份的尾部(BACKUP LOG …WITH NO_RECOVERY)
将日志备份的尾部应用到辅助数据库使用 RESTORE LOG ...WITH RECOVERY
如果需要,请以相反方向配置日志传送
请参阅此
允许滚动修补程序和升级
- 升级辅助
故障转移
升级原始主要(现在为辅助)
请参阅这个
Log Shipping Failover
No automated failover. If automatic failover is required, consider Mirroring instead.
To failover:
- Stop the jobs
Take a tail of the log backup (BACKUP LOG … WITH NO_RECOVERY)
Apply tail of the log backup to secondary with a RESTORE LOG ... WITH RECOVERY
If required, configure log shipping in reverse direction
See this
Allows for rolling patches an upgrades
- Upgrade secondary
Failover
Upgrade the original primary (now secondary)
See this