Sunteți pe pagina 1din 50

Migrating to MySQL Made Simple

Sastry Vedantam
sastry.vedantam@oracle.com

Nick Mader
nick.mader@oracle.com

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


Safe Harbor Statement
The preceding is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.

2
MySQL is Everywhere

MULTIPLE PLATFORMS MULTIPLE LANGUAGES

C C++C#
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
MySQL – Cross-PlaIorm Flexibility
• Support for 20+ PlaIorms
• No Lock-in
• Develop/Test on X, release on LAMP, SAMP, WAMP etc.
• OEM/ISVs Embedding MySQL Ship into More Markets and
Provide more Flexibility to End Users

Broad Language Support

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


MySQL Cloud Service Offering

Simple
Quickly provision MySQL database instances with
only a few clicks
Automated
MySQL Enterprise Edition
Database management made easy with tools that
automate administrative tasks
+ Integrated
Integrated with Oracle Cloud Services for quick
development and deployment
Enterprise Ready
Oracle’s proven MySQL Enterprise Edition for
performance, security & uptime

5
InnoDB Cluster
App Servers with
MySQL Router
“High Availability becomes a core
first class feature of MySQL!”
MySQL Shell
Setup, Manage,
Orchestrate

MySQL Group Replication

6
JSON Functions
MySQL 5.7 and 8.0

JSON_ARRAY_APPEND() JSON_MERGE[_PRESERVE]() JSON_PRETTY()


JSON_ARRAY_INSERT() JSON_OBJECT() JSON_STORAGE_SIZE()
JSON_ARRAY() JSON_QUOTE() JSON_STORAGE_FREE()
JSON_CONTAINS_PATH() JSON_REMOVE() JSON_ARRAYAGG()
JSON_CONTAINS() JSON_REPLACE() JSON_OBJECTAGG()
JSON_DEPTH() JSON_SEARCH() JSON_MERGE_PATCH()
JSON_EXTRACT() JSON_SET() JSON_TABLE() *labs
JSON_INSERT() JSON_TYPE()
JSON_KEYS() JSON_UNQUOTE()
JSON_LENGTH() JSON_VALID()

7
MySQL Document Store - Components

MySQL Shell
MySQL Connectors
X Plugin
X Protocol X DevAPI
MySQL Server

InnoDB Cluster
8
MySQL Document Store
X Protocol

JavaScript / Python X DevAPI 33060


X Plugin
MySQL Shell MySQL
MySQL Router MySQL Server
InnoDB
MySQL Connector/Node.js X DevAPI cluster
MySQL Router
Node.js Application

33060 33060
MySQL Connector/Net X DevAPI X Plugin X Plugin
Windows Application
MySQL Server MySQL Server
...
9
MySQL Connectors

Developed by Oracle Community


• Connector/ODBC ODBC • PHP
• Connector/Net ADO.NET • Perl
• Connector/J JDBC • Python
• Connector/C C API • Ruby
• Connector/C++ C++ API
• and more …

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


Hardware: The Perfect MySQL
Server
• CPU
 MySQL 5.7 scales up to 48 cores
• Memory
 Normally more is better
 InnoDB buffer pool need to hold “hot data”
• Network
 At least 2 x NICs for redundancy
• For replication
 Servers should be identical

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


Hardware: The Perfect MySQL
Server
• Disk subsystem (options next slide)
 Fast HD (if possible SSD)
 More disks are often better! – 4x recommended, more spindles increase IO
 RAID 10 best, RAID 5 ‘maybe OK’ if very read intensive
 Separate random and sequential IO (logs and table spaces)
 Top performance:
 SAN + BBWC
 Fusion-IO cards

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


Hardware: Disk system
• Hardware RAID battery backed up cache is critical!
• Use LVM on Linux (Snapshots)
• Own disk/partition for mysql data
 Location of data- and logfiles on different spindles?
• EXT4 and XFS good choice for Linux
 mounting “noatime” an option?
 mounting “nobarrier” an option?
 Blocksize?

• Check settings & partitions for Windows as well!


 HKLM\System\CurrentControlSet\Control\FileSystem\ is
NIsDisableLastAccessUpdate

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


Migrating to MySQL
• Importing data to MySQL
– mysqlimport
– LOAD DATA INFILE
– Read DML into mysql client using source command
• Complete tools for migrating data and objects
– MySQL Workbench
– SQLWays (from partner Ispirer)

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


MySQL Workbench Overview
MySQL Database IDE
Millions of Users
Millions of Downloads
Windows, OS X, Linux
Workbench – Easy Data Migration
• Easy Migration
– Microsoft SQL Server
– PostgreSQL
– Sybase ASE
– Sybase SQL Anywhere
– SQLite, MS Access u. a.

• Normally based on ODBC

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


Workbench – Easy Data Migration
Migration project management
allows migrations to be configured, copied, edited, executed and scheduled.

Source and Target selection


allows users to define specific data sources and to analyze source data in advance
of the migration.

Object migration
allows users to select objects to migrate, assign source to target mappings where
needed, edit migration scripts and create the target schema.

Data migration
allows users to map source and target data and data types, set up data transfer and
assign post data transfer events where needed.

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


Workbench – Easy Data Migration

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


MySQL Architecture Comparison (Example)
Area MySQL Microsoft SQL Server
Memory Caches • InnoDB data cache • Buffer cache
• InnoDB log cache • SQL cache
• MyISAM key cache • Misc caches (lock, connection,
• Dictionary cache workspace, etc.)
• Query Cache
• User caches
Redo/Undo Logs • InnoDB Undo Space • TempDB (2005+)
• InnoDB Logs • Transaction Logs
• Binary Log
Data Storage • Tablespaces • Filegroups
• Table/Index Files • Files
• Format files
Optimizer • Cost-based • Cost-based

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


MySQL Core Feature Set Comparison (Example)
Feature MySQL Microsoft
Standard Heap Tables and B-Tree Indexes  
Partitioned Tables/Indexes  
ACID Transaction Support  
Row-Level Locking, MVCC (readers don’t block writers)  
Server-Enforced Referential Integrity  
Advanced Indexing (Clustered, Full-Text)  
Robust datatype support (BLOB’s, varchar, datetime, numerics, etc.)  

Replication  
Stored Procedures, Triggers, Functions, Cursors, Updateable Views  
Highly-Available Clustered Database  
Cost-based Optimizer  
Online Backup with Point-in-Time Recovery  
Terabyte Database Size Capable  
Open Source 

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


Ticketmaster Company Overview
Ticketmaster and Live Nation merged to create Live
Nation Entertainment. the world's leading live
entertainment company selling tickets to millions of fans.

Application
By migrating from Microsoft SQL Server to MySQL and
Oracle, Ticketmaster.com improved scalability by 4X.

Why MySQL and Oracle?


“At Ticketmaster, we use MySQL and Oracle to
complement each other. The end result is a highly-
distributed, optimal-performing database environment
that powers one of the largest e-commerce and
ticketing sites in the world.” Ed Presz, Vice President,
Database Services, Ticketmaster/Live Nation
Entertainment, Inc.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
CUSTOMER PERSPECTIVE
“Telenor has been using MySQL for fixed IP
COMPANY OVERVIEW management since 2003 and are extremely
• Leading telecoms provider across Europe and Asia. Largest satisfied with its speed, availability and
Nordic provider flexibility. Now we also support mobile
• 184m subscribers (Q2, 2010) and LTE IP management with our solution.
Telenor has found MySQL Cluster to be
the best performing database in the world
CHALLENGES / OPPORTUNITIES for our applications.”
• Extend OSS & BSS plaIorms for new mobile services and
evolution to LTE - Peter Eriksson, Manager, Network Provisioning
• OSS: IP Management & AAA
RESULTS
• BSS: Subscriber Data Management & Customer Support
• Launch new services with no downtime, due to on-line
operations of MySQL Cluster
SOLUTIONS • Consolidated database supports Subscriber Data Management
initiatives
• MySQL Cluster
• MySQL Cluster selected due to 99.999% availability, real time
• MySQL Server performance and linear scalability on commodity hardware
• MySQL Support Services

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


Gina Tricot Company Overview
Swedish fashion chain with over 180 stores, and selling
online in 28 countries.

Application
Cloud-based e-commerce application powered by
MySQL Enterprise Edition (initially built on Community
Edition).

Why MySQL Enterprise Edition?


"MySQL Enterprise Edition enables us to expand and
grow online sales in both existing and new countries
while maintaining a low TCO. It is a high performance,
scalable and easy to monitor database; we’re extremely
pleased with it." Nicklas Griphem, Manager Server &
Infrastructure, Gina Tricot

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


Steps to migrate from SQL Server to MySQL

McKinsey Global Institute

Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Third Party tools -

Features:
• Tables and Data
 Converts columns definitions - data types, default
values, NOT NULL constraints, identity properties
 Converts integrity constraints - primary and foreign
keys, unique and check constraints
 Converts comments
 Resolves reserved words and identifiers conflicts
 Transfers data (including TEXT and IMAGE data types)
• Indexes, Views and Logins
• T/SQL Stored Procedures, Functions and Triggers

Besides SQL Server T/SQL server-side business logic,


SQLWays also converts SQL queries in front-end applications
and scripts to conform with MySQL SQL syntax.
SQLWays is capable of converting SQL Server T/SQL
procedural code to Java and .NET.

McKinsey Global Institute

Copyright 2013, Oracle and/or its affiliates. All rights reserved.


Getting Started
MySQL Workbench
• http://www.mysql.com/products/workbench/migrate/
• http://www.mysql.com/why-mysql/white-papers/guide-to-migrating-from-sql-server-to-mysql/

MySQL Migrations
• https://www.mysql.com/why-mysql/white-papers/guide-to-workbench-migration-wizard/
• http://www.ispirer.com/products/mysql-migration

MySQL Case Studies


• http://www.mysql.com/customers/view/?id=684
• http://www.mysql.com/customers/view/?id=1143

Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |


MySQL Partner Training
• Review MySQL GLP’s on OPN CC
and complete assessments to
become MySQL Certified Specialist:
– Sales GLP
– MySQL CS lesson added
• https://competencycenter.oracle.com/opncc
/full_glp.cc?group_id=13624
– Pre-Sales GLP
– MySQL CS lesson added
• https://competencycenter.oracle.com/opncc
/full_glp.cc?group_id=13644

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |


Join the Partner Community: oracle.com/cloudconnection
OPN Cloud Business Builder: oracle.com/partners/goto/cloud
OPN Cloud Program: oracle.com/partners/goto/cloud-program
MySQL Cloud Service: cloud.oracle.com/mysql

Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Oracle Confidential – Authorized Partner Internal Use Only 49
Thank You!

Copyright © 2014, Oracle and/or its affiliates. All rights reserved.

S-ar putea să vă placă și