SQL Server to Oracle Migration | Step-by-Step guide

This article provides detailed steps for SQL Server to Oracle migration using Oracle SQL Developer. You can also learn how to back up SQL Server and Oracle in advance.

Lori

By Lori / Updated on March 14, 2025

Share this: instagram reddit

Many businesses choose to migrate database from SQL Server to Oracle for its high performance, better scalability, and powerful features. However, moving from one database to another can seem complicated. But don’t worry! In this article, we will guide you through the SQL Server to Oracle migration using Oracle SQL Developer

SQL Server and Oracle Overview

SQL Server is a popular database management system developed by Microsoft. It's used by businesses for managing data, running queries, and supporting analytics. SQL Server is great for smaller to mid-sized applications but might not scale as well as Oracle when you need more advanced features or support for large-scale databases.

Oracle Database is known for its speed, scalability, and advanced features. It's often used in large enterprises that need to handle complex queries, high volumes of data, or support for cloud databases. Oracle is more flexible than SQL Server, as it can run on Windows, Linux, and even cloud environments.

Why migrate from SQL Server to Oracle?

Oracle offers better performance in certain cases and more flexibility with its cloud and on-premises options. If you’re looking for better scalability or need advanced features, Oracle might be the right choice for you.

Key Steps to SQL Server to Oracle Migration

Oracle SQL Developer is a free SQL Server to Oracle migration tool that increases your productivity and simplifies database development tasks. With it, you can browse database objects, run SQL statements, edit and debug PL/SQL statements, and run reports (either provided or created). 

How to migrate SQL Server to Oracle?

Step 1. Create the mwrep User

To connect SQL Server and Oracle, you'll need to create a migration user. Here’s how:

1. Open Oracle SQL Developer and navigate to Connections under the View tab. Right-click Connections and select New Connection.

2. Fill in the connection details, using system for the username and your password for the password. Enter for the hostname and orcl for the SID. Click Test to ensure the connection is successful.

3. Once connected, extend the system orcl connection. In the SQL Worksheet, enter the following script to create the migration user.

  • CREATE USER MWREP
  • IDENTIFIED BY mwrep
  • DEFAULT TABLESPACE USERS
  • TEMPORARY TABLESPACE TEMP;
  • GRANT CONNECT, RESOURCE, CREATE SESSION, CREATE VIEW TO MWREP;

4. Run the script by pressing F5. Then, the mwrep user was successfully created.

Step 2. Create the Migration Repository

Before migrating, you need to set up a repository to store migration-related data:

1. In Oracle SQL Developer, right-click your mwrep connection and select New Connection.

2. Fill in the details (Username: mwrep, Password: mwrep, Hostname: , SID: orcl). Test the connection and click Connect.

3. Right-click Connections and select Associate Migration Repository.

Step 3. Capture SQL Server Exported Files

Next, you’ll need to import the exported data from SQL Server to Oracle SQL Developer:

1. In the Migration menu, select Third-Party Database Offline Capture and choose Load Database Capture Script Output.

2. Browse to the Capture directory and locate the Sqlserver2005.ocp file.

3. Expand the captured models and view the SQLServer2005 files.

Step 4. Review Conversion Preferences

To ensure smooth conversion, check the conversion preferences:

1. Go to Tools and select Identifier Options.

2. Ensure that “Is Quoted Identifier On” is selected.

Step 5. Convert to Oracle Model

Once everything is set up, you can convert the SQL Server model to an Oracle-compatible format:

1. Right-click the SQLServer2005 model and select Convert to Oracle Model.

2. Review the data type mappings and click Apply to proceed.

Step 6. Generate and Execute the Script to Create Oracle Database Objects

To create Oracle database objects, follow these steps:

1. Right-click Converted:SQLServer2005 and select Generate.

2. Review the generated SQL script and execute it by pressing F5.

Step 7. Check Offline Data Move Preferences

Ensure your offline data move preferences are correctly set by checking the Data Move Options in the Tools menu.

Step 8. Analysis and Estimation

While migrating from SQL Server to Oracle can be straightforward, manual intervention might be necessary for complex tasks. Estimate the effort by analyzing the Capture Model and reviewing the number and complexity of database objects.

Step 9. Migrate the Data

To migrate your data, run the appropriate commands to load it into the Oracle database. You’ll need to use SQL*Loader for loading large datasets.

Step 10. Test and Deployment

Testing is a crucial part of the migration process. Validate database structures, security, and application functionality to ensure a successful migration.

How to Backup SQL Server and Oracle in Advance

Given that database migration can be a high-risk operation, it's vital to back up both your SQL Server and Oracle databases before and after the migration. This ensures that you can recover any lost or corrupted data if something goes wrong during the process.

One powerful solution for this is AOMEI Cyber Backup, a robust SQL database software that provides comprehensive SQL Server management. With its easy-to-use interface and advanced features, AOMEI Cyber Backup simplifies database backup, disaster recovery, and much more.

Key features of AOMEI Cyber Backup:
User-Friendly: No coding required! The intuitive interface makes setting up SQL backups quick and easy.
LAN Support: Backup SQL databases (including SQL Express) across your local network (LAN) with ease.
Backup Scheduling: Set automatic backup schedules to run at your preferred times.
Centralized Backup: Manage and automate SQL backups from a single, easy-to-use interface.
Wide Compatibility: Supports Microsoft SQL (2005-2022), VMware ESXi (6.0+), and Hyper-V (Windows 8/8.1/10/11, Windows Server, and Microsoft Hyper-V Server 2012 R2 and newer).

With its centralized backup management, AOMEI Cyber Backup is an excellent choice for businesses looking for a streamlined backup solution. Plus, you can test it out for 30 days free!

Download FreewareMicrosoft SQL Server 2005-2022
Centralized and Secure SQL Backup

🤞 Tips for performing the SQL database backup

  • Ensure both AOMEI Cyber Backup Agent and Microsoft SQL Server are installed on your computer.
  • Select a local disk or network share to store your backup files.

How to perform the SQL database backup

Step 1. Add Your Source Device

Access to Source Device > Add Microsoft SQL. If your database exists and is supported, it will automatically appear. If not, click Add Microsoft SQL > Download proxy program > Already installed proxy and select the proxies you want to add.

add-device

Step 2. Authenticate the Database

Click ... > Authentication to verify the database instance. You can use either Windows Authentication or SQL Authentication. Enter the credentials and click Verify.

sql-authentication

Step 3. Create a Backup Task

Click Backup Task > Create New Task to start backing up your SQL databases. 

  • Backup Type: Choose Microsoft SQL Backup. Optionally, you can try
  • Task Name: Give your task a name for easy identification.

task-name

  • Device Name: Select the databases you want to back up.
  • Target: Choose a destination path (local or network) to store the backups.

Step 4. Select Backup Methods and Schedule

Choose your backup method (Full, Incremental, or Differential) and set the schedule (Daily, Weekly, or Monthly). This ensures that your SQL databases are backed up regularly without manual intervention.

schedule-sql-backup

Step 5. Start Backup

You can select to Add the schedule and start backup now or Add the schedule only.

backup-sql-server-database

Conclusion

Using Oracle SQL Developer, you can perform a successful SQL Server to Oracle migration and unlock the full potential of Oracle’s robust database features.

Always ensure proper testing and backups before and after the migration to safeguard against potential issues. AOMEI Cyber​​ Backup is a powerful SQL database software with an easy-to-use interface and advanced features that you can try for free.

Download FreewareMicrosoft SQL Server 2005-2022
Centralized and Secure SQL Backup

FAQs on SQL Server to Oracle Migration

1. What is SQL Server to Oracle migration?

SQL Server to Oracle migration is the process of transferring data, schemas, and database objects from a Microsoft SQL Server database to an Oracle database.

2. How long does SQL Server to Oracle database migration take?

The duration of the migration depends on factors such as database size, complexity, and the level of manual intervention required. Typically, it can take several hours to a few days.

3. Can Oracle SQL Developer automate the entire migration?

Yes, Oracle SQL Developer automates many steps of the migration, such as converting data types, migrating stored procedures, and generating SQL scripts for Oracle.

4. What are the main challenges in SQL Server to Oracle migration?

Some challenges include differences in data types, syntax, and object naming conventions. Manual intervention may be required for certain database objects.

Lori
Lori · Editor
Lori receives professional technical training since joining AOMEI, and aims at helping users troubleshoot problems on data recovery and protection. She focuses on simple, efficient and practical methods, and provides professional advice. Being able to help readers and users is her ultimate goal.