$30 off During Our Annual Pro Sale. View Details »

Best Practices for Migrating your workloads to Azure PostgreSQL and MySQL | Data Platform Summit 2020 | Arun Kumar Thiagarajan & Sunil Agarwal

Best Practices for Migrating your workloads to Azure PostgreSQL and MySQL | Data Platform Summit 2020 | Arun Kumar Thiagarajan & Sunil Agarwal

For open source relational database workloads, customers are increasingly adopting Azure Database for MySQL and Azure Database for PostgreSQL to take advantage of a fully managed database service technical teams innovate faster. In this session, we will cover the best practices to migrate existing MySQL/PostgreSQL/Oracle workloads to Azure PaaS. We will also dive deeper into various migration tools available for offline (one-time migrations and online (ongoing replication) migrations with a live demo of a MySQL to Azure DB for MySQL online migration.

Azure Database for PostgreSQL

December 03, 2020
Tweet

More Decks by Azure Database for PostgreSQL

Other Decks in Technology

Transcript

  1. Best Practices for Migrating your
    workloads to Azure PostgreSQL
    and MySQL
    Arun Kumar Thiagarajan
    Principal Program Manager
    Microsoft
    Sunil Agarwal
    Principal PM Manager
    Microsoft

    View Slide

  2. Agenda
    • Why Migrate to Azure Cloud
    • Migrate to Azure Database for MySQL
    • Migrate to Azure Database for PostgreSQL
    • Migrate Oracle to Azure Database for PostgreSQL

    View Slide

  3. WHY MIGRATE TO

    View Slide

  4. Rich feature set
    Proven resilience
    & stability
    Open source
    Azure is the best place to run your Open-Source
    Relational Databases

    View Slide

  5. Azure is the best place to run your Open-Source
    Relational Databases
    Rich feature set
    Proven resilience
    & stability
    Open source
    Fully
    managed
    Highly
    scalable
    Security &
    Compliance
    Intelligent
    performance

    View Slide

  6. Rich feature set
    Proven resilience
    & stability
    Open source
    Fully
    managed
    Highly
    scalable
    Security &
    Compliance
    Intelligent
    performance
    Azure is the best place to run your Open-Source
    Relational Databases

    View Slide

  7. Azure is the best place to run your Open-Source
    Relational Databases
    Available on Microsoft Azure
    Rich feature set
    Proven resilience
    & stability
    Open source
    Fully
    managed
    Highly
    scalable
    Security &
    Compliance
    Intelligent
    performance

    View Slide

  8. MIGRATING TO A ZURE CLOUD
    Data Center/hardware
    Upgrades
    Backup/HADR
    Security
    Monitoring/Troubleshooting
    Managing at scale
    Application Scaling
    Data Center/hardware
    Upgrades
    Backup/HADR
    Security
    Monitoring/Troubleshooting
    Managing at scale
    Application Scaling
    Data Center/hardware
    Upgrades
    Backup/HADR
    Security
    Monitoring/Troubleshooting
    Managing at scale
    Application Scaling
    Data Center/hardware
    Upgrades
    Backup/HADR
    Security
    Monitoring/Troubleshooting
    Managing at scale
    Application Scaling

    View Slide

  9. Migration Types: Homogeneous and Heterogeneous
    Homogeneous Migration
    – PostgreSQL (On-premises/IaaS) à Azure PostgreSQL (PaaS)
    – PostgreSQL (AWS/GCP) à Azure PostgreSQL (PaaS)
    – MySQL (On-premises/IaaS) à Azure MySQL (PaaS)
    – MySQL (AWS/GCP) à Azure MySQL (PaaS)
    Heterogeneous Migration
    – Oracle to Azure PostgreSQL (PaaS)

    View Slide

  10. Why Migrate from Oracle to Azure PostgreSQL?

    View Slide

  11. SHOW IT TO ME!

    View Slide

  12. Pre-migration
    Discover Assess
    Migrating to OSS databases on Azure
    Migrate
    Schema

    View Slide

  13. Migration
    Pre-migration
    Discover Assess Migrate
    Schema
    Migrating to OSS databases on Azure
    Dump & restore –
    offline

    View Slide

  14. Migration
    Pre-migration
    Discover Assess Migrate
    Schema
    Migrating to OSS databases on Azure
    Dump & restore –
    offline
    Native logical
    replication – online
    OR

    View Slide

  15. Migration
    Pre-migration
    Discover Assess Migrate
    Schema
    Migrating to OSS databases on Azure
    Dump & restore –
    offline
    Native logical
    replication – online
    Azure Database
    Migration Service –
    online
    OR
    OR

    View Slide

  16. Migration
    Pre-migration
    Discover Assess Migrate
    Schema
    Migrating to OSS databases on Azure
    Dump & restore –
    offline
    Native logical
    replication – online
    Azure Database
    Migration Service –
    online
    OR
    OR
    Post-migration
    Remediate
    applications
    Optimize
    Run functional
    & performance
    tests

    View Slide

  17. Azure Database Migration Service
    On-premises
    Migration
    Azure Database
    Migration Service
    Microsoft Azure

    View Slide

  18. MIGRATING TO AZURE
    DATABASE FOR MYSQL

    View Slide

  19. MySQL to MySQL migration options
    Discover and
    assess
    Connect to
    Azure with
    your favorite
    tool
    Migrate schema
    and data
    Azure Database
    Migration
    Service
    DMS
    Continuous
    Sync

    View Slide

  20. MySQL to MySQL migration options
    Discover and
    assess
    Connect to
    Azure with
    your favorite
    tool
    Migrate schema
    and data
    Azure Database
    Migration
    Service
    DMS
    Continuous
    Sync
    X
    Remediate
    apps
    Optimize
    Test

    View Slide

  21. MySQL to MySQL migration options
    Discover and
    assess
    Connect to
    Azure with
    your favorite
    tool
    Migrate schema
    and data
    Azure Database
    Migration
    Service
    DMS
    Continuous
    Sync
    X
    Remediate
    apps
    Optimize
    Test
    Data-in
    replication

    View Slide

  22. MySQL to MySQL migration options
    Discover and
    assess
    Connect to
    Azure with
    your favorite
    tool
    Migrate schema
    and data
    Azure Database
    Migration
    Service
    Dump and
    restore
    DMS
    Continuous
    Sync
    X
    Remediate
    apps
    Optimize
    Test
    Data-in
    replication
    Azure Data Factory
    can also be used

    View Slide

  23. The MySQL Migration Guide Has Landed!
    Application &
    DB experts
    Migration
    Framework
    Community
    and in-house
    tools
    Pre-migration Migration
    Post-
    migration
    Planning/assessments
    DB storage/code object migrations
    Data migrations (Offline vs. online)
    Experts to
    engage?
    Checklists? Tools?
    + +
    ENABLING SUCCESSFUL MIGRATIONS
    MYSQL MIGRATION GUIDE
    • Scenario-based learning approach with
    labs deployable via ARM templates
    • Assessment/planning approaches
    • Migration best practices
    • Testing and validation best practices
    • Post-migration to-dos for success
    GitHub Link

    View Slide

  24. DEMO: MIGRATING AN RDS
    FOR MYSQL DB TO AZURE
    DATABASE FOR MYSQL

    View Slide

  25. MIGRATING TO AZURE
    DATABASE FOR POSTGRESQL

    View Slide

  26. PostgreSQL to PostgreSQL migration options
    Discover and
    assess
    Connect to
    Azure with
    your favorite
    tool
    Migrate schema
    and data
    Azure Database
    Migration
    Service
    DMS
    Continuous
    Sync

    View Slide

  27. PostgreSQL to PostgreSQL migration options
    Discover and
    assess
    Connect to
    Azure with
    your favorite
    tool
    Migrate schema
    and data
    Azure Database
    Migration
    Service
    DMS
    Continuous
    Sync
    X
    Remediate
    apps
    Optimize
    Test

    View Slide

  28. PostgreSQL to PostgreSQL migration options
    Discover and
    assess
    Connect to
    Azure with
    your favorite
    tool
    Migrate schema
    and data
    Azure Database
    Migration
    Service
    Logical
    replication*
    DMS
    Continuous
    Sync
    X
    Remediate
    apps
    Optimize
    Test
    *Only for migrations into flexible server

    View Slide

  29. PostgreSQL to PostgreSQL migration options
    Discover and
    assess
    Connect to
    Azure with
    your favorite
    tool
    Migrate schema
    and data
    Azure Database
    Migration
    Service
    Logical
    replication*
    Dump and
    restore
    DMS
    Continuous
    Sync
    X
    Remediate
    apps
    Optimize
    Test
    *Only for migrations into flexible server
    Azure Data Factory
    can also be used

    View Slide

  30. DEMO: MIGRATING A POSTGRESQL
    DB TO AZURE DB FOR POSTGRESQL

    View Slide

  31. MIGRATING FROM ORACLE
    TO AZURE DATABASE FOR
    POSTGRESQL

    View Slide

  32. Oracle to PostgreSQL - Migration Journey Map
    EVALUATE DISCOVER
    ASSESS &
    PLAN
    CONVERT
    VALIDATE &
    TEST
    CONVERSION
    MIGRATE
    VALIDATE
    DATA & TEST
    FULL STACK
    CUTOVER &
    OPERATE

    View Slide

  33. Oracle to PostgreSQL migration process
    1. Pre-migration 2. Data Migration 3. Optimize, cutover and operate
    Pre-migration + Migration + Post-Migration made easy
    https://datamigration.microsoft.com/
    Discover Convert
    Assess
    • Discover
    • Evaluate
    • Assess
    • Plan
    • Convert
    • Test conversion
    Azure
    DMS
    Initial bulk load
    Change replication
    Remediate
    applications
    Iteratively make any
    necessary changes
    to your applications
    Run functional &
    performance tests
    Iteratively run
    functional and
    performance tests
    Optimize
    Based on the tests you
    performed, address any
    performance issues, and
    then retest to confirm the
    performance improvements
    App
    • Set up migration infrastructure
    • Set up migration
    • Replicate ongoing changes
    • Cutover and test

    View Slide

  34. Oracle to PostgreSQL Migration Guide
    • Oracle conversion best practices in one place
    • Topic-by-topic overview of how each feature in Oracle maps to PostgreSQL.
    • 300+ pages of details showing –
    § General compatibility level of an Oracle feature in PostgreSQL
    § Ora2pg automation capability
    § Summary of differences with code snippets explaining the feature
    § Comparison of how the feature will work in PostgreSQL 11 vs. 12 vs. 13
    EXAMPLES:
    NOTE: Users spend ~50% of the time in the entire
    migration project on converting Oracle DB objects
    and embedded SQL in apps to PostgreSQL!

    View Slide

  35. aka.ms/postgresql
    [email protected] [email protected]
    aka.ms/postgres-cloud9
    aka.ms/mysql
    aka.ms/postgres-flexible-blog
    aka.ms/mysql-flexible-blog
    aka.ms/mysql-tenthline

    View Slide

  36. Three Ways to Win Prizes
    Post your selfie with hash tag #DPS2020
    Give Session & Conference Feedback
    Visit our Sponsors & Exhibitors
    Thank You
    Follow us on Twitter @TheDataGeeks @DataAISummit

    View Slide

  37. Data Platform Virtual Summit 2020 is a community initiative by DataPlatformGeeks
    RESOURCES

    View Slide

  38. Go Deeper Into Postgres & Hyperscale (Citus)
    • https://www.citusdata.com/
    • http://docs.citusdata.com/en/v9.5/
    Why Scale Out Postgres?
    https://youtu.be/g3H4nGsJsl0
    DEMO - High performance HTAP
    with Postgres & Hyperscale (Citus)
    https://youtu.be/W_3e07nGFxY
    DEMO – Building HTAP
    Applications with Python &
    Postgres on
    Azurehttps://youtu.be/YDT8_riLLs0

    View Slide

  39. Special Thanks To
    for supporting
    DataPlatformGeeks & SQLServerGeeks
    Community Initiatives

    View Slide

  40. DELETE BEFORE PUBLISHING

    View Slide

  41. Why Migrate from Oracle to Azure PostgreSQL?
    Key Drivers
    PostgreSQL enterprise grade database
    – OLTP (On-Line Transaction Processing), Geospatial, Analytical, Federated hub
    – LAPP Stack (Linux, Apache, PostgreSQL, PHP, Python and Perl)
    – Rich capabilities: Multi-Version Concurrency Control (MVCC), asynchronous replication, nested transactions,
    online backups, a refined query planner/optimizer
    – I18N enabled. Supports international character sets, multi-byte character encodings, Unicode, and it is
    locale-aware for sorting
    – And more
    High compatibility between PL/SQL and PL/PGSQL (typically 80%+). Lowers the risk
    – Migrate Oracle PL/SQL stored procedures, queries, datatypes, packages, sequences etc. to PostgreSQL with
    little or no code changes
    – Although incompatibilities exist, experts say migrating from Oracle to PostgreSQL is no costlier than
    upgrading from one major version of Oracle to the next major version of Oracle
    TCO (1/5th cost)
    Open-Source Platform. Freedom to migrate to any public cloud
    Rich Azure Ecosystem

    View Slide

  42. A P P L I C AT I O N M O D E R N I Z AT I O N J O U R N E Y - S A A S
    • sdfr

    View Slide