Migrate an On-Premises Database to an Oracle Base Database Service
Simplify your database provisioning, maintenance, and management operations by moving your on-premises deployments of Oracle Database to Oracle Base Database Service in Oracle Cloud.
Before You Begin
Architecture
The following diagrams illustrate the path to this reference architecture, from the on-premises architecture before migration through to a migrated database in Oracle Cloud Infrastructure (OCI). The on-premises deployment includes an application server and an instance of a Standard or Enterprise Edition Oracle Database.
Description of the illustration premises-arch.png
The following diagram shows the interim architecture. The OCI Region, VCN, subnets, infrastructure, and services are established. The on-premises network is connected to the OCI region using IPSec VPN or OCI FastConnect. Oracle RMAN backups are sent bi-directionally between the on-premises database server through the service gateway to OCI Object Storage.
Description of the illustration interim-arch.png
After the on-premises Oracle Database is migrated to Oracle Base Database Service, the on-premises application is migrated from an on-premise compute instance to an OCI compute instance and all database and compute services are in Oracle Cloud and use Oracle Database Zero Data Loss Autonomous Recovery Service.
Description of the illustration migration-arch.png
The OCI architecture has the following components:
- Region
An Oracle Cloud Infrastructure region is a localized geographic area that contains one or more data centers, called availability domains. Regions are independent of other regions, and vast distances can separate them (across countries or even continents).
- Availability domains
Availability domains are standalone, independent data centers within a region. The physical resources in each availability domain are isolated from the resources in the other availability domains, which provides fault tolerance. Availability domains don’t share infrastructure such as power or cooling, or the internal availability domain network. So, a failure at one availability domain shouldn't affect the other availability domains in the region.
- Fault domains
A fault domain is a grouping of hardware and infrastructure within an availability domain. Each availability domain has three fault domains with independent power and hardware. When you distribute resources across multiple fault domains, your applications can tolerate physical server failure, system maintenance, and power failures inside a fault domain.
- Compartment
Compartments are cross-regional logical partitions within an Oracle Cloud Infrastructure tenancy. Use compartments to organize, control access, and set usage quotas for your Oracle Cloud resources. In a given compartment, you define policies that control access and set privileges for resources.
- Virtual cloud network (VCN) and subnets
A VCN is a customizable, software-defined network that you set up in an Oracle Cloud Infrastructure region. Like traditional data center networks, VCNs give you control over your network environment. A VCN can have multiple non-overlapping CIDR blocks that you can change after you create the VCN. You can segment a VCN into subnets, which can be scoped to a region or to an availability domain. Each subnet consists of a contiguous range of addresses that don't overlap with the other subnets in the VCN. You can change the size of a subnet after creation. A subnet can be public or private.
- Route tables
Virtual route tables contain rules to route traffic from subnets to destinations outside a VCN, typically through gateways.
- Security lists
For each subnet, you can create security rules that specify the source, destination, and type of traffic that must be allowed in and out of the subnet.
- FastConnect
Oracle Cloud Infrastructure FastConnect provides an easy way to create a dedicated, private connection between your data center and Oracle Cloud Infrastructure. FastConnect provides higher-bandwidth options and a more reliable networking experience when compared with internet-based connections.
- Site-to-Site VPN
Site-to-Site VPN provides IPSec VPN connectivity between your on-premises network and VCNs in Oracle Cloud Infrastructure. The IPSec protocol suite encrypts IP traffic before the packets are transferred from the source to the destination and decrypts the traffic when it arrives.
- Dynamic routing gateway (DRG)
The DRG is a virtual router that provides a path for private network traffic between VCNs in the same region, between a VCN and a network outside the region, such as a VCN in another Oracle Cloud Infrastructure region, an on-premises network, or a network in another cloud provider.
- Service
gateway
The service gateway provides access from a VCN to other services, such as Oracle Cloud Infrastructure Object Storage. The traffic from the VCN to the Oracle service travels over the Oracle network fabric and does not traverse the internet.
- Network
address translation (NAT) gateway
A NAT gateway enables private resources in a VCN to access hosts on the internet, without exposing those resources to incoming internet connections.
- Block volume
With Oracle Cloud Infrastructure Block Volumes, you can create, attach, connect, and move storage volumes, and change volume performance to meet your storage, performance, and application requirements. After you attach and connect a volume to an instance, you can use the volume like a regular hard drive. You can also disconnect a volume and attach it to another instance without losing data.
- Object storage
Oracle Cloud Infrastructure Object Storage provides quick access to large amounts of structured and unstructured data of any content type, including database backups, analytic data, and rich content such as images and videos. You can safely and securely store and then retrieve data directly from the internet or from within the cloud platform. You can scale storage without experiencing any degradation in performance or service reliability. Use standard storage for "hot" storage that you need to access quickly, immediately, and frequently. Use archive storage for "cold" storage that you retain for long periods of time and seldom or rarely access.
- Oracle Base Database Service
Oracle Base Database Service is an Oracle Cloud Infrastructure (OCI) database service that enables you to build, scale, and manage full-featured Oracle databases on virtual machines. Oracle Base Database Service provides ability to deploy fully-featured Oracle databases in virtual machines with network-attached block volumes in OCI Regions. You can deploy Enterprise Edition or Standard Edition 2, and can run Oracle Real Application Clusters (Oracle RAC) to improve availability.
- Oracle Database Zero Data Loss Autonomous Recovery Service
Oracle Database Zero Data Loss Autonomous Recovery Service is a fully managed, standalone, and centralized cloud backup and recovery solution for Oracle Cloud Infrastructure (OCI) databases. It brings real-time data protection to OCI with enforced backup encryption to provide high security. Backup retention safeguards protect against accidental or malicious deletion.
Recommendations
Your requirements might differ from the architecture described here. Use the following recommendations as a starting point.
- Compute shapes
For the application compute shapes, Oracle provides a robust list of options that you can use to align with your application compute and memory needs.
- Block volumes
For this architecture, Oracle Cloud Infrastructure Block Volumes are used to install the application and to store application logs and data. You can create, attach, connect, and move volumes, as well as change volume performance, as needed, to meet your application storage performance requirements.
- Base Database Service VM shapes
Oracle Base Database Service offers a choice of flexible OCPU count virtual machine (VM) compute shapes and processor types. The AMD VM.Standard.E4.Flex shape is the recommended solution for production databases.
Networking- VCN
Before you deploy Oracle Base Database Service you must have a VCN with a client and backup subnet in OCI.
When you create a VCN, determine the number of CIDR blocks required and the size of each block based on the number of resources that you plan to attach to subnets in the VCN. Use CIDR blocks that are within the standard private IP address space.
For your CIDR block range, select an address range that doesn’t overlap with your on-premises network so that you can set up a connection between the VCN and your on-premises network using IPSec VPN or OCI FastConnect. After you create a VCN, you can change, add, and remove its CIDR blocks.The subnets will leverage IPs from the CIDR blocks that you defined to support your VCN. When you design the subnets, consider your traffic flow and security requirements. Attach all the resources within a specific tier or role to the same subnet, which can serve as a security boundary. The subnets for your database and application servers are recommended to be private subnets.
- Database Tier Route Table
This architecture uses a route rule to send database backup traffic from the private BACKUP subnet to OCI Object Storage through the OCI Service Gateway. To establish connectivity between on-premises and cloud, configure the route rule for the Dynamic Routing Gateway (DRG).
- Database Tier Security List
This architecture uses ingress and egress rules in the security lists that are attached to the application server and database server subnets. These rules enable connectivity between the application and database. It is recommended to define the security list rules for the Oracle Base Database Service private CLIENT subnet that establishes port access for SSH access, SQLNet access, and use of Oracle Database Autonomous Recovery Service.
- VCN
- Database migration method
This reference architecture uses the Oracle Database Cloud Backup module to back up an on-premises Oracle Standard Edition database to Oracle Cloud Infrastructure Object Storage. The backup is then used to create a VM DB system on OCI.
The migration process involves downloading the Oracle Database Cloud Backup module, installing it on the database server, and configuring Oracle Recovery Manager (RMAN) to use an OCI Object Storage bucket as the database backup target.
This migration approach requires application downtime while backing up the database to the object storage bucket and restoring the database to a VM DB system on OCI. You must also account for the time required to migrate the application server.Note:
You can minimize or eliminate downtime by using Oracle Zero Downtime Migration (ZDM).Oracle recommends that you use the OCI FastConnect service for migrating large databases to OCI.
Considerations
- Scalability
- Application tier
You can scale the application servers vertically by changing the shape of the compute instances. A shape with a higher core count provides more memory and network bandwidth as well. If more storage is required, increase the size of the block volumes attached to the application server.
- Database tier
You can scale the Oracle Base Database Service vertically by changing the flexible OCPU configuration of the VM shape up to 128 OCPUs on a single-node and 256 OCPUs on a two-node Oracle RAC system. You can also independently scale the DATA and RECO storage attached to the Oracle Base Database Service with DATA scaling up to 80 TB and RECO scaling up to 20 TB.
- Application tier
- Availability
- Application tier
For high availability in the application tier, it is recommended to deploy the application servers in different fault domains, and use a load balancer to distribute client traffic across the application servers. Fault domains provide the best resilience for application workloads deployed within a single availability domain.
- Database tier
For high availability in the database tier, Oracle Base Database Service provides built-in Oracle best practices features. Deploy your database for the best performance, availability, and security using cloud automation, and your system will be optimally configured to provide the highest service levels. When Oracle Base Database Service is configured to use two-nodes It will be automatically deployed with Oracle RAC to provide a scalable, highly available database. Oracle RAC protects from unplanned failures by spreading work across multiple database instances. In addition, it eliminates downtime for maintenance activities by automatically migrating work off the servers about to undergo maintenance to others that remain online.
Oracle Data Guard provides real-time disaster protection. Should you lose your primary database or data center, you can fail your workload over to a standby site maintained automatically by Oracle Data Guard. Oracle Base Database Service makes it simple to enable Oracle Data Guard with a single API call or a few clicks of the mouse in the UI using cloud automation. Likewise, the automation supports critical use cases like switching your primary database to your Disaster Recovery site, switching back, and re-instating your primary database after a failover.
Oracle Data Guard supports all Oracle Maximum Availability Architecture (Oracle MAA) technologies, which form the high-availability blueprint for Oracle databases in the cloud.
- Application tier
- Cost
Migrating your Oracle Database from on-premises to Oracle Base Database Service in Oracle Cloud provides many cost savings opportunities. The cloud deployment will allow you to leverage Oracle's elastic compute resource allocation model and provide you with a choice of CPU licensing models (License Included or BYOL). Running Oracle Database in the cloud with elastic resource compute allocation model allows you to align the allocated CPUs to your workload demand and only pay for what you use. With Oracle Base Database Service, you can start with as little as 1 OCPU and 256 GB of storage and then scale as required.
Deploy
To deploy this reference architecture, create the required resources in Oracle Cloud Infrastructure, and then migrate the on-premises database by using the Oracle Database Cloud Backup module.
The Terraform code to deploy the resources in the cloud is available on GitHub. Use the code to provision the networking resources, a compute instance that you can use as the bastion or for the application server, and a virtual machine DB system.
You can pull the code into Oracle Cloud Infrastructure Resource Manager with a single click, create the stack, and deploy it. Alternatively, download the code from GitHub to your computer, customize the code, and deploy the architecture by using the Terraform CLI.
- Deploy using the sample stack in Oracle Cloud Infrastructure Resource
Manager:
- Go to .
If you aren't already signed in, enter the tenancy and user credentials.
- Select the region where you want to deploy the stack.
- Follow the on-screen prompts and instructions to create the stack.
- After creating the stack, click Terraform Actions, and select Plan.
- Wait for the job to be completed, and review the plan.
To make any changes, return to the Stack Details page, click Edit Stack, and make the required changes. Then, run the Plan action again.
- If no further changes are necessary, return to the Stack Details page, click Terraform Actions, and select Apply.
- Go to .
- Deploy using the Terraform code in GitHub:
- Go to GitHub.
- Clone or download the repository to your local computer.
- Follow the instructions in the
README
document.
Explore More
Learn more about migrating on-premises databases to the cloud.
- About Compute Shapes (OCI Documentation)
- Virtual Machine (VM) Shapes (OCI Documentation)
- Oracle Base Database Service (product page)
- Oracle Base Database Service documentation
- What's New in Oracle Base Database Service
- Oracle Base Database Service How-To's
- Move to Oracle Cloud
- Oracle Zero Downtime Migration