Mysql for Oracle Dbas
Total Page:16
File Type:pdf, Size:1020Kb
MySQL for Oracle DBAs Philipp Michaly Trivadis GmbH Munich @michaly_philipp BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENF HAMBURG KOPENHAGEN LAUSANNE MÜNCHEN STUTTGART WIEN ZÜRICH About me Philipp Michaly . Consultant, Trivadis GmbH, Munich . Since 2010 Oracle DBA . 12 years experience in IT System Engineering . Focus areas - Oracle DB - MySQL 2 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Our company. Trivadis is a market leader in IT consulting, system integration, solution engineering and the provision of IT services focusing on and technologies in Switzerland, Germany, Austria and Denmark. We offer our services in the following strategic business fields: O P E R A T I O N Trivadis Services takes over the interacting operation of your IT systems. 3 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs With over 600 specialists and IT experts in your region. COPENHAGEN 14 Trivadis branches and more than 600 employees HAMBURG 200 Service Level Agreements Over 4,000 training participants Research and development budget: DÜSSELDORF CHF 5.0 million FRANKFURT Financially self-supporting and sustainably profitable STUTTGART Experience from more than 1,900 FREIBURG VIENNA MUNICH projects per year at over 800 BRUGG customers BASEL ZURICH BERN GENEVA LAUSANNE 4 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Agenda 1. Considerations about ODBMS Gartner market Study Why MySQL 2. Introducing MySQL History of MySQL Forks MySQL Architecture MySQL Basics 3. Oracle vs MySQL Licensing Features and Components 4. Integrating MySQL in an Oracle Environment 5 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Considerations about ODBMS – Gartner Study 1/3 “Open-source relational DBMSs have matured significantly and can be used to replace commercial RDBMSs at a considerable TCO saving. Information leaders, DBAs and application development management can now consider them as a standard choice for deploying applications.” The State of Open-Source RDBMSs, 2015 - Gartner 6 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Considerations about ODBMS – Gartner Study 2/3 Gartner Strategic assumptions for 2018: • More than 70% of new in-house applications will be developed on an OSDBMS • 50% of existing commercial RDBMS instances will have been converted or will be in process 7 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Considerations about ODBMS – Gartner Study 3/3 Significant maturity Progress for OSDBMS in the past years: 2009 2015 8 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Considerations about ODBMS – Maturity 2009 9 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Considerations about ODBMS – Maturity 2015 10 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Considerations about ODBMS – Gartner Study 3/3 Significant maturity Progress for OSDBMS in the past years: 2009 2015 11 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Agenda 1. Considerations about ODBMS Gartner market Study Why MySQL 2. Introducing MySQL History of MySQL Forks MySQL Architecture MySQL Basics 3. Oracle vs MySQL Licensing Features and Components 4. Integrating MySQL in an Oracle Environment 12 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Considerations about ODBMS – Why MySQL • MySQL Enterprise Edition • Large set of extra enterprise features • Technical Maturity • Very attractive pricing • Oracle support 24/7 • Customer relationship to oracle can stay intact • Best choice if no opensource community contribution wanted • Transparent and reliable release cycles 13 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Agenda 1. Considerations about ODBMS Gartner market Study Why MySQL 2. Introducing MySQL History of MySQL Forks MySQL Architecture MySQL Basics 3. Oracle vs MySQL Licensing Features and Components 4. Integrating MySQL in an Oracle Environment 14 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Introducing MySQL – History of MySQL 1/4 1994 • MySQL project started by Michael Widenius (Monty), David Axmark and Allan Larsson • For the first 6 years commercially represented by TCX, predecessor of MySQL AB 1997 • Official MySQL 3.1 release • Releases as binary distribution for Linux and Solaris • Based on „matured“ internal kernel from 23th Mai 1995 • Focus on performance and large tables • Stability was not the primary target 15 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Introducing MySQL – History of MySQL 2/4 2000 • MySQL goes Open Source and releases software under a dual license in the terms of the GPL • Foundation and transition to MySQL AB • Revenues dropped 80% as a result, and it took a year to make up for it. • Release of MySQL 3.23 • Introducing InnoDB and Replication 2003 • MySQL 4.0 released 2004 • MySQL 4.1 released 16 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Introducing MySQL – History of MySQL 3/4 2005 • MySQL 5.0 released • Introducing • Views, Triggers, Stored Procedures, User defined Functions • Now supporting all SQL3-Standard Objects • Oracle buys Innobase, the 4-person Finnish company behind MySQL's InnoDB storage backend. 2006 • Oracle tries to buy MySQL and fails • Buys Sleepycat instead • MySQL is estimated to have a 33% market share measured in install base and 0.2% market share measured in revenue (the database market was a $15 billion market in 2006). 17 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Introducing MySQL – History of MySQL 4/4 2008 • MySQL 5.1 released, Features Partitioning • Sun Microsystems acquires MySQL AB for approximately $1 billion. • Michael Widenius (Monty) and David Axmark, two of MySQL AB's co-founders, leave Sun shortly after the acquisition. 2009 • Oracle acquires Sun Microsystems for approximately 7.4 Billion 2010 • MySQL 5.5 released • InnoDB now default storage engine • Performance Schema introduced 18 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Introducing MySQL – The Present 2012 • MySQL 5.6 released • Replication improvements (Multithreaded slaves, Crash-Safe slaves) 2015 – today • MySQL 5.7 released • Security enhancements „secure by default“ • Significant optimizer improvements 19 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Agenda 1. Considerations about ODBMS Gartner market Study Why MySQL 2. Introducing MySQL History of MySQL Forks MySQL Architecture MySQL Basics 3. Oracle vs MySQL Licensing Features and Components 4. Integrating MySQL in an Oracle Environment Sub-chapter 20 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Introducing MySQL – Forks Maria DB • Forked after Oracles aquistion of Sun • More popular in opensource community • Big Players migrating from MySQL to MariaDB Percona Sever • Focus on Performance improvements • Own administration toolkit • Storage engine XtraDB 21 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Agenda 1. Considerations about ODBMS Gartner market Study Why MySQL 2. Introducing MySQL History of MySQL Forks MySQL Architecture MySQL Basics 3. Oracle vs MySQL Licensing Features and Components 4. Integrating MySQL in an Oracle Environment Sub-chapter 22 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs Introducing MySQL – MySQL Architecture DB-Applikation Client MySQL Connection/Thread Manager NoSQL Plugin MySQL Layer 1 StorageSQL- Engines MySQL- DB-Applikation Client Statement Konnektor Server MySQL Layer 1 SQL- MySQLTransaktionsmanagement- AbfrageverarbeitungStatement Konnektor Plugin 1 Recovery ManagementMySQL NoSQL Plugin Connection/Thread Manager Server Parser Query Cache MySQL Query Cache Abfrageverarbeitung Referentielle IntegritätPlugin 1 Layer 2 Buffer Plugin 2 Parser Query Cache MySQL Query Cache MySQL Layer 3Layer 2 IndexBuffer & SpeicherstrukturPlugin 2 Security Security Execution Execution Plugin 3 OptimizerOptimizer Plugin 3 Manager Manager SpeicherverwaltungEngine Engine . Buffer cache . Storage-Engines . Manager Weitere Transaktionsmanagement Plugins . .. Memory Fremdhersteller InnoDB MyISAM Recovery Management Weitere Referentielle Integrität Plugins MySQL Layer 3 Index & Speicherstruktur Speicherverwaltung Buffer cache Manager InnoDB .. Fremdhersteller MyISAM Memory Datafiles Redo,Undo,Logs... Hauptspeicher 23 11/18/2016 Trivadis DOAG 2016: MySQLDatafiles for Oracle DBAsRedo,Undo ,Logs... Hauptspeicher Agenda 1. Considerations about ODBMS Gartner market Study Why MySQL 2. Introducing MySQL History of MySQL Forks MySQL Architecture MySQL Basics 3. Oracle vs MySQL Licensing Features and Components 4. Integrating MySQL in an Oracle Environment 24 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs MySQL Basics – Installing MySQL 1/3 3 possible ways to install MySQL: 1. Package Manager installation (apt, yum, yast,dpkg,rpm…) yum install mysql-commercial-server.x86_64 Pros: • Simplicity of maintenance • Comfortable Patch/Upgrade/Removal maintenance Cons: • Hard coded default locations • Sensitive repository maintenance 25 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs MySQL Basics – Installing MySQL 2/3 2. Pre-built binaries (binary tarballs) tar –xzfbv Archive.tar.gz Pros: • High flexibility • Easier upgrade/downgrade management • Custom locations Cons: • Manage dependency issues manually • A bit more manual work 26 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs MySQL Basics – Installing MySQL 3/3 3. Custom built binaries (Compile your own) cmake --build . Pros: • Maximum freedom to modify mysql Cons: • Requires engineering effort • Release/Patch Maintenance is enormous 27 11/18/2016 Trivadis DOAG 2016: MySQL for Oracle DBAs MySQL Basics – Controlling MySQL with systemd Control MySQL Instance with Systemd: