In this blog, we are going to cover Migrate Your Relational Database To Azure. In Azure, you can migrate your database servers directly to IaaS VMs (pure lift and shift), or you can migrate to Azure SQL Database, for additional benefits. Azure SQL Database offers the managed instance and full database-as-a-service (DBaaS) options.
Topics We’ll Cover :
- What is Relational Database
- What is Azure SQL Database
- When To Migrate To Azure SQL Database
- Use Azure Database Migration Service to migrate your relational databases to Azure
- Migrate Oracle To Azure SQL Database
What Is Relational Database
A relational database is a type of database that stores and provides access to data points that are related to one another. The columns of the table hold attributes of the data, and each record usually has a value for each attribute, making it easy to establish the relationships among data points. Examples of Relational databases are Oracle, MySQL, etc.
What Is Azure SQL Database
Azure SQL Database is a fully managed platform as a service (PaaS) database engine that handles most of the database management functions such as, backups, and monitoring, patching, upgrading without user involvement. Azure SQL Database is always running on the latest stable version of the SQL Server database engine and patched OS with 99.99% availability. PaaS capabilities that are built into Azure SQL Database enable you to focus on the domain-specific database administration and optimization activities that are critical for your business.
When To Migrate To Azure SQL Database
The standard Azure SQL Database is a completely managed, relational DBaaS. SQL Database at present oversees a huge number of production databases, across 38 data centers, all throughout the world. It upholds an expansive scope of utilizations and responsibilities, from managing straightforward transactional data to driving the most data-intensive, mission-critical applications that require advanced data processing at a global scale.
As a result of its full PaaS features, better evaluating, and at last lower cost-you should move to the standard Azure SQL Database as your “by-default choice” if you have an application that utilizes fundamental, standard SQL databases, and no extra additional instances. SQL Server highlights like SQL CLR integration, SQL Server Agent, and cross-database questioning are not upheld in the standard Azure SQL Database. Those provisions are accessible just in the Azure SQL Database Managed Instance model.
Azure SQL Database is the only intelligent cloud database service that’s built for app developers. It’s additionally the cloud database service that scales on the fly, without downtime, to assist you with productively conveying multitenant applications. At last, Azure SQL Database leaves you more opportunities to improve, and it speeds up your chance to advertise. You can build secure applications and associate with your SQL database by using the languages and platforms that you prefer.
Azure SQL Database Offers The Following:
- On-demand database provisioning
- A range of offers, for all workloads
- 99.99% availability SLA, zero maintenance
- Geo-replication and restore services for data protection
- Azure SQL Database Point in Time Restore feature
- Built-in intelligence (machine learning) that learns and adapts to your app
- On-demand database provisioning
- Compatibility with SQL Server 2016, including hybrid and migration
Use Azure Database Migration Service To Migrate Your Relational Databases To Azure
- You can use Azure Database Migration Service to migrate relational databases like Oracle, and MySQL to Azure, whether your target database is Azure SQL Database, Azure SQL Database Managed Instance or SQL Server on an Azure VM.
- The automated workflow, with assessment reporting, guides you through the changes you need to make before you migrate the database. When you are ready, the service migrates the source database to Azure.
- Whenever you change an original RDBMS, you might need to retest. You also might need to change the SQL sentences or Object-Relational Mapping (ORM) code in your application, depending on testing results.
Migrate Oracle To Azure SQL Database
1.) Assess
- Open SSMA for Oracle. (Microsoft SQL Server Migration Assistant (SSMA) for Oracle is a tool to automate migration from Oracle database).
- Select File, and then click on New Project.
- Enter a project name and a location to save your project. Then select the target as Azure SQL Database from the drop-down list and select OK.
- Click Connect to Oracle. Enter Username and Password for Oracle connection details in the Connect to Oracle dialog box.
- Select the Oracle schemas you want to migrate.
- In Oracle Metadata Explorer, right-click the Oracle schema you want to migrate and then click on Create Report to generate an HTML report. Instead, of this, you can select a database then select the Create Report tab.
- Review the HTML report to understand conversion statistics and any errors or warnings. You can also open the report in Excel to get an inventory of Oracle objects and the effort required to perform schema conversions. The default location for the report is in the report folder within SSMAProjects.For example, see
drive:\<username>\Documents\SSMAProjects\MyOracleMigration\report\report_2020_11_12T02_47_55\
.
2.) Validate The Data Types
Validate the default data type mappings and change them based on requirements if necessary.
- In SSMA for Oracle, select Tools, and then select Project Settings.
- Select the Type Mapping tab.
- You can change the type mapping for each table by selecting the table in Oracle Metadata Explorer.
3.) Convert The Schema
- (Optional) Add dynamic or ad-hoc queries to statements. Right-click the node, and then select Add statements.
- Select the Connect to Azure SQL Database tab.
- In SQL Database, enter connection details to connect your database.
- Select your target SQL Database instance from the drop-down list, or enter a new name, in which case a database will be created on the target server.
- Enter authentication details, and select Connect.
- In Oracle Metadata Explorer, right-click the Oracle schema and then select Convert Schema. Or, you can select your schema and then select the Convert Schema tab.
- After the conversion finishes, compare and review the converted objects to the original objects to identify potential problems and address them based on the recommendations.
- Compare the converted Transact-SQL text to the originally stored procedures, and review the recommendations.
- In the output pane, select Review results and review the errors in the Error List pane.
- Save the project locally for an offline schema remediation exercise. On the File menu, select Save Project. This step gives you an opportunity to evaluate the source and target schemas offline and perform remediation before you publish the schema to SQL Database.
4.) Migrate
To publish your schema and migrate your data:
- Publish the schema by right-clicking the database from the Databases node in Azure SQL Database Metadata Explorer and selecting Synchronize with Database.
- Review the mapping between your source project and your target.
- Migrate the data by right-clicking the database or object you want to migrate in Oracle Metadata Explorer and selecting Migrate Data. Or, you can select the Migrate Data tab. To migrate data for an entire database, select the check box next to the database name. To migrate data from individual tables, expand the database, expand Tables, and then select the checkboxes next to the tables. To omit data from individual tables, clear the checkboxes.
- Enter connection details for both Oracle and SQL Database.
- After the migration is completed, view the Data Migration Report.
- Connect to your SQL Database instance by using SQL Server Management Studio, and validate the migration by reviewing the data and schema.
Related/References
- Exam DP-300: Microsoft Azure Database Administrator Associate
- Microsoft Certified Azure Database Administrator Associate(Hands-On Labs)
- Azure SQL Deployment Options | SQL Managed Instance | SQL Database| SQL On VM
- Migrate SQL Server To Azure SQL Database
- Implement A High Availability And Disaster Recovery Environment
- Use External Table On Azure SQL Managed Instance To Read Data From Azure SQL Database
- Optimize Query Performance In SQL Server
- Create alerts for Azure SQL Managed Instance
Next Task For You
We will cover all the exam objectives related to how to perform migrations, Hands-On Labs, and practice tests in our Azure Database Administrator training program. If you want to begin your journey towards becoming a Microsoft Certified: Azure Database Administrator Associate by checking our FREE CLASS.
Leave a Reply