Tool to measure Index Selectivity
by Michal Tinthofer on 05/06/2012Sometimes when you plan to change your index design is good to know the columns of your tables. But not just a data type and max size.
Read moreSQL Server 2012 introduced AlwaysOn Availability Groups, a feature intended to replace clustering, database mirroring, log shipping, replication, and other technologies by giving us one easy-to-manage feature for high availability, disaster recovery, and scale-out.
If you are new in this technology, I highly recommend to check Brent Ozars Blog. There you can find many useful posts describing AlwaysOn Availability Groups.
AG has numerous recommended prerequisites for Windows and SQL Server configuration. You can use them to successfully deploy AG in your environment.
Here is the short list:
So, today i would like to focus on one recommendation. Prefer default instance over named.
This could be an issue in some environments where you want to use more SQL instances on one physical server and you plan to configure AG for all instances. So why we need to use default instance?
Lets start with configuration. Is it possible to ever configure AG for named instance? Answer is yes, but it will not work in all scenarios. We will talk about this later in second part..
Install required features
Create a cluster via failover cluster manager
You can go through validation tests. Storage test can be ignored if FCI (Failover Cluster Instance) not present in our topology.
Give a new cluster name for administration. Cluster name is not a name of the SQL Server so, you can pick the name whatever you want. Also pick network which will be used to communicate between nodes (AG partners).
After you finish, results could looks like this.
Last step in cluster installation will be reconfiguration of cluster votes. You need to tell cluster on which nodes you want to failover and which nodes will build up the quorum. Because you can setup to your topology a standby server located on disaster recovery site, on which you plan to failover just manually.
Because in this scenario we want to use just Availability Groups, install standalone
installation of SQL server. Cluster will be used just for sharing name of Availability group (AG Listener).
First step will be enable AlwaysOn for all instances. Note that this option is available only if machine is already in cluster.
Then you can add correct permissions to all SQL servers and backup databases which you will want to use in Availability Groups.
Next we can setup AG.
Specify name for AG, this still not represent name which application frontend will call. Also pick databases which you want to failover together in one group.
Database prerequisites are checked here.
Now setup your topology.
Ensure that correct endpoints are chosen.
Build your backup strategy for DR. Here you can choose on which servers will be backup done.
One prereuisite, is to use of a checking function with backup job. Function will look for the settings you have configured on image below. In SQL Server 2012, maintenance plan already using this function.
Create AG Listener to provide centralized Client management. This will be data source you use in application in order to connect to AG.
Select Initial Synchronization, or how databases should be prepared for sync. Database could be restored from backup, or if you manually restored it there is a option of just join between replicas. Last optin is just create topology without sync.
And you have successfully created Availability Groups on SQL Server 2012.
In the next post, I will talk more about testing AG groups and use with named instances. Also how clients should connect to AG Listener and read only routing. Stay turned
Michal Tinthofer is the face of the Woodler company which (as he does), is fully committed to complete support of Microsoft SQL Server products to its customers. He often acts as a database architect, performance tuner, administrator, SQL Server monitoring developer (Woodler SMT) and, last but not least, a trainer of people who are developing their skills in this area. His current "Quest" is to help admins and developers to quickly and accurately identify issues related to their work and SQL Server runtime.
Sometimes when you plan to change your index design is good to know the columns of your tables. But not just a data type and max size.
Read moreToday, we have prepared another release of SMT 1.11.0 for you. It is rather significant, and it should be since we haven’t had a big one since last summer. So take your time, sit down, and let’s go through the news in SMT.
Read moreWe have a new SMT version, take a look what has been changed.
Read more