Hi, everyone, and welcome back.
Now, in today's video, we are going to discuss about the database migration service.
Now, whenever you are migrating your applications from on premise to cloud environment, one of the
critical component of the overall stack is the database.
So database migration proves to be very critical and important.
And this is where the database migration service comes into picture.
So at a high level overview, the database migration service is a cloud service and it makes it possible
to migrate various types of databases like relational database, no SQL database data warehouse, as
well as other types of data stores.
This is the basics of the DMS.
And one of the advantages here is that you can use the DMS to migrate your data into the cloud or between
combinations of cloud and on premise setups as well.
So if you look into this specific diagram.
You have a source database on the left, you have a target database on the right, and in the middle
you have the US data migration service.
So what do you generally do?
You connect the source database to the source endpoint target database to the target endpoint.
And then you have the replication instance through which the data can be migrated from source to target.
Now, at a very high level overview, the DMS is a server in cloud that runs the replication software.
So you have the DMS server, it takes the data from on premise and it copies it to a specific target.
And this is the reason why you create a source and a target connection to tell the DMS where to extract
from and load to.
So this specific DMS should be able to connect to both the database in the on premise as well as the
target database.
So with this base set, let's go ahead and have a quick demo to understand things in more detail.
Now currently I'm in the database migration service console and here you see that I have one data migration
task, I have one replication instance and two endpoints.
Now, as we were seeing in this specific diagram, also you have a source endpoint and a target endpoint.
Source endpoint connects to source database target endpoints connects to target database.
So at the overview, you will have two endpoints which you see over here.
So if I'll have to show you the endpoints, you have the source endpoint and you have the target endpoint
source endpoint.
In fact, let me open this up.
It is connected to a source database with the IP of 634227.
Now, in a digital ocean environment, I have one database that is running and the IP address again
is 64.227.
So this specific source endpoint is connecting to this specific database server.
And then you have the destination endpoint.
Let's open this up.
Now in here the IP address is one 7231.
And if you look into the easy two instance over here, the IP address again is one 7231 So what we are
trying to do is there is a database in a digital ocean environment through the database migration service,
we are migrating it to the EC2 instance.
Now again, it is not necessary that you have to use EC2 instance.
It can also be arduous as well.
All right.
So I hope with this you understood the source database, target database source endpoint and target
endpoint.
The next important part is the replication instance.
So if you'll see, I have a replication instance that is running, let me in fact open this up.
Now, this replication instance also has an instance glass.
So depending upon the size of the data and various other factors, you can go ahead and define an instance.
Glass It can be a bigger instance.
It can be smaller instance.
Apart from that, you can also allocate storage.
So I have allocated ten GB of storage.
You can increase it depending upon the requirement.
You also have option for the multi availability zone generally for production environment you will set
it to.
Yes.
However, since this is a testing, we are keeping it simple.
Now as part of this replication instance, we also have a migration task.
If you will see the migration task status is load complete progress is 100% in the source.
You have the source endpoint in the target, you have the target endpoints.
I file open this up, you basically get the overall progress.
You can also get the exact table statistics over here.
Now for the server in digital ocean environment where the database is present, let's quickly look into
it.
Let me just quickly connect here and if I quickly do show databases over here, there is one specific
database, Collins employees.
So this is the database that we had migrated from the digital ocean environment to the US environment
through the database migration service.
So from the EC two instance, again, if you will see show databases, you have the employees database
here.
Now let's do one thing.
Let's also try it out once more.
So I'll say drop database employees.
All right.
Now, if you do show databases again, you see employees database is no longer present.
So as part of this demo, we will migrate this employee database from the digital ocean environment
to the EC two instance.
So let's go ahead and look into the process at a very high level overview.
Now, whenever you create a task, let's just call it ISE migration task.
Here we have to select a replication instance.
So we have this replication instance as we're discussing, this specific replication instance in orange
that you see is what we are adding here.
Then you have to choose the source database endpoint target, database endpoint.
We know that the source database endpoint is connected to the source DB target database endpoint is
connected to the target database.
Let's go a bit down and within here I'll just select the name of the database that we want to migrate,
which is employees.
All right, once then you can go ahead and create the task grid.
So our task creation is in process.
It can take a few minutes.
Again, it all depends upon the database size as well.
If the size is much more larger, the overall migration will also take a lot of time.
So at this stage the progress is 87%.
So let's quickly wait for it to be completed.
And great progress is now 100% complete and you have a load complete status as well.
So from the EC two instance, if we run the show database's command once more, you see you have the
employees database that is available.
If we use this specific database, let's select this.
And if you do short tables for an example, you have various tables like departments, salaries, titles,
etc..
Just for simplicity, let's look into what exactly is there in departments.
So under departments of marketing, finance, HR, production and so on.
So again, you have a lot of data as part of this database.
In fact, if we'll just do a select star from employees.
You can see the number of data that is part of this specific table.
So there are more than 300,000 rows as part of this.
Great.
So that's a very high level overview introduction.
Video associated with the Data Migration service and with this will conclude today's video.