Database Gateway allows you to easily connect an on-premises database or a third-party cloud database to Alibaba Cloud at a low cost. When you configure a data migration, data synchronization, change tracking, or data verification task in the Data Transmission Service (DTS) console, you can use the connected database as the source or destination database.
Prerequisites
An AccessKey pair is created. The AccessKey ID and AccessKey secret are obtained. For more information, see Create an AccessKey pair.
Background information
You can connect an on-premises database or a third-party cloud database to Alibaba Cloud by using one of the following methods:
Connect the database to Alibaba Cloud over Express Connect, VPN Gateway, or Smart Access Gateway (SAG): This method is not suitable for individual users due to high costs.
Connect to the service port of the database over the Internet: This method involves potential security risks.
Forward service requests by using a self-managed proxy: This method requires high technical costs and does not ensure high stability.
The preceding methods have disadvantages. You can connect an on-premises database or a third-party cloud database to Alibaba Cloud by using Database Gateway at a lower cost. For more information about how Database Gateway works, see What is Database Gateway?
Procedure
Log on to the Database Gateway console.
NoteIf you are using Database Gateway for the first time, you are navigated to the Cloud Service Activation page. On this page, read and agree to the terms of service, and then click Activate Now.
On the Gateway List page, click Create Gateway.
In the Create Gateway step of the Create Gateway wizard, enter the name and description of the database gateway that you want to create, and then click Next step.
In the Install Gateway step of the Create Gateway wizard, install the Database Gateway agent.
ImportantThe server where you want to install the Database Gateway agent must meet the following requirements:
Performance: At least one idle CPU core and 1 GB of idle memory are available on the server.
Software environment: Java runtime environment (JRE) 1.7 or later is installed on the server. We recommend that you use a 64-bit OS.
Network:
The server can connect to the database that you want to add to the database gateway. If the server and the database are deployed in the same internal network, the network latency is minimal.
The server can access the Internet. The service port of the server does not need to be accessible over the Internet. To improve the transmission rate and stability, make sure that the outbound bandwidth is at least 10 Mbit/s.
Select a suitable installation package based on the OS of the server.
If you use the Windows OS, click Download gateway and install the Database Gateway agent as prompted.
If you use other OSs, copy and paste the command to the server where you want to install the Database Gateway agent. Then, press Enter to run the command.
Wait for the Database Gateway agent to start.
Go to the Adding a Database step of the Create Gateway wizard.
After the Database Gateway agent is started, you are navigated to the Adding a Database step.
You can also click Next step in the Install Gateway step to go to the Adding a Database step.
Click Add database address to add a database to the database gateway. For more information, see Create a database gateway.
Click Complete.
After the database is added to the database gateway, you can modify or delete the database.
What to do next
When you configure a data migration, data synchronization, change tracking, or data verification task, set the Access Method parameter of the source or destination database to Database Gateway and select a database endpoint from the drop-down list. Then, you can use the corresponding database as the source or destination database in the task.
If you set Access Method to Database Gateway when you configure a data migration task, make sure that the source and destination databases reside in the same region. In this case, cross-region data migration is not supported.