hi this is asan Habib today I'm going to show you uh how to configure always on so always on to configure always on image actually for software first virtualbox you need Windows operating system like Windows Server operating system then you need SQL Server then last you need SQL Server management Studio so I will provide the download link in the description so so yeah basically we need food software virtualbox for creating virtual meshing and we need the operating system for running those meshing and we need the SQL server and we need SQL Server management Studio let's get started so I have already installed uh I have already downloaded all software record software here so here you can see this is my operating system going to server 2019 this is my SQL server and this is ssms and this is my virtualbox so at first I will install the virtualbox double click on this [Music] next next just leave the default settings you don't have to change anything install your virtual box manager already installed and it's open so now it's time to create your virtual machine so now create uh press new you have to provide name so first node uh first machine will be my domain so I will name it as a DC domain controller and the operating system since I will install Windows Server 2019 so I will choose Windows 1964 bit next so here is it required the ramp size how much RAM you need so at least you need 2GB RAM for each meshing to run Windows Server so yes by default they provide 2GB for me so yes I will choose this one okay next create next so dynamically allocated I'm fine with it next so this is hard disk space how much space you need I will provide 30 GB is enough for me create there you go so my one machine is created let me create another machine okay no no not sure okay let me install this uh Windows server so from if you start this machine you will see like this start startup disk so it's required the operating system you have to show the path of your operating system but which you have already downloaded so here is my path so this is my operating system so this is my in my D drive always on folder then it's inside the record software okay let me check let me expand this one okay click on Virtual disks the folder option now press add now you have to provide the path so here is a d Drve all is on record software and this is my server operating system choose this one open now choose you can see the operating system has been selected now let's start so yeah the language settings yeah I'm fine with it install now and make sure you you can see here there are four options here standard evaluation standard evaluation desktop experience data center evaluation and data set data center evaluation desktop expense make sure you choose the desktop experience okay so next accept license terms next now choose custom install Windows only advance is the hard takes okay now go next so it will take a while so I will fast forward this part so it will reboot your machine maybe twice during installation so you don't have to do anything okay so my operating system has been com installation has been completed so now I have to provide the password a strong password so I will provide a password okay finish okay so now you have to press Ctrl alt delete not control alter delete you have to press Ctrl and delete from your keyboard now provide your password that you just have provided okay my missing is ready yes okay so this is the server manager server manager is a tool for especially Windows Server so while you can configure anything like you can add troll you can add feature a lot of things like there is a lot of things here like you can just you can configure your IP address you can uh add different feature from here so this is very important tools for Windows server okay let me close it uh before uh configuring anything I will just change the network settings for this virtual machine so let me go back my virtual VM virtualbox manager so you can see network here you have to just click on this and here the network character setting is by default it's showing that so instead of net you have to choose Breeze adapter so Breeze editor actually it will connect your physical network adapter so make sure you choose the bridge adapter now press ok so network setting has been done now go back your virtual machine yeah now it's showing different network settings okay I will yes okay now you have to configure your IP address for this machine so by default let me check what they by default I got okay let me check the CMD ipconfig you can see here by default they have provided like ipv4 addresses like 10. 0. 0.
193 so this is my IP address for this machine but this IP address is not static it's dynamic so instead of making it Dynamic we have to make it static Okay so I will choose same IP address but I will make it as a static IP address let's copy this IP address from here and let's go back your server manager don't show this message now go local server now if you can see here ethernet just double click on this you can see in Ethernet here option here double click on this now go properties you can see here you can see the network protocol version 6 we don't need protocol version 6. you can uncheck this one and we need this um Internet Protocol version 4. so double click on this and you see that it by default it's showing the optane and IP address automatically that means the IP address is Dynamic not static so let's choose this one use this following address click on this and paste it here your iPads whatever I have just copy from here 10.
0. 0193 now I have to provide subnet mask subject mask by default they have provided two five five two five five two five five dot zero okay I will provide same subnet mask here 255 two point five two five five zero and what is my default gateway default gateway they just provided this one 10. 0 Dot one copy this one paste it here and prefer DNS server DNA server should be always your domain IP address so let me show you the how you configure your IP address so let's see your domain controller IP address is 10.
0. 145 then this is your domain controller you make this server as a domain controller then whatever node you just you will create you have to provide the DNS server the IP address of your dominant controller so see there is this is Node 1 and my paper DNS server is IP address is 145. so 145 what is one four five one four five is our domain controller IP address same thing here domain controller DNS server all it will be also one four five and my second note DNS server also same 145 if I take another node is then it should be same thing like paper DNS server should be one for five so make sure you choose the DNS server DNS server always will be the IP address of your domain address domain server so yeah so my domain address so this this is my first machine I will create this meshing as a domain controller so same IP address I will use every node so yes so same IP address so the same so 10 Dot 0 Dot 0.
194 just copy this one 194 not one nine four one nine three okay let me just quickly one nine three so my favorite DNA server is also one nine three yeah and default gateway let me check yes deflect where is this one so I have just configured my domain controller with this server like this way let's press ok close it you can now refresh your server one more time now you can see your iPad is here now you have to add a let me change my computer name So currently my computer name randomly generated win and uh PM something like that so I will rename this machine name change I will name it as a DC okay you must restart your computer to apply this change okay then close it paste it now okay let me log in again okay so we have just configured our IP address and we have rename our computer name now we want to make this server as a domain controller so yeah before do that we have to turn off our firewall currently it's showing private one you have to turn it off so click on this domain Network just turn it off private Network turn it off public network turn it on that's it now replace it again yeah now you can see it's turn off okay so my meshing is uh ready now I will add a feature to make it domain domain controller I will make this domain as a uh This Server as a domain controller so let's go back your dashboard from server manager dashboard now add roll and features click on this go next role base or feature based installation okay fine next next so second option active directory domain service so this service we need just click on this add features now go next next restart this destination server automatically if required click on this yes now install okay configuration required installation sucks with selected on the domain okay now you can close it now you can see so we have just added the feature edit the role for this server but we have to promote this feature so you can see there is a notification in the server manager it's showing yellow just click on this you can see post deployment configure configuration you can just click on promote This Server to a domain controller click on this so here we have to provide a forest name Forest name is actually is a domain name so you can put anything like you can put sql. com SQL local anything so I'm providing cql dot com so sql. com will be my domain name let's go next so I have to provide a password same password for my login okay go next go next the target bias domain name is SQL by default they are just provided okay go next next right go next so it will check some free rupee sheets whether my Imaging meet this preview visits or not yeah now it's showing like the prerequisite check pass successfully so you can check yes there are some warning here you can avoid this warning yeah once you get the B requisite checks past successfully you are fine you can go ahead go and stop so it will take a while I will fast forward this part in the meantime it will reboot the server so once it finish I will come back again so domain controller feature has been installed so now you can login again all right so you can check whether your domain controller feature has been properly installed or not you can check from local server click on local server now you can see it's showing domain name sql.
com so that means you are connected with the domain and this meshing itself is the domain so yeah so from domain this domain controller part has been completed now I will just let me just change the sleep mode I need to make this computer awake uh I don't want to sleep while I'm working on different notes so I'm making this uh computer screen always will be open okay never done so my domain controller machine has been completed so now let's go back my Oracle virtual machine manager so my DC this machine is running so I need to create two more nodes one will be my node one another another machine will be node two so let me create new it name it node one version same thing windows 19. next Ram 2GB is fine create virtual hard disk now create vdi virtual Dix image next dynamically allocated next so yeah 50 GB I I will change it 32 30 GB is fine create so node one is done let me create another machine note 2. version will be 2019 next 2GB Ram and it's now create PDI next dynamically allocated next 30 GB create so Node 1 and node 2 is completed but I have to install operating system before reinstalling operating system let me change the network settings so from click on Node 1 and click on network choose net instead of net you just choose Breeze adapter okay same thing node two click on node 2 and click on network change it please adapter fine now click on Node 1 and start this machine then I have to provide the path for my operating system click on the folder option here and here this is my operating system Windows Server operating system click on this open choose there you go this is my operating system is selected now start so installation will be started so installation part is same like whatever I have done uh installation for domain controller so same thing install now here I have to choose the last option data center evaluation desktop experience click on desktop experience go next accept custom install Windows only next okay it will take a while I will pass forward this part so operating has been install so now I have to provide a password let me put a password now unlock your information control delete same password so your operating system has been completely installed now now you have to configure your IP address so you see the server manager automatically uh popped up here just don't show this message go uh local server now you can see this is computer name we have we will rename this machine and this is my firewall is currently turn on I have to turn it off my IP address is currently is dynamic I have to provide a static IP address so let me see what they have just provided for this machine ipconfig so they have just provided this IP address for this machine let me just copy this IP address and go back your server manager menu and click on the ethernet IP address Ascent double click on this double click on ethernet GoPro parties uncheck the protocol version 6 you don't need protocol version C you need a protocol version 4 double click on this use this following IP address click on this paste this IP address here and your subject mask will be yeah two five five two five five two five five zero and the power gateway is 10.
0. 001 okay two five five two five five ten dot zero dot zero dot one and prepare DNA server as I said before the P5 DNS server always will be the domain controller IP address so what is my domain controller IP address let's open my domain controller again so this is my domain controller this is my node one so click on domain controller DC and open server manager Go Local server you can see here the IP address so this is my domain controller and the IP address is 10. 0.
0193 so I will provide this IP address here let's go back yourself node one so it should be 10 . 0. 0 Dot okay let's me let me just give this iPad this here so here and this IP address okay let me check nine three 193 and this IP address for load one is two to six copy this just two to six okay that's okay okay close it now just record this IP address in your node anywhere so my first IP address is so this is the domain controller name three and this is for uh no one no no it's not nine three it should be let me check again refresh your server two to six it should be two to six two two six done now you have to turn off your firewall click on this domain Network turn off public network turn off public enter turn off okay Express sheet Okay so fire will also turned off now I have to rename this computer and add this server with the domain controller so I will add this server as it with this domain controller so let me just double click on this change here so I will name This Server as a node one and click on member of domain click on this and you have to provide the domain name complete name so what is my domain name let me check my from my domain it is my domain server let me check so this is my domain name cql.
com so I will put this name here this is my node one just put the domain names sequel. com okay now you have to provide the password for you for the domain controller so domain controller username is administrator so you can check here domain go back to your domain controller and you can check which user is currently turned on yeah currently connecting so SQL unders forward slash admin administrator so administrator is my username so I will use this username here let's go back node one so admin is there and password same password click ok Welcome to The sequel. com Domain that means you are now connected with this domain now press ok you need to restart your machine okay we'll start now okay let's unlock your machine so now you see there is a username is showing administrator and this is local account you have to provide a domain account domain username so you can what is your domain name so domain user also administrator but if you use only administrator it will just connect the local server administrator account so now you have to so let me create a user common user for the domain so let's go back domain controller now go server manager go tools now you can see computer management or active directory user and computer click on active directory and use your computer now you can expand the sql.
com this is my domain so under that this domain there are a couple of things here there is computer the user there's a lot of things here so you have to provide this there is a yeah you can choose say at a user here so this user create right click on this hit new you can see you can create new computer you can also create the user so we will create a user click on this let me create my name okay my username will be awesome underscore yeah at the rate of sql. com yeah this this user I will create next password I have to provide a password let me provide the password okay and don't uncheck Comes unchecking This option password neighbor can click on this so next next finish so this user I just created a sanhave but I have to provide this user as a administrator freebie list so let me just click on this go properties you can see at number of here remember click on member of at now currently is only domain user you will provide as a administrator previously so let me just write down at me check name so you can see that means return is here administrator group so now press ok so domain this user slip part of administrator now now press apply and okay done so asan Habib is a domain user and username is asan unders at the rate of sql. com so I will use this account for login from low node 2 let me unlock this computer first let me choose other user okay awesome .
com I'll provide my password okay all right now my meshing has been properly configured I am connecting with the domain internet connection now I have administered previous in domain controller but I have to provide administrator pass uh privileged in this node one so how I can do that so let's go uh server manager again don't show this message again now go tools now you can see here there is option uh computer management you can click on computer management now you can see local user and group expand this one group now you can see administrator here uh double click on this so now only one administrator is here domain at me but you have to provide the domain uh the asan as a administrator so add Asana as a administrator so let's uh let's just type your name here awesome click yes our sun at the rate of sql. com so this is a now press ok so as an a bit also administrator in this in this domain so apply the following hero record that empty save the Properties Group administer control Node 1 access denied okay uh I cannot add my account as a to make is administrator so I have to access from other account to make this account as a administrator so let's just go back sign out login again other user let me use administrator uh password okay now let's go again computer manager choose computer management local user expand this group administrator double click on this add let's put my name check into directory sql. com username is com foreign okay so awesome heavy you can see here it's already added let's click ok apply done so now answer habit as a is assigned as a domain administrator for this particular machine okay ah lets me uh sign out from this server and I will sign in as a song okay sql.
com my password okay now I have full administrative uh access all right so my second server uh fine pass node is completely configured properly now let's go back my node 2. now before going that uh I will just make I will change the Sleep option here I don't want to make this computer sleep okay neighbor none let's go back to my second note close it second note same thing I have configured my network previously now go start app to show the path where is my operating system so operating system is here click on this file okay choose start the same way you have to install operating system in your node 2. next install data center evaluation desktopic screen next accept this license term next custom install Windows legs okay I have to download my password again foreign let me just put in password again so second node the Windows Server operating system has been successfully installed now oh okay I want to connect this network so at first we need to change the IP address then we need to change the firewall connection we have to turn it off then we have to change the name of this computer and we have to add this server with our domain controller so let's change from local server local then go IP address yeah double click on this ethernet two parties uncheck this protocol version 6.
Internet Protocol version 4 double click on this let me check by default they put they have just provided CMD I click config so they just provided this IP address for this machine let me just record this IP address here it's not copying let me check 104 104. okay so DNA server must uh subject mask is 255 2550 and default gateway 10. 0.
01 so I will make this IP address static everything so currently this is not static it might change if you change the Wi-Fi network then if the IP address might change so yeah now I want to make this IP address static 104 [Music] 10. 0. 0 Dot 104 Subnet Mask two five five two five five two five five zero minus the default gateway 10.
0. 0. 1 and DNS server as I said before it should be always the IP address of your domain controller so let's check what is my domain controller IP address so this is my domain controller IP addressed 193 10.
0. 0193 there's okay there one nine three now press ok close close close now refresh your server yeah your iPad address has been configured properly now you have to turn off your firewall click on this domain Network turn it off private Network turn it off object enter turn it off so my firewall is turned off Let me refresh it still it's showing yeah now it's showing turn off now I have to rename my this computer and I have to add this computer with the domain so let's double click on this change this computer name change I will rename this computer as a node two and I have to add this like member of click on domain I have to provide the domain name the domain name was sql. com now press ok I have to give the username for my domain so the answer name for domain is administrator password foreign .
com domain so now this node is connected with the domain now you have to restart this computer okay unlock your computer okay let me just log in with this local administrator account and I will add my our sun the user I just created in the domain I will give administrator privilege to this account okay let me just uh login now server manager it's already opening okay now go tools computer management now go local user expand this local user and group groups double click on this administrator add you have to provide the name asan check name I have to provide full name as an under at the rate of cpl. com and password yeah now you can see the user is here okay our sun is already added administ in administrator group apply okay now cancel everything else sign up from the server and try to login with your username awesome sql. com that's right yes so same account I just logged in from Node 1 and node 2.
so node one you can check here node one voice let me just change the sleep never it will not never sleep and it changed from node 2 as well powered shape and change it never so our node one and node 2 is ready for configuring always on our domain controller is running node one is running node 2 is also running so before installing anything we have to we want to shared folder So currently we cannot access any shared folder from whatever you can share from here you cannot see from the uh from your virtual machine so if you want to access this access your local drive any local shared drive then you have to uh install some feature so what is the featured so for domain controller I don't need any shared folder but I need from Node 1 and note 2. so let's open node one and open your file folder folder manager let's open your this com this PC So currently the CD drive is actually is a is showing like your operating system you have to eject this operating system from the CD drive first so right click on this folder and just eject now your CD drive is empty let's go device click on insert guest Edition cdms now you can able to see the CD drive here so double click on this so you have to install this Oracle VM virtualbox guest Editions click next next so you have to reboot your server finish let's go back my node to same thing I will do same thing like I have to exec this operating system from CD drive insect now it's it is showing empty now go device insert guest additional CD image double click on this next install So This Server also reboot after installing this feature tribute down yes so in the meantime I guess my node one is already rebooted let's login to okay now my node 2 also let me turn it on okay so before so our server is ready now you can access any shared folder from your device like anything you can share like let me share this folder this is my sequel 2019 and I have my SQL installation file here and this is my ssms hello so I want to share this folder with everyone so right click on this uh show more option go properties in your Windows 8 Windows 10 you can see just you can just click right click and you can just click on properties so it's since it's Windows 11 it's showing more option so show more option go for parties uh share this share this folder is already shared so let me share again how you share so share so let's uh expand this option and last option you can see the everyone click on everyone add now everyone will be add here and you have to provide just click on here by default they will provide only reduction read permission you have to provide read and write permission click on read and write permission and share now here's folder this folder is shared now go back here Oracle VM virtualbox manager so go back node one now we have to shared folder option you have to choose this path for shared folder so click on shared folder go click on here the folder plus option click on here folder paths click on here go other and you have to choose the path so my path was from d Drve always on and record software required software this was my shared folder so let's select this folder and you just choose Auto Mount from here okay done now you can see you can able to see from node one let me check node one you can see this folder you can access from this partial machine but still you cannot access from node 2. you can see here you cannot see here because we haven't shared this folder from here so let's click on node 2.
and shared folder click plus option shared path other now go to Software always on required software slip folder Auto Mount I'll press ok now check from your node 2. yeah from node 2 you can also access this folder so yes so our Node 1 and node 2 is ready for always on configuration so we have to create a cluster between Node 1 and node 2. to create cluster you have to add one feature that is failover clustering this feature you can add this feature through a server manager you can just go to server manager you can see dashboard and you can just add role and feature click on ADD rows and feature next can go next so here you cannot see the failover cluster feature because this portion is for role so we need features so go next you can see here failover clustering here click on failover clustering add feature and go next restart this destination server automatically if required click on this checkbox yes install so this is uh this feature is uh installing in in my node one so let's go back my node to open server manager so we have to install same feature in Node 1 and node 2 failover feature so click on ADD role and features connect next failover clustering click on this X at feature now go next restart this destination server automatically if required click on this yes and install so both server we are installing uh this feature failover cluster let's check our node one whether it's the installation is completed or not so node one is already rebooted let me just open this server yeah it's it is showing it's pending so instructions succeeded on Note 1 now close it now let's go back my node 2.
Note 2 is also rebooted let me finish the installation installation succeeded on node 2. now close it so failover cluster feature has been added in my node 2 and node 1. so now you can create cluster so I'm going back my node one so this is my node one so I will use uh let me open failover cluster just open and click on here and write failover cluster you can see failover cluster manager open this failover cluster manager currently you don't have any clusters so you can see failover cluster manager here so right click on this and create cluster don't show go next so I have to add the server name here so my server name is Node 1 and second server name is node 2.
you can provide IP address as well so yeah I know that my server name is node one so I will put Node 1 here let me add this yeah you can see node one at Dot sql. com now I want to add node 2. let me add it so Node 1 and node 2 is added here so I want to make cluster between this node okay go next yeah it will some run validation next run all tests recommended go next and now press yes so it's showing this past uh we have some warning but most of this is succeeded so you can see here some warning so there is no error here if you see any error then you have to check why it's Error but since it's showing warning so we can go ahead uh finish it so we have to provide a cluster name so I will name it SQL cluster SQL cluster and I have to provide a IP address so these IP address for this cluster I mean you can access both node by this IP address foreign let me check my IP address so 104 226 193 so I can let me try 10.
0. 0. 105 so I have to use a unique IP address for this cluster if this IP address is already assigned it will not take so let me oh no let me just put 105 hit next okay so we can create we can use this cluster IP address 105.
okay here is some option we add all erasable storage since this part we need for the uh configuring Windows failover clustering but we don't we are working on always on we don't need this option just we can uncheck this part uncheck go next now finish it now you can check here Your Role currently there is no role we haven't installed SQL Server that's why it's showing is nothing is here so you can click note you can see Node 1 and node 2 is up so up means it's this node is already running and you can check IP address here so Node 1 IP address network connection you can check here so node one IP address is 10. 0. 026226 and load to IP address X 10.
0. 014 so you can see here okay okay I'm closing everything so we have create cluster for SQL Server uh our origin now we have to install SQL Server now we are in node one let me install SQL Server so SQL Server is already in my shared folder so let me open this one double click on this run as the administrator learn yes installation new SQL Server is Standalone installation run developer next accept this term license term next so now I have to select feature which feature I need let me select select all we don't need machine language machine learning you don't need integration service we don't need SME learning here you don't need polybase we don't need to analyze service uh okay okay just leave it as it is on x so default instance yeah I will install the following steps next so I have to provide the account name administ tip account name here so by default this is provide NT service this type of account here so I will use my administ background so asan is already administrative account I can use awesome yeah let me type awesome check name yes and Habib this is my domain name domain IP domain address so SQL forward slash R subject let me copy this one paste it here paste here paste here and let me put the password let me make it automatic foreign okay now go next mode I have to provide acid password Here add current user next next so it will take a while so in the meantime I will install I will also install SQL server in my second node let me open my second note let me go my shared folder SQL double click on this yes installation new SQL Server external new installation Ram developer next accept license next so I have to add feature here question is I don't need to follow this internet analysis I don't need machine learning I don't need integration I don't need yeah it's best of the spine go next yeah default instance same thing I have to give my username let me put on some check name there you go copy this one paste here paste here go next next mod you have to provide as a password Here current user thanks current user next X now install so it will take a while let me go back my SQL node one so node one almost finish so here node one is already this uh SQL Server is installed now close it now you have to configure some thing from configuration manager let me go configuration configuration so you can see SQL Server 2019 configuration manager click on this yes now go SQL Server network configuration protocol for SQL Server click on this TCP port and above name type and above and go SQL Server service and click on the SQL Server this is the SQL Server click on this right click on this and go for parties and you can see always on availability group click on this and check mark enable always on availability group and by default detect my cluster name here so you have to enable here apply so any change made will save however they will not take effect after uh until the server service is stopped or we started okay so I have to restart this service restart now let's go back my node 2. node 2 is almost there okay SQL Server is installed and also configuration has been done from here now I have to install ssms let me go back my shared folder and here is my ssms double click on this run yes install it will also take a while let me go back my node to so node 2 is almost there so instructions succeeded now close it now go configuration manager SQL Server 2019 configuration manager click on this yes go SQL Server network configuration expand this protocol for ML SQL Server enable TCB port okay name five enable and go SQL Server services and click on SQL Server right click properties always on availability group click on this you can see also here the SQL cluster already detected you have to just enable this always on availability group click on this apply so we have to restart these services let me restart this service let's go back and go back my okay node one so you can see my left side this is node one and this is node two so we need to reboot This Server node one is keyboard required let me reboot This Server just unlock this machine now open ssms let me just is equals server management Studio open okay so this is my node one you can easily connect Node 1 from here so let me check whether I can able to connect node 2.
connect node to my second node yes I can connect node 2 from here Okay so before uh configure always on we have to we need a database let me create a quick database here new database let me test DB so there is a condition please requisite to like if you want to make a any database in availability group you have to take full backup first at least you have to take full backup so let me take a backup backup and here is the full backup okay the location default location is fine now so now let's go always on High availability right click on this now new availability group wizard next so we have to provide a name for this group I will show only test go next so let's see you can able to see the database here text DB is here so you can check on this don't mix so here is the option so this is my node one and I want to make this node as a failover like automatically failover and I want to read from secondary node click on this yes and add replica node 2 so node 2 will be my uh secondary note I want also failover automatic failover here and also I want to choose I want to read from my secondary node okay now go next so automatic CD School backup and log backup join only skip initial data synchronization you can choose any of this option for small database you can choose automatic exceeding if your database is a large size like almost 500 GB one terabyte then you have to take full backup and log backup and you have to restore in secondary node as a no recovery mode so let me do that so let me suppose this is my huge database like one terabyte database let me take a backup and okay backup so let me choose a shared location for this backup file remove this default location click on here and go G drive is my shared folder so you can let me name it Test TV cool back done so full backup has been completed now I will take a log backup task backup transitional log packer remove this location click on here go G drive this is my shared folder and name it test log dot key and then turn okay so my log backup also done now you have to restore these database as no recovery mode let me just right click on this and restore database device and we have to show the path my backup location will Z Drve let me click on G and you can see here backup and log backup just click uh select both of this okay so now my database pull backup is here transaction log backup is here now go option you can see there is a list with recovering you just change it register with no recovery now press ok now you can see in secondary note it's showing this story let me go back here expand the availability group so let me do it from the beginning so right click on this new availability group wizard next name test you have to select the database name click on here next click on here yes add replica node 2 is connected here available yes so this is the settings so next and you can choose join only click here next so here you can see some parties is skipped now go next finish it so joining test DB availability group test is succeeded it's insert complete certificate now you can see it's showing this stirring but if you refresh it then you can see it should be synchronized yeah it didn't synchronize you see so you can make a listener for this uh this availability group I mean these listener is a like connection listener it's a connection where you can able to connect which node is online which node is primary listener will connect this uh This Server so you can click on ADD listener you can choose Network Mode static IP you can choose test connection port number SQL Port I will provide 1433 static IP let me just add the IP address for this so yes let me check which IP address we have used so 104 105 so we can use 105 106 let me check 10. 0 Dot 0. 0 Dot 106.
so this is 106 is my listener so my listener is added so let me connect with listener type address 10. 0 Dot zero zero 106 right 106 was my listener code let me just connect it yeah so listen has been connected so these listener actually it's connecting with my primary note So currently my primary node is node one so this through this listener right IP address it's actually connecting my primary node so whichever is my primary note like if my primary node is node 2 so by this port like if you use this code listener Port you can use it can able to connect the primary node okay let me check with node it's actually it's connecting you can check properties so yeah so you can see foreign let me fail over to from primary node to secondary node so how you can failover so you can do couple of way so you can open failover cluster manager open failover cluster manager and you can check expand the SQL cluster and go role now you can see owner node is showing node 1. let me switch let me just change it like on a note will be node 2.
so node 2 is up let me just choose this one okay so node to see it's now running node 2 is mine now it's my primary node let me just double check if you refresh the listener port listener server and if you check the properties you can see the it will connect just node 2. see it's now currently showing previously it was showing node one now since node 2 is my primary node that's why the listener is connecting node 2. okay now go back you can check here always on availability group availability group I'm showing the test is primary here and it's showing primary but it's not primary refresh it you can check here it's secondary you can failover from here as well so node primarily let me fail over from here right click on this failover failover to quiznode so from node 2 it will failover to node 1.