SQL Server 2017 AlwaysOn on Linux 配置和维护(14)
发表于:2024-09-22 作者:千家信息网编辑
千家信息网最后更新 2024年09月22日,2.5 操作2.5.1可用性组升级在升级之前,可以参考升级AG副本实例的模型和实践。升级实例的顺序依赖于角色是否为辅助副本和他们是同步或异步副本。首先升级承载异步副本的实例,然后升级承载同步副本的实例
千家信息网最后更新 2024年09月22日SQL Server 2017 AlwaysOn on Linux 配置和维护(14)
2.5 操作
2.5.1可用性组升级
在升级之前,可以参考升级AG副本实例的模型和实践。
升级实例的顺序依赖于角色是否为辅助副本和他们是同步或异步副本。首先升级承载异步副本的实例,然后升级承载同步副本的实例。
注意:如果一个AG只有异步副本,为了避免数据丢失,修改一个副本为同步,等待直到同步后,然后升级该副本。
以下为AG在Linux上执行滚动升级SQL Server实例。
备份每个数据库
停止即将升级的目标辅助副本节点上的资源
pcs constraint location ag_cluster-master avoids nodeName1
在辅助副本上升级SQL Server
sudo yum update mssql-serversudo yum update mssql-server-ha
移除位置约束
pcs constraint remove location-ag_cluster-master-rhel1--INFINITY
验证升级后资源启动、辅助副本已连接并同步
pcs status
在所有辅助副本升级后,手工故障转移到一个同步副本。
对于AG为EXTERNAL类型,使用群集管理工具来故障转移;
对于AG为NONE类型,使用Transact-SQL来故障转移。
sudo pcs resource move ag_cluster-master--master
重要:以下步骤仅适用于AG没有群集管理器的情况。
如果AG为NONE类型,手动故障转移。按以下顺序完成。
1.设置主副本为辅助
ALTER AVAILABILITY GROUP [ag1] SET (ROLE = SECONDARY);
2.设置同步辅助副本为主
ALTER AVAILABILITY GROUP [ag1] FAILOVER;
在故障转移后,在旧的主副本上升级SQL Server。
# add constraint for the resource to stop on the upgraded node# replace 'nodename2' with the name of the cluster node targeted for upgradepcs constraint location ag_cluster-master avoids nodeName2# upgrade mssql-server and mssql-server-ha packagessudo yum update mssql-serversudo yum update mssql-server-ha# remove the constraint; make sure the resource is started and replica is connected and synchronizedpcs constraint remove location-ag_cluster-master-rhel1--INFINITY
对于AG类型为EXTERNAL,清理手动故障转移导致的位置约束
sudo pcs constraint remove cli-prefer-ag_cluster-master
对于新升级的辅助副本(即旧的主副本)恢复数据移动
ALTER DATABASE database_name SET HADR RESUME;
在升级完所有的服务器后,你可以按需将主副本切换回来。
副本
升级
辅助
同步
故障
实例
类型
数据
位置
手动
资源
顺序
管理
重要
只有
可用性
备份
工具
情况
手工
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
软件开发说明书的目的及意义
网络通信如何建立服务器客户端
网络技术pon
网络安全证书管理工具
ps4实况连接服务器
电子数据库的处理技术
澳大利亚 软件开发
网络安全获奖内容
大数据和it软件开发
网络安全打赛
用自己电脑搭建服务器有什么用
上海医疗软件开发公司电话
服务器安装黑群晖
陈鑫杰网络安全攻防
淘宝的网络安全技术
云度网络安全插画
医学生外文数据库的优点
搭建公司服务器
lol英雄数据库
因网络安全事件 发生突
抢红包分析软件开发
测试开发难还是软件开发难
网络安全和信息化个人总结
e38s 服务器配置
德江网络安全宣传
中国哪所大学数据库最全
xp局域网服务器
虚拟库数据库怎么连接不上
华为云短信接口服务器上打不开
ctm网络安全大赛 张哲