In this scenario, you will use “Native Backup Restore” migration approach for your source SQL server.
As the prerequisites, you require a network connectivity between your Source and Target environments. In order to replicate the real life scenarios, in this workshop, we built VPC peering for you between Source and Target environments.
Required Security Groups for your environment are created for you in this workshop.
To set up for native backup and restore, you need three components:
To enable native backup and restore on your DB instance, you add the SQLSERVER_BACKUP_RESTORE option to an option group on your DB instance. For more information and instructions, see Support for native backup and restore in SQL Server.
If you created subnet group already in Java section, you can use the same Subnet Group.
Go to the AWS Console, from Services choose RDS, select Subnet groups from the menu on the left and click Create DB Subnet Group
On the Create DB subnet group enter the following information
|Description||Subnets where RDS will be deployed|
In the Add subnets panel add one subnet from each Availability Zone (us-west-2a and us-west-2b) with CIDRs 10.1.101.0/24 and 10.1.201.0/24, then press Create button.
Now select Databases from the menu on the left and click Create database
From the Engine options, select Microsoft SQL Server and select the version details as below:
|Edition||SQL Server Express Edition|
|Version||SQL Server 2016 13.00.5820.21.v1|
In the Template section select “Free Tier”.
Choosing of “Free Tier” template limits your options in the next steps of the wizard, so that you stay within the limits of AWS Free Tier.
In the Settings section, configure the DB instance identifier (unicorn), Master username (unicorn) and Master password (awsrocks2021) for your new database instance.
|DB Instance Identifier||unicorn (enter “unicornsql” if you created unicorn DB in Java section already)|
Make sure to write down Master username and Master password, as you will use it later.
Select db.t2.micro from the Burstable DB instance class, General Purpose (SSD) for Storage Type and uncheck “Enable storage autoscaling” (we don’t need more than 20 GB of storage for this database).
For production workloads, we recommend enabling the standby instance to enable Multi-AZ Deployment for higher availability.
In the Connectivity section:
Note: SQLRDSSG Security Group is already created for you and allows traffic from your Source Database and Source Web Server.
From Additional configuration section, select the Option group (‘unicorndb-sql-option-group’) which you’ve created earlier.
Uncheck Backup, Performance Insights and Monitoring boxes as shown below.
Finally, review the Estimated monthly costs and click the Create database button.
Creating the Database will take few mins. You can check it is status from “Databases” section. Once it is ready, you should see it’s status as “Available” as shown below.
In the Connectivity & Security tab, copy and note the Endpoint URL for your DB. You will use this endpoint URL to connect your database in the following sections.