LYCN with SQL alwayson"One" establish AlwaysOn

Source: Internet
Author: User
Tags failover sql 2014

Note: Microsoft officially did not formally announce that Lync2013 can use the SQL Server AlwaysOn high Availability technology, this article just take some heterodoxy trickery approach to achieve this goal, its implementation after the completion of some problems and risks, to stabilize fortunately, if something really went wrong ... Read this article also need to have a certain Lync2013 implementation experience, because it omitted some well-known steps (mainly lazy, if there are steps do not understand can message exchange)

As far as we know, there are only two ways to high availability of Lync backend SQL database

1. SQL Clustering

2. SQL Mirroring

(Database software support in Lync Server 2013

https://technet.microsoft.com/en-us/library/gg398990.aspx )

The former requires additional shared storage, which requires an additional witness server. In this way, in small and medium-sized high-availability architectures, cost issues are involved.

AlwaysOn is a good feature that relies on lessons learned from Dags (however, there are no heartbeat lines!?). ), maintaining synchronization of the primary and secondary replicas with transaction log level replication, using only local disks and low cost. (for the principle of AlwaysOn, if you have not heard of it or are not familiar with it, please refer to the following documents first:

https://msdn.microsoft.com/zh-cn/library/hh403414.aspx  

http://blog.csdn.net/dreamyuzhou/article/details/18989543 )

As early as 2014 on Lync Conference, people in the Lync product group said that AlwaysOn functionality would add support for Lync, but today ... There is still no official claim to be able.

650) this.width=650; "height=" 275 "title=" Image4 "style=" border:0px; "alt=" Image4 "src=" http://s3.51cto.com/wyfs02/ M01/6d/fd/wkiol1vwdvor4efbaaewljinads096.jpg "border=" 0 "/>

So one day really can't help, carefully think about where it is not supported. Some analyses were made as follows:


In fact, this is a chicken with eggs after the problem, first AlwaysOn as with the Exchange DAG, you have to have a database before you can have a DAG group. So again, after installing two SQL Servers, I have to build the database before I can do the group AG operations on those databases.

And, AlwaysOn even if set up, then it only provides a listener for the call, the meaning of this listener is that you can only the existing AG group in the database to delete and read and write, and can not jump out, through this listener to create the database.

So the problem is, when Lync 2013 publishes the topology, it starts to perform the database creation operation. Then, when I publish the topology, the backend database connection must be a single database server name or a cluster name, not an AlwaysOn listener name.

OK, would it be okay to change the backend database in the topology to the listener name? The problem came again, after the topology was released, this thing he did not let change ... Removes the current central storage location unless the topology is removed. That is, in the Lync topology, we first write one of the SQL, publish the topology, let it chi Chi create the required library, next goose that lays, the creation of the database added to the AG group, and then delete the deployment, delete the central storage location, republish a topology, which is written in the AG Group, So Lync to check the database structure when found, gee! The database has been built, only need to make changes can be used. Then the new topology is released successfully, a new topology is deployed, and the Lync front-end deployment is tested for client connectivity. Fix It ~


Okay, here's the idea. Take an environment to try it, after all, the problem will not jump out of their own, but to do it to discover.

A total of 5 machines are needed in the environment: the basics, the cock-silk environment.


LyncFE.contoso.com Front End

Lyncbe-1.contoso.com Back-end Node 1

Lyncbe-2.contoso.com Back-end Node 2

DC.contoso.com Domain Control and CA

Win7client.contoso.com Client


Basic configuration section I will not write, what is the domain control Ah, from the CA Ah, this is the basic knowledge.

We first load SQL Server 2014 on the two back end, note the iteration of SQL Server 2014, if the older version of Lync 2013 will report an unrecognized SQL version when the database is created.

650) this.width=650; "height=" 255 "title=" QQ20150604231741 "style=" border:0px; "alt=" QQ20150604231741 "src=" http:/ S3.51cto.com/wyfs02/m01/6e/01/wkiom1vwc7aqgerwaad3fqoeufs706.jpg "border=" 0 "/>

650) this.width=650; "height=" 399 "title=" Image1 "style=" border:0px; "alt=" Image1 "src=" http://s3.51cto.com/wyfs02/ M02/6d/fd/wkiol1vwdvpt5-wtaads7grhfn8583.jpg "border=" 0 "/>

650) this.width=650; "height=" 430 "title=" image "style=" border:0px; "alt=" image "src=" http://s3.51cto.com/wyfs02/M02 /6e/01/wkiom1vwc7fc0dgyaagoohuhvmu517.jpg "border=" 0 "/>

After the installation is complete, you also have to install WSFC, the failover Cluster service, or the location cannot be checked.

650) this.width=650, height= "title=" Image7 "style=" border:0px; "alt=" Image7 "src=" http://s3.51cto.com/wyfs02/ M00/6d/fd/wkiol1vwdvssxaysaahelaokyii415.jpg "border=" 0 "/>

Take advantage of Windows Server 2012, one that controls the entire farm ~

650) this.width=650; "height=" 278 "title=" Image3 "style=" border:0px; "alt=" Image3 "src=" http://s3.51cto.com/wyfs02/ M00/6e/01/wkiom1vwc7fsrsgpaaexj9habok077.jpg "border=" 0 "/>

650) this.width=650; "height=" 474 "title=" Image5 "style=" border:0px; "alt=" Image5 "src=" http://s3.51cto.com/wyfs02/ M01/6d/fd/wkiol1vwdvtdc0apaaikqwfywmo908.jpg "border=" 0 "/>

650) this.width=650; "height=" 387 "title=" Image8 "style=" border:0px; "alt=" Image8 "src=" http://s3.51cto.com/wyfs02/ M01/6e/01/wkiom1vwc7jb6uvsaagbxm6l2mc819.jpg "border=" 0 "/>

Then open failover Cluster Manager and create the cluster. Note In the verification cluster that step selection do not verify, remember, I am very poor, no shared storage volume!

650) this.width=650; "height=" 491 "title=" Image9 "style=" border:0px; "alt=" Image9 "src=" http://s3.51cto.com/wyfs02/ M02/6d/fd/wkiol1vwdvxik92qaaisbnookso878.jpg "border=" 0 "/>

650) this.width=650; "height=" 402 "title=" Image10 "style=" border:0px; "alt=" Image10 "src=" Http://s3.51cto.com/wyfs02 /m02/6e/01/wkiom1vwc7jtfpikaaedcl2ggxm437.jpg "border=" 0 "/>

650) this.width=650; "height=", "title=" Image11 "style=" border:0px; "alt=" Image11 "src=" Http://s3.51cto.com/wyfs02 /m00/6d/fd/wkiol1vwdvarztqeaagghgdcts4078.jpg "border=" 0 "/>

Take a name, with an IP address, AlwaysOn depends on wsfc after all, or you have to carefully plan the options for this step.

650) this.width=650; "height=", "title=" Image12 "style=" border:0px; "alt=" Image12 "src=" Http://s3.51cto.com/wyfs02 /m00/6e/01/wkiom1vwc7nw_noxaaeqscufbpo877.jpg "border=" 0 "/>

650) this.width=650; "height=" 404 "title=" Image14 "style=" border:0px; "alt=" Image14 "src=" Http://s3.51cto.com/wyfs02 /m01/6e/01/wkiom1vwc7nscnm-aadt6rfnr_g731.jpg "border=" 0 "/>

650) this.width=650; "height=" 399 "title=" Image15 "style=" border:0px; "alt=" Image15 "src=" Http://s3.51cto.com/wyfs02 /m01/6d/fd/wkiol1vwdvbtabz1aaef3xdt9ze880.jpg "border=" 0 "/>

Once created, open SQL Server Configuration Manager, right-click on the SQL instance, select AlwaysOn High availability, and tick "Enable AlwaysOn availability Group", two backend nodes are checked.

650) this.width=650; "height=" 371 "title=" Image16 "style=" border:0px; "alt=" Image16 "src=" Http://s3.51cto.com/wyfs02 /m01/6e/01/wkiom1vwc7rjwfcyaahurxhmit4054.jpg "border=" 0 "/>

Create a shared folder for two back-end nodes in the creation of AlwaysOn in the initial data file synchronization, in the sharing permissions of the two SQL Server computer accounts directly into the FullControl, lest the trouble behind.

650) this.width=650; "height=" 415 "title=" Image17 "style=" border:0px; "alt=" Image17 "src=" Http://s3.51cto.com/wyfs02 /m02/6d/fd/wkiol1vwdvfizhloaag3yhsw4pg998.jpg "border=" 0 "/>

Next we open the SQL console on LyncBE-1, the first node, create a temporary database, and confirm the option of the database, the recovery mode is "full"

650) this.width=650; "height=" 405 "title=" Image19 "style=" border:0px; "alt=" Image19 "src=" Http://s3.51cto.com/wyfs02 /m02/6e/01/wkiom1vwc7qsirqoaakjhpmj-4w400.jpg "border=" 0 "/>

Then make a "full" backup of it

650) this.width=650; "height=" 584 "title=" Image20 "style=" border:0px; "alt=" Image20 "src=" Http://s3.51cto.com/wyfs02 /m00/6d/fd/wkiol1vwdviwzm4eaamzm9hopt0788.jpg "border=" 0 "/>

650) this.width=650; "height=" 538 "title=" Image21 "style=" border:0px; "alt=" Image21 "src=" Http://s3.51cto.com/wyfs02 /m00/6e/01/wkiom1vwc7vcamvyaagpiggdrks915.jpg "border=" 0 "/>

After the backup is complete, start creating an AlwaysOn availability group, and take a name called Sqlag.

650) this.width=650; "height=" 578 "title=" Image18 "style=" border:0px; "alt=" Image18 "src=" Http://s3.51cto.com/wyfs02 /m01/6d/fd/wkiol1vwdvjzmjh0aaku2mmmt60271.jpg "border=" 0 "/>

650) this.width=650; "height=" 504 "title=" Image22 "style=" border:0px; "alt=" Image22 "src=" Http://s3.51cto.com/wyfs02 /m01/6e/01/wkiom1vwc7yrg9hmaadedpxhemc383.jpg "border=" 0 "/>

At this point our staging database has met the prerequisites for the availability group, check directly, and then next.

650) this.width=650; "height=" 503 "title=" Image23 "style=" border:0px; "alt=" Image23 "src=" Http://s3.51cto.com/wyfs02 /m02/6d/fd/wkiol1vwdvnz5zr6aaeofvk0r40906.jpg "border=" 0 "/>

Here we add a second node, LyncBE-2, which is automatically recognized as a worker role. As to what the subsequent readable auxiliary copy means, you can refer to the AlwaysOn documentation given at the beginning of the article.

650) this.width=650; "height=" 515 "title=" Image24 "style=" border:0px; "alt=" Image24 "src=" Http://s3.51cto.com/wyfs02 /m02/6e/01/wkiom1vwc7zyi7pxaaimahm5ybm114.jpg "border=" 0 "/>

650) this.width=650; "height=" 539 "title=" Image25 "style=" border:0px; "alt=" Image25 "src=" Http://s3.51cto.com/wyfs02 /m00/6d/fd/wkiol1vwdvmik1raaag7lf2c-dy968.jpg "border=" 0 "/>

Select the Last Listener tab and create a listener for the AG group directly, and the port number will write the SQL default port 1433 well, remember to plan an IP address for it.

650) this.width=650; "height=" 514 "title=" Image26 "style=" border:0px; "alt=" Image26 "src=" Http://s3.51cto.com/wyfs02 /m00/6e/01/wkiom1vwc73j6blwaafxovqawpo965.jpg "border=" 0 "/>

After the group AG is created, data synchronization begins, and the initial synchronization is done through the shared location we started with. Fill in the shared path.

650) this.width=650; "height=" 521 "title=" Image27 "style=" border:0px; "alt=" Image27 "src=" Http://s3.51cto.com/wyfs02 /m01/6d/fd/wkiol1vwdvqtrglmaafisgdffty573.jpg "border=" 0 "/>

Woops, the last step error, the original is the temporary database storage folder must correspond to the same location on the secondary replica node, in other words, I LyncBE-1 on the C:\sqldata folder on the database, on the LyncBE-2 also must have a C \ SqlData folder.

650) this.width=650; "height=" 556 "title=" Image28 "style=" border:0px; "alt=" Image28 "src=" Http://s3.51cto.com/wyfs02 /m01/6e/01/wkiom1vwc73cvihiaajglokrr78298.jpg "border=" 0 "/>

The default share creates a C:\sqldata directly, one more time for validation.

650) this.width=650; "height=" 425 "title=" Image29 "style=" border:0px; "alt=" Image29 "src=" Http://s3.51cto.com/wyfs02 /m02/6d/fd/wkiol1vwdvrwsbzeaafzrvjbul0200.jpg "border=" 0 "/>

Verify through!

650) this.width=650; "height=" 546 "title=" Image30 "style=" border:0px; "alt=" Image30 "src=" Http://s3.51cto.com/wyfs02 /m02/6e/01/wkiom1vwc77qfybraahwnhzldwu536.jpg "border=" 0 "/>

650) this.width=650; "height=" 541 "title=" Image31 "style=" border:0px; "alt=" Image31 "src=" Http://s3.51cto.com/wyfs02 /m00/6d/fd/wkiol1vwdvvspct9aagu7u9zd4s586.jpg "border=" 0 "/>

650) this.width=650; "height=" 544 "title=" Image32 "style=" border:0px; "alt=" Image32 "src=" Http://s3.51cto.com/wyfs02 /m00/6e/01/wkiom1vwc77yhyoiaaicqmwt0ag645.jpg "border=" 0 "/>

Create complete! In the SQL console panel, right-click the availability group name and select Display Panel, is it as kind as you see the panel on the DAG?

650) this.width=650; "height=" 540 "title=" Image33 "style=" border:0px; "alt=" Image33 "src=" Http://s3.51cto.com/wyfs02 /m01/6d/fd/wkiol1vwdvyw52faaalt-65e7co697.jpg "border=" 0 "/>

Manual verification under failover test? No problem.

650) this.width=650; "height=" 570 "title=" Image34 "style=" border:0px; "alt=" Image34 "src=" Http://s3.51cto.com/wyfs02 /m01/6e/01/wkiom1vwc7_qvs27aajzkefw6gw170.jpg "border=" 0 "/>

OK, so here we first established an AlwaysOn availability group through a test database.

In the next section, we'll talk about a step-by-step rescue, goose that lays, to put a screw-and-wire architecture in Lync 2013 on top of this high availability group.

Have to say, under the WIN2012R2 with SQL 2014 to build AlwaysOn is really simple, if it is on the 2008R2 operating system above this, you need to add the following several patches, and each need you to leave an email and wait for it to send to your mailbox ...

650) this.width=650; "height=" 195 "title=" QQ20150604234408 "style=" border:0px; "alt=" QQ20150604234408 "src=" http:/ S3.51cto.com/wyfs02/m02/6d/fd/wkiol1vwdvzz1odfaagegyikhi4271.jpg "border=" 0 "/>


This article is from the "Castamere Rainy season" blog, be sure to keep this source http://sodaxu.blog.51cto.com/8850288/1658685

LYCN with SQL alwayson"One" establish AlwaysOn

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.