phone icon nav Call Us 888-690-3282    Follow Us
phone icon nav Call Us 888-690-3282    Follow Us

From Oracle to SQL Server: A Guide for Migrating Large Databases

The Challenge

The client desired to migrate a 3 TB Oracle database to SQL Server. Both databases are on-prem. The migration required communication with other project leads and teams working on refactoring an enterprise-class application. Downtime had to be less than 30 hours.

Migrating a 3 TB Oracle database to SQL Server while ensuring minimal downtime and effective communication with project leads and teams presents several challenges.

Let’s explore some of these challenges:

  1. Data Volume and Size:

    • Handling a 3 TB database involves significant data movement. Efficiently transferring such a large volume of data can strain network bandwidth and impact overall performance during migration.
  1. Downtime Constraints:

    • Because the customer is changing database vendors and didn’t want to spend money on expensive tools; meeting the requirement of less than 30 hours of downtime is challenging. Coordinating the migration process, including backup, data transfer, schema conversion, and testing, within this tight timeframe requires careful planning.
  1. Schema and Data Type Mapping:

    • Oracle and SQL Server have different data types, functions, and syntax. Mapping Oracle-specific features to their SQL Server equivalents can be complex. Ensuring data integrity and compatibility during conversion is crucial.
  1. Application Dependencies:

    • Applications relying on the Oracle database may need adjustments to work seamlessly with SQL Server. Identifying and addressing dependencies (stored procedures, triggers, views, etc.) is essential.
  1. Performance Optimization:

    • SQL Server may require tuning to match the performance of the Oracle database. To achieve optimal performance, query optimization, indexing, and configuration adjustments were necessary.
  1. Security and Authentication:

    • Migrating user accounts, roles, and permissions from Oracle to SQL Server while maintaining security standards can be intricate. Ensuring proper authentication mechanisms is crucial.
  1. Testing and Validation:

    • Rigorous testing is essential to verify data consistency, application functionality, and performance after migration. This includes validating business logic, stored procedures, and data integrity.
  1. Communication and Coordination:

    • Coordinating with project leads, teams, and stakeholders is critical. Clear communication ensures everyone knows the migration schedule, potential disruptions, and fallback plans.
  1. Backup and Rollback Strategy:

    • Having a robust backup strategy is essential. In case of unexpected issues during migration, a rollback plan should be in place to revert to the original state.
  1. Monitoring and Troubleshooting:

    • Monitoring the migration process in real-time helps identify bottlenecks, errors, or performance issues. Having troubleshooting procedures ready ensures timely resolution.

Remember that each migration scenario is unique, and addressing these challenges requires a well-defined plan, collaboration, and expertise. Leveraging tools like SQL Server Migration Assistant for Oracle (SSMA) can simplify the process and provide guidance. Performance One Data Solutions provided experienced database administrators and migration specialists to ensure a successful transition.

The Solution

Performance One Data Solutions used Microsoft’s SQL Server Migration Assistant tool to perform much of the heavy lifting. Because the downtime requirement for this amount of data is short, we utilized filters on the largest tables and only populated the delta during the final cutover.

Migrating a 3 TB Oracle database to SQL Server using Microsoft’s SQL Server Migration Assistant (SSMA) is a smart approach. Let’s break down the further:

  1. SQL Server Migration Assistant (SSMA):

    • SSMA is a powerful tool designed to simplify database migrations from various platforms (including Oracle) to SQL Server. It automates schema conversion, data migration, and application code adjustments.
    • Key features of SSMA include:
      • Schema Conversion: SSMA analyzes the Oracle schema and converts it to SQL Server-compatible schema objects (tables, views, indexes, etc.).
      • Data Migration: SSMA transfers data from Oracle to SQL Server, ensuring data integrity and consistency.
      • Code Conversion: SSMA identifies Oracle-specific code (such as PL/SQL) and suggests SQL Server equivalents.
      • Compatibility Assessment: SSMA provides insights into potential issues during migration.
      • Automated Migration: SSMA automates many tasks, reducing manual effort.
    • By leveraging SSMA, you’re offloading much of the heavy lifting involved in the migration process.
  1. Downtime Considerations:

    • Minimizing downtime is crucial. With a 3 TB database, every minute counts.
    • To achieve this, you applied filters to the largest tables. Here’s how it works:
      • Filtering: Identify tables with the most data (e.g., historical logs, audit trails) that don’t need to be fully migrated immediately.
      • Delta Population: During the final cutover, migrate only the delta (changes since the initial data load). This significantly reduces downtime.
      • Incremental Approach: By applying filters and migrating incrementally, you keep the database operational while minimizing the impact on users.
  1. Communication and Coordination:

    • Coordinating with project leads and teams is essential. Ensure everyone knows the migration schedule, fallback plans, and potential disruptions.
    • Regular updates and clear communication help manage expectations and address any issues promptly.
  1. Testing and Validation:

    • Rigorous testing is critical. Verify data consistency, application functionality, and performance after migration.
    • Test scenarios include:
      • Data Validation: Compare data between Oracle and SQL Server.
      • Application Testing: Validate application behavior against the new database.
      • Performance Testing: Assess query performance and optimize as needed.
  1. Backup and Rollback Strategy:

    • Maintain a robust backup strategy. Regularly back up the Oracle database during the migration process.
    • Have a rollback plan in case unexpected issues arise. Be prepared to revert to the original state if necessary.

Remember that successful migrations involve collaboration, expertise, and thorough planning. You’re on the right track by utilizing SSMA and implementing intelligent strategies like filtering and delta population!

The Results

Migrating a 3 TB Oracle database to SQL Server Enterprise Edition is a significant undertaking, but with careful planning and execution, it can be successful.

Let’s explore the results of this migration:

  1. Data Integrity and Consistency:

    • During the migration, data integrity was a top priority. The successful transfer of 3 TB of data from Oracle to SQL Server ensures that the information remains accurate and consistent.
  1. Schema Conversion:

    • The Oracle schema was meticulously converted to SQL Server-compatible schema objects (tables, views, indexes, etc.). This process involved mapping data types, functions, and syntax to their SQL Server equivalents.
  1. Application Compatibility:

    • Applications relying on the Oracle database were thoroughly tested against the new SQL Server environment. Any necessary adjustments were made to ensure seamless functionality.
  1. Performance Optimization:

    • SQL Server Enterprise Edition offers advanced performance features. These were leveraged to optimize query execution, indexing, and overall database performance.
    • Features like In-Memory OLTPColumnstore Indexes, and Partitioning were explored to enhance performance.
  1. High Availability and Scalability:

    • SQL Server Enterprise Edition provides robust features for high availability and scalability. These were configured to meet customer requirements.
    • AlwaysOn Availability Groups or Database Mirroring were set up to ensure minimal downtime and failover capabilities.
  1. Security Enhancements:

    • SQL Server Enterprise Edition includes advanced security features. These were employed to protect sensitive data.
    • Transparent Data Encryption (TDE) and Row-Level Security were implemented as needed.
  1. Backup and Recovery Strategy:

    • A comprehensive backup strategy was established. Regular backups ensured data protection and facilitated recovery in case of any issues.
    • Full BackupsDifferential Backups, and Transaction Log Backups were scheduled appropriately.
  1. Monitoring and Alerts:

    • Quest’s Foglight monitoring tools were configured to track database performance, resource utilization, and potential bottlenecks.
    • Alerts were set up to notify administrators of any critical events.
  1. Documentation and Knowledge Transfer:

    • Detailed documentation was created, covering the migration process, configurations, and best practices.
    • Knowledge transfer sessions were conducted with the operations team to ensure they could manage the new environment effectively.
  1. Validation and User Acceptance Testing (UAT):

    • Rigorous testing was performed after the migration.
    • UAT involved end-users validating application functionality, data accuracy, and performance.

In summary, the successful migration achieved the following:

  • Minimal Downtime: Despite the large database size, downtime was kept within acceptable limits.
  • Scalability: SQL Server Enterprise Edition allows for future growth.
  • Improved Performance: Leveraging SQL Server features enhanced query execution.
  • Security and Compliance: Sensitive data remained secure.

Remember that each migration is unique, and thorough planning, testing, and collaboration are essential for success.

Background

A large automotive plant operator has been using a custom application framework to build an application integral to their operations. Originally built using JDK8 and JBoss4 against an Oracle database, the application received periodic updates, with the last major update in 2020/2021. In 2024, the client and Performance One Data Solutions, a division of Ross Group Inc., embarked on a joint effort to upgrade the technology stack to enhance performance, security, and maintainability.

Objectives

The primary goals of the project were:

  1. Upgrade the Custom Application Framework from JDK8 to JDK21.
  2. Upgrade the jQuery integration to release 3.7.1.
  3. Upgrade the application to run on Wildfly 30 from Wildfly 11.
  4. Migrate the database backend from Oracle 12 to Microsoft SQL Server 2020.

Challenges and Solutions

Framework and Database Migration:

  • Challenge: The application framework was vetted against Microsoft SQL Server but was not deployed in a major application.
  • Solution: Performance One refactored the framework to conform to Java 9+ standards and regression-tested it against Microsoft SQL Server 2020.

Application Refactoring:

  • Challenge: Refactoring the client application to compile and run using the new tech stack.
  • Solution: Performance One took a copy of the client application and refactored it to compile and launch using JDK21, Wildfly 30, and Microsoft SQL Server.

Data Migration:

  • Challenge: Migrating data from Oracle to Microsoft SQL Server.
  • Solution: Performance One provided migrated data and created installation scripts to upgrade the client’s Microsoft SQL Server.

Report Conversion:

  • Challenge: Converting BIRT and Crystal reports against Microsoft SQL Server.
  • Solution: Performance One converted the reports and ensured they worked with Microsoft SQL Server.

Project Timeline

Initial Milestones:

    1. Complete Framework upgrade to JDK21/Wildfly 30.
    2. Provide migrated data from Oracle to Microsoft SQL Server.
    3. Regression test the application framework against Microsoft SQL Server 2020.
    4. Refactor the client’s application to compile and launch using the new tech stack.
    5. Create installation data script for Microsoft SQL Server compliance.
    6. Regression test the application installation processes.
    7. Make recommendations for unused application features.
    8. Validate and upgrade application code.

Additional Tasks

  • Database Procedures Conversion: Performance One converted the client’s database procedures, functions, and views to Microsoft SQL Server.
  • Report Migrations: Ongoing conversion of BIRT and Crystal report development.
  • Application Enhancements: Upgrading client’s application screens for jQuery 3.7.1, file attachment uploads, and integration with scanner devices using web sockets.
  • Server Maintenance: Wildfly server maintenance, release builds, and deployment handling, with a transition plan for client resources post-go-live.

Conclusion

Performance One Data Solutions partnered with the client to upgrade the technology stack, ensuring improved performance and maintainability. The collaboration between Performance One and the client team demonstrated effective problem-solving and adaptability, setting a strong foundation for future upgrades and enhancements.

Contact-Us

Let's Talk

Use our expertise to propel your business to the next level.