#Database #Tech news

SQL SERVER HIGH AVAILABILITY CONFIGURATION – PART3

Change the SQL Server Service Account

Open the SQL Server configuration manager. We need to change the service account for SQL server services.
Right click on SQL server service, select properties, go to log on tab, click on Browse button, click on location select Entire Directory and click on ok, now type the name Administrator and click on check names and click on ok, then click on apply button it will ask that SQL service need to restart to applicable this, just click on yes and then on ok button.

 

 

Enable Always On High Availability

Now again right click on SQL server service go to properties, select the Always On High Availability tab and click on Enable Always On Availability Groups and then click on ok. And then restart the SQL Server Services.

 

Backup of Database

Now open SQL server management studio and connect the database server. Create a new database (in our case test1) and take the backup of this database. For backup of database right click on database, select Task and then click on backup

In this step review the name of database, location of backup and then click on ok. You can also change the backup location.

Assign Permission for User

Now in this step we need to give permission to user for database. Go to Security\Logins and right click on IT\Administrator Account and select properties, select server roles and verify that sysadmin and public is selected.

Now in next step select the Securable, scroll down in permissions and select the Connect SQL and the click on ok.

 

Configuration of High Availability

Now in this step we will configure the High Availability for SQL database. Expand the Always on High Availability and right click on Availability Groups and click on New Availability Group Wizard

Read all the points and then click on next button

In next step type the name Availability Group (in our case SQLHAG) and then click on next button.

Now select the database (xyz) and then click on next button

In this step we need to add the second node. By default first node is added already, just select the Automatic Failover and then click on Add Replicas button, a widows pop will open just select the Node2, type the user name and password and then click on ok, after that select the Automatic Failover box and select the Yes from drop down in Readable Secondary and then click on next.

Now in this step verify that Full is selected, click on Browse and then select the Shared Folder (in our case Database-Shared, and then type the IP address of second node as shown in image make sure that this folder has shared, if not then create a folder and then shared that folder for everyone with full permission. You can also skip this steps if do not want to Data Synchronization) and then click on Next button

In this step check all the parameters are passes or not if anything showing in red or error correct those first and then take next step. If everything is ok just click on Next button as shown in below image

Now review all the steps and click on Finish Button.

When you click on Finish button it will create the Availability group of Database as shown in below image.

Configure DNS Listener Name

Open the SQL High Availability Group, Expand and right click on Availability Group Listener and click on Add Listener

In next screen type the DNS name and port number of database and then select static IP from Network Mode, after that click on Add button, type the IP address (free IP) and click on ok, then again ok

Now we can see that DNS Listener has been created.

 

 

Leave a comment

Your email address will not be published. Required fields are marked *