1 use master 2 3 ALTER AVAILABILITY GROUP [AlwaysOnGroup] MODIFY REPLICA ON N'NODE-SQL1' 4 WITH (SECONDARY_ROLE (READ_ONLY_ROUTING_URL = N'tcp://Node-SQL1.luyuan.cn:5022')) 5 6 ALTER AVAILABILITY GROUP [AlwaysOnGroup] MODIFY REPLICA ON N'NODE-SQL2' 7 WITH (SECONDARY_ROLE (READ_ONLY_ROUTING_URL = N'tcp://Node-SQL2.luyuan.cn:5022')) 8 9 10 ALTER AVAILABILITY GROUP [AlwaysOnGroup] MODIFY REPLICA ON N'NODE-SQL2' 11 WITH (PRIMARY_ROLE (READ_ONLY_ROUTING_LIST=('NODE-SQL1')));12 13 ALTER AVAILABILITY GROUP [AlwaysOnGroup] MODIFY REPLICA ON N'NODE-SQL1' 14 WITH (PRIMARY_ROLE (READ_ONLY_ROUTING_LIST=('NODE-SQL2')));
参考文章:http://www.cnblogs.com/aarond/p/3679915.html
新闻热点
疑难解答