Always on setup end to end - Part 1 || Pre-requisites
Hello readers,
Welcome to the new blog after a long time.
In this
blog I would like to discuss complete end to end always on setup guide for
beginners.
I will be posting
couple of blogs regarding always on in SQL server. I believe that would be helpful
to understand Always on in SQL server in easy way.
Always on
setup involved multiple steps. Hence one may find it difficult. However, if you
could plan it well then you may find that always on is much easier to configure
and handle.
So, without
wasting the time lets proceed further.
Firstly, we
will see what is Always on in SQL Server?
Always on
is the high availability and disaster recovery solution introduced in SQL
server 2012.
As the name
suggest, Always on means availability of database all the time even in case of disaster.
We can say
it is the alternative of mirroring. Only thing is windows failover cluster
service also required to be configured as a pre-requisite for always on.
In this blog, we will only discuss infrastructure level pre-requisites to setup always on environment.
Below Infra setup is required as a pre-requisites.
1) Domain Controller.
2) Database servers with normal SQL server installed.
3) Windows server failover clustering (WSFC).
Step 1:
Setup Domain Controller (Active Directory Server)
Note:
If you are working
on Always on setup in your organization then this step can be ignored as organizations
have their own AD servers. Hence, no need to setup separate AD server for always
on.
If you are working
from scratch and there is no AD server then follow this step.
Domain controller
is required to established trust / communication between always on nodes.
To
configure the Domain controller, we would require one server with static IP.
For our
setup we have taken server named VMSQLAD with static IP.
Static IP has been configured as below.
Go to Control Panel\Network and Internet\Network and Sharing Center and click on Ethernet
Select option Use the following IP address and enter required details i.e.,
IP address, Subnet Mask and Default gateway.
With above steps static IP got assigned to server.
Now we will go ahead and install the Active Directory.
Go to Server Manager à Add roles and features
On next window Click on Next
On next window select “Role based or feature-based installation”
On next window be on default selection and click on next
On Server Roles window, check Active Directory Domain Services checkbox. Click on next until last window.
Once we reached to last step, we would require server restart.
Post server
restart we need to configure AD services.
Click on warning sign on flag to configure the AD services.
On the first configuration window select deployment operation as “Add a new forest” as we this is new setup of domain controller.
Provide the root domain name and click on next.
On next window, keep the default sections as it is. Provide the password to procced further.
Avoid the waring which may get on next window and click on next to proceed further.
On next
window, The NetBIOS domain name will auto populate. Without doing any changes click
on next.
On next window we would get option to set paths for log files and database. In our case we kept it default.
Click on next button till the installation window.
Now let’s
move to the next steps.
Step 2: 2
servers with SQL server installed
We have
taken 2 servers named VMDHRDB01 and VMDHRDB02 with normal SQL installation.
We will not
discuss the installation part as all of us are aware about it. We will discuss
which very few might aware.
We have to
make sure that both servers should be added in domain and have static IP
address.
To established the communication to domain server, Provide IP address of domain server in preferred DNS.
Now, change the Domain of both the servers from workgroup to our domain that is devking.com
Provide the user ID and PWD of domain controller server.
Post successful authentication, server will get added into the domain.
Make sure step 2 should be performed in both the servers.
Step 3: Windows
server failover clustering (WSFC)
Now we are
at last part of Always on pre-requisites. i.e., setup of windows failover
cluster.
To configure WSFC, Open Server Manager à Add roles and features.
On next window keep the default Installation type i.e., “Role based or feature-based installation”
Click on next and till Features selection window. On this window check Failover clustering check box. Click on next.
On final window, The installation of WSFC will be done.
It would be better if above steps are performed on both the servers before moving ahead.
Now open Failover Cluster Manager on any of the node.
On next window, add both the servers (VMDHRDB01 and VMDHRDB02) which would be added in cluster.
Once servers added, need to perform checks / Test on both the servers. Keep default recommended option i.e., Run all test. Click Next.
Next is the confirmation window. Click next.
Validation tests will be performed on next window.
Upon successful validation, finally we will move to cluster configuration.
On Failover Cluster Manager, Click on Create Cluster.
On Next window, provide cluster name and cluster IP address.
Note: Cluster IP and Listener IP in SQL Always on are different.
Once above details filled, click on next till summary.
So here we are done with our cluster configuration as well and also done with pre-requisites to setup always on.
In next
bong we would see what changes are required to be done at SQL server level to
complete Always on setup.
Till then stay tuned.
Thank you.
Very good details. Helpful information.
ReplyDeleteThank you :)
Delete