Tuesday, September 11, 2012

SQL command text to configuring readOnly routing for Teched Australia Lab Session:

 ALTER AVAILABILITY GROUP ALWAYSONLABAG
MODIFY REPLICA ON
N'SQLONE' WITH
(SECONDARY_ROLE (ALLOW_CONNECTIONS = READ_ONLY));

ALTER AVAILABILITY GROUP ALWAYSONLABAG
 MODIFY REPLICA ON
N'SQLONE' WITH
(SECONDARY_ROLE (READ_ONLY_ROUTING_URL = N'TCP://SQLONE.contoso.com:1433'));

ALTER AVAILABILITY GROUP ALWAYSONLABAG
 MODIFY REPLICA ON
N'SQLTWO' WITH
(SECONDARY_ROLE (ALLOW_CONNECTIONS = READ_ONLY));
ALTER AVAILABILITY GROUP ALWAYSONLABAG
 MODIFY REPLICA ON
N'SQLTWO' WITH
(SECONDARY_ROLE (READ_ONLY_ROUTING_URL = N'TCP://SQLTWO.contoso.com:1433'));

ALTER AVAILABILITY GROUP ALWAYSONLABAG
MODIFY REPLICA ON
N'SQLONE' WITH
(PRIMARY_ROLE (READ_ONLY_ROUTING_LIST=('SQLTWO','SQLONE')));

ALTER AVAILABILITY GROUP ALWAYSONLABAG
MODIFY REPLICA ON
N'SQLTWO' WITH
(PRIMARY_ROLE (READ_ONLY_ROUTING_LIST=('SQLTWO','SQLONE')));
GO










No comments: