Netherlands: Software

Introductie van Micorosoft SQL Server 2016

Issue link: http://hub-nl.insight.com/i/692679

Contents of this Issue

Navigation

Page 49 of 212

38 C H A P T E R 3 | Higher availability availability group. By enabling DTC support, your application can distribute transactions between separate SQL Server instances or between SQL Server and another DTC-compliant server, such as Oracle or WebSphere. Example 3-1: Creating an availability group with DTC support CREATE AVAILABLITY GROUP [2016DEMO] WITH DTC_SUPPORT=PER_DB Note Because each database in an availability group is synchronized independently while the cross-database transaction manager operates at the SQL Server instance level, an active cross- database transaction might be lost during an availability group failover. Consequently, cross- database transactions are not supported for databases hosted by one SQL Server or within the same availability group. Scaling out read workloads You can use availability groups for scale-out reads across multiple secondary copies of the availability group. In SQL Server 2016, as in the previous version, you can scale up to as many as eight secondary replicas, but the scale-out reads feature is not enabled by default. To support scale-out reads, you must configure read-only routing by using the T-SQL commands shown in Example 3-2. You must also create an availability group listener and direct connections to this listener. In addition, the connection string must include the ApplicationIntent=ReadOnly keyword. Example 3-2: Configuring read-only routing ALTER AVAILABILITY GROUP [AG1] MODIFY REPLICA ON N'COMPUTER01' WITH (SECONDARY_ROLE (ALLOW_CONNECTIONS = READ_ONLY)); ALTER AVAILABILITY GROUP [AG1] MODIFY REPLICA ON N'COMPUTER01' WITH (SECONDARY_ROLE (READ_ONLY_ROUTING_URL = N'TCP://COMPUTER01.contoso.com:1433')); ALTER AVAILABILITY GROUP [AG1] MODIFY REPLICA ON N'COMPUTER02' WITH (SECONDARY_ROLE (ALLOW_CONNECTIONS = READ_ONLY)); ALTER AVAILABILITY GROUP [AG1] MODIFY REPLICA ON N'COMPUTER02' WITH (SECONDARY_ROLE (READ_ONLY_ROUTING_URL = N'TCP://COMPUTER02.contoso.com:1433')); ALTER AVAILABILITY GROUP [AG1] MODIFY REPLICA ON N'COMPUTER01' WITH (PRIMARY_ROLE (READ_ONLY_ROUTING_LIST=('COMPUTER02','COMPUTER01'))); ALTER AVAILABILITY GROUP [AG1] MODIFY REPLICA ON N'COMPUTER02' WITH (PRIMARY_ROLE (READ_ONLY_ROUTING_LIST=('COMPUTER01','COMPUTER02'))); GO

Articles in this issue

Archives of this issue

view archives of Netherlands: Software - Introductie van Micorosoft SQL Server 2016