Posts

Showing posts from June, 2024

Setting Up SQL Server Database Mirroring

Image
 This part will show you how to setup a database mirroring on SQL Server. Because this feature needs 2 different servers (3 if you use witness server) so I will use the server that I've already set on the previous part when showing how to setup SQL Server AlwaysOn Availability Group, you can check that part on:  here So in summary I already have 2 servers that host SQL Server, called SQL01 and SQL02, the servers are already joined to domain and can connect to one another. And now I want to setup a database mirroring from SQL01 to SQL02, here are the steps that should be done: 1. So in here, I created a new database called "Test_Mirror" and also a table inside the DB called SimpleTable on SQL01, I want to make this server the primary server 2. Now the next thing to do is, we need to backup and restore the Test_Mirror DB on the SQL02 which will become the mirror server (secondary server). Database mirroring is quite different than AlwaysOn AG because there is no automatic s

Setting Up SQL Server AlwaysOn Availability Group

Image
On this part I'm going to show a demo on how to set up SQL Server AlwaysOn Availability Group on local computer. First, we need to have virtual machines on our local computer because we need to spawn at least 3 VM servers that will be domain controller, SQL Server 1 (primary), and SQL Server 2 (secondary) To do that, you need to install VMWare Workstation first (or any other tools for virtual machine), it can be downloaded for free from:  VMWare Also you need to have Windows iso, SQL Server iso, and SSMS installer. What I use: Windows Server 2019 evaluation edition from Microsoft:  Windows Server 2019 ISO SQL Server 2019 Developer Edition:  SQL Server Developer Edition Downloads  (this, you need to login first because official SQL Server Developer Edition now can only be downloaded from Visual Studio website) SQL Server Management Studio:  SSMS Notes: if you are planning to use SQL Server 2012 or earlier, you need to download .NET Framework 3.5 installer too because Windows Server