• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Embracing Database Diversity: The New Oracle / MySQL DBA -   UKOUG
 

Embracing Database Diversity: The New Oracle / MySQL DBA - UKOUG

on

  • 684 views

Classic Oracle DBAs are somewhat starved for the "big overview" knowledge that will make them better decision makers and less hesitant to use MySQL. ...

Classic Oracle DBAs are somewhat starved for the "big overview" knowledge that will make them better decision makers and less hesitant to use MySQL.
The aim is to allow an existing Oracle DBA to get to grips with a MySQL environment, concentrating on the real focus points, and highlighting the similarities of both RDBMS'.
And both worlds provide the necessary tools to avoid a sleepless night.

Statistics

Views

Total Views
684
Views on SlideShare
683
Embed Views
1

Actions

Likes
0
Downloads
16
Comments
0

1 Embed 1

https://www.linkedin.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Embracing Database Diversity: The New Oracle / MySQL DBA -   UKOUG Embracing Database Diversity: The New Oracle / MySQL DBA - UKOUG Presentation Transcript

    • 1 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Embracing Database Diversity: The New Oracle / MySQL DBA Keith Hollman2 MySQL Principal Sales Consultant EMEA Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Safe Harbor Statement The following 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 decision. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.3 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Program Agenda  Today  When is it appropriate to use one or the other.  What assumptions do I have to leave behind?  What assumptions is it safe to bring forward with me?  What is a storage engine and why should I care?  What are the equivalent tools MySQL has for monitoring and backup? What are big differences from Oracle equivalents?  What other tools work with MySQL.  And what about High Availability?  What is Carrier Grade Edition and why do you call it that? When would I use it?  What do I need to know about MySQL security?4 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Today • Classic Oracle DBA’s & MySQL DBA’s. • Wide ranges of Oracle solutions and doubts appear concerning 2 of the most popular databases on the planet. – Main focus points. – Similarities of both RDBMS. • The power of tools – Housekeeping & how to make it easier for all.5 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Overview MySQL Server (mysqld_safe  mysqld) • my.cnf / my.ini: datadir (db dirs, .frm, .MYD, .MYI) / socket / port / user / pid-file. Starting | Stopping: # mysql.server | /etc/init.d/mysql start | stop Accessing: # mysql –uroot –ppassword ([client],[mysql] options in my.cnf) mysql> use sakila; mysql> show tables;7 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • One or the Other…9 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • When is it appropriate to use one or the other. • GPL / Opensource / LAMP stack. • Enterprise Edition • Speed / quick to market vs existing application complexity. – Web-based, SaaS / Cloud, customized apps, embedded. – High-end Enterprise Packaged apps, ERP, HRMS, CRM, etc. • Specific use cases vs “one-size-fits-all”. – Offload certain functionalities for specific use: Web, OLTP, BI, etc. • TCO: Reduced / limited / unknown budget. • Mix: ETL use of both: ODI / GG.10 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • What assumptions is it safe to bring forward with me? • Standard SQL (S/I/U/D, joins, etc.) …… sql_mode=‘ORACLE’ • OLTP VLDB, Replication & HA, memory preferred, IO fine tuning, thread conc. • Buffers & caches, datatypes, statements & functions. • Locks, rollbacks, redo (InnoDB), event logging. • Hot non-blocking backup, Monitoring, Thread pool, Security, other features.. • 1 main configuration / options file. • Data flexibility: Export / Import (5.6 RC transportable tablespaces) • GUI Tools do exist. • Oracle Certified Professional certification path (Dev, DBA, Cluster). • My Oracle Support: 1-Stop for Oracle RDBMS Server & MySQL Server. … & some other “nice things to have” (dummy mode, mysqld_safe, …)11 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • What assumptions do I have to leave behind? • Controlfiles • Localizations: Charset at DB level. • Listener • .. from DUAL; • Replication (X platform) • Commodity Hardware. Scale-out vs • User = Schema scale-up. • Install pre-reqs & go-live time. • Lot’s of ‘tablespaces’. • A Database instance = Database • Table partitioning vs sharding & Tb per table = Application is db-aware. • MySQL Databases to Server instance is n:1 (per sw install) • Certified and/or Supported platforms. • Multiple .ora’s: tnsnames, sqlnet,.. • Technical Comparison.12 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • What is a Storage Engine and why should I care? • Performance, Concurrency, & Locking (careful……). • Processing model. – Upper tier, mysqld parses & optimizes SQL in order to retrieve / store. – Lower tier: Storage Engine dependant. • Transparent to the end user. – Except: Create | Alter table ENGINE option; Index types; commit/rollback. • What IS storage engine dependent: – Storage, transactional, locking, BnR, optimization (data retrieval/storing), special features. • Forks.13 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • What is a Storage Engine and why should I care? Types. • InnoDB (default >5.5.5) – OLTP, Referential Integrity, Row Locking, FullText (5.6), crash recoverable, Multiple Buffers & Caches. • MyISAM (default <5.5.5) – .MYD/.MYI portable files, high compression, FullText & GIS search, Fixed row format for speed, concurrent inserts, writes precede over selects. • MEMORY – fast performance, .frm files on disk, fixed length rows, hash & btree indexes, table contents temporary*, --init-file. • NDB (Cluster) – Specific to Cluster: HA, OLTP, replicas, partitions & fragments, server aware, etc. • CSV, BLACKHOLE, EXAMPLE, ARCHIVE, MERGE/MRG_MYISAM...14 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • What are the equivalent MySQL tools …for monitoring and backup? • CLI: mysql, mysqladmin (..shutdown_timeout..), mysqlcheck(c,r,o,a) mysqldump (backup), mysqlimport, innochecksum, myisam_ftdump, myisamchk, mysqlbinlog, mysqlshow, mysqlhotcopy (MyISAM+unix)… • Oracle Packs != MySQL Enterprise Edition Components / Tools. • Enterprise Monitor – Agent / Server: Query Analyzer / Replication / • Enterprise Backup – mysqlbackup: Any table-type / auto-locking / full, Incremental / Disk, tape / compression / Oracle Secure Backup integration, … • Binlog usage (D&R, Replication, auto-purging, viewing ops on a particular database, etc.)15 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • What other tools work with MySQL. • MySQL Workbench – Server, User & Object administration. – Reverse Engineering of Data models: GUI & Exportable. – Utilities: Migration, Replication admin switch|fail-over (5.6 GTIDs), etc. – Other Admin uses: diskfree, mysqlserverclone, mysqluserclone, mysqldiff... • Oracle VM / Oracle Linux (KSplice) HA deployment, templates, etc. • CLI cont.: mysqlaccess, mysqlbug, mysqlslap, mysqldumpslow, mysql_zap, mysql_convert_table_format, mysql_find_rows, mysql_fix_extensions, ..16 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • What do I need to know about security? # mysql –uroot mysql> grant all on *.* to ‘root’@’192.168.1.1’ identified by ‘password’; • mysql_secure_installation script. • SSL Keys & Certificates parametrization. • Proxy (non GA) • Enterprise Security: PAM & External Authentication. – LDAP integration. • Oracle Secure Backup integration. • MEM Security Advisor17 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • And what about High Availability? Overview • 5 nine’s: 99.999% • Community: – MySQL Replication (async & semi-sync) <> Oracle Replication • Binlogs (Archivelogs), relay log. – MySQL in clustered environments, heartbeats, SAN, etc. • Enterprise – Active–Passive: DRBD & Oracle Linux (pacemaker & corosync) – Shared disk (o.s. cluster or virtualization) – Replication & MySQL Utilities (GTIDs, mysqlrpladmin, switchover) – Enterprise Monitor Replication Advisor. – MySQL Cluster Carrier Grade Edition. Shared nothing.18 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • MySQL Carrier Grade Edition19 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • “I came in contact with every known Indian anarchist in London. Their bravery impressed me, but I felt that their zeal was misguided. I felt that violence was no remedy for Indias ills, and that her civilisation required the use of a different and higher weapon for self-protection.” Mohandas Karamchand Gandhi, Hind Swaraj 1908.20 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • What is Carrier Grade Edition Why do you call it that? When would I use it? • MySQL Cluster Enterprise Edition / “Carrier Grade” extensively used in Telco solutions: HLR, SDP, HSS, AAA, etc. • CGE = MySQL Cluster EE <> MySQL in Cluster • HA measured in “nine’s”: 99.999% • ACID compliant. • Shared nothing / Datanodes, Replica’s, Partitions ‘n’ Fragments. • Self healing. • MySQL Cluster Manager arbitrators. • Online: Please don’t use any NF until all nodes have been upgraded. • Memcached & NDB API • Assign core Cluster component processes to CPU ‘cores’ for speed.21 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Cluster Architecture22 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Cluster Architecture Datanodes, Replicas, Node groups, Fragments… • More?23 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Automatic Data Partitioning Table T1 Data Node 1 ID FirstName LastName Email Phone Px Partition P1 Data Node 2 P2 P3 Data Node 3 P4- A partition is portion of a table Data Node 4- Number of partitions = number of data nodes- Horizontal partitioning 24 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Automatic Data Partitioning Table T1 Data Node 1 ID FirstName LastName Email Phone Px Partition P1 Data Node 2 P2 P3 Data Node 3 P4A fragment is a copy of a partition Data Node 4Number of fragments = # of partitions * # of replicas 25 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Automatic Data Partitioning 4 Partitions * 2 Replicas = 8 Fragments Table T1 Data Node 1 ID FirstName LastName Email Phone Px Partition P1 Data Node 2 P2 P3 Data Node 3 P4A fragment is a copy of a partition Data Node 4Number of fragments = # of partitions * # of replicas 26 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Automatic Data Partitioning 4 Partitions * 2 Replicas = 8 Fragments Table T1 Data Node 1 F1ID FirstName LastName Email Phone Px Partition P1 Data Node 2 P2 P3 Data Node 3 P4 Fx Primary Fragment Data Node 4 Fx Secondary Fragment 27 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Automatic Data Partitioning 4 Partitions * 2 Replicas = 8 Fragments Table T1 Data Node 1 F1ID FirstName LastName Email Phone Px Partition P1 Data Node 2 P2 F1 P3 Data Node 3 P4 Fx Primary Fragment Data Node 4 Fx Secondary Fragment 28 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Automatic Data Partitioning 4 Partitions * 2 Replicas = 8 Fragments Table T1 Data Node 1 F1ID FirstName LastName Email Phone Px Partition P1 Data Node 2 P2 F3 F1 P3 Data Node 3 P4 Fx Primary Fragment Data Node 4 Fx Secondary Fragment 29 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Automatic Data Partitioning 4 Partitions * 2 Replicas = 8 Fragments Table T1 Data Node 1 F1 F3ID FirstName LastName Email Phone Px Partition P1 Data Node 2 P2 F3 F1 P3 Data Node 3 P4 Fx Primary Fragment Data Node 4 Fx Secondary Fragment 30 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Automatic Data Partitioning 4 Partitions * 2 Replicas = 8 Fragments Table T1 Data Node 1 F1 F3ID FirstName LastName Email Phone Px Partition P1 Data Node 2 P2 F3 F1 P3 Data Node 3 P4 F2 Fx Primary Fragment Data Node 4 Fx Secondary Fragment 31 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Automatic Data Partitioning 4 Partitions * 2 Replicas = 8 Fragments Table T1 Data Node 1 F1 F3ID FirstName LastName Email Phone Px Partition P1 Data Node 2 P2 F3 F1 P3 Data Node 3 P4 F2 Fx Primary Fragment Data Node 4 F2 Fx Secondary Fragment 32 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Automatic Data Partitioning 4 Partitions * 2 Replicas = 8 Fragments Table T1 Data Node 1 F1 F3ID FirstName LastName Email Phone Px Partition P1 Data Node 2 P2 F3 F1 P3 Data Node 3 P4 F2 Fx Primary Fragment Data Node 4 F4 F2 Fx Secondary Fragment 33 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Automatic Data Partitioning 4 Partitions * 2 Replicas = 8 Fragments Table T1 Data Node 1 F1 F3ID FirstName LastName Email Phone Px Partition P1 Data Node 2 P2 F3 F1 P3 Data Node 3 P4 F2 F4 Fx Primary Fragment Data Node 4 F4 F2 Fx Secondary Fragment 34 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Automatic Data Partitioning 4 Partitions * 2 Replicas = 8 Fragments Table T1 Data Node 1 F1 F3ID FirstName LastName Email Phone Px Partition P1 Node Group 1 Data Node 2 P2 F3 F1 P3 Data Node 3 P4 F2 F4 Fx Primary Fragment Data Node 4 F4 F2 Fx Secondary Fragment 35 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Automatic Data Partitioning 4 Partitions * 2 Replicas = 8 Fragments Table T1 Data Node 1 F1 F3 ID FirstName LastName Email Phone Px Partition P1 Node Group 1 Data Node 2 P2 F3 F1 P3 Data Node 3 P4 F2 F4 Node Group 2 Fx Primary Fragment Data Node 4- Node groups are created automatically- # of groups = # of data nodes / # of replicas F4 F2 Fx Secondary Fragment 36 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Automatic Data Partitioning 4 Partitions * 2 Replicas = 8 Fragments Table T1 Data Node 1 F1 F3 ID FirstName LastName Email Phone Px Partition P1 Node Group 1 Data Node 2 P2 F3 F1 P3 Data Node 3 P4 F2 F4 Node Group 2 Fx Primary Fragment Data Node 4As long as one data node in each node group F4 F2is running we have a complete copy of the Fx Secondary Fragmentdata 37 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Automatic Data Partitioning 4 Partitions * 2 Replicas = 8 Fragments Table T1 Data Node 1 F1 F3 ID FirstName LastName Email Phone Px Partition P1 Node Group 1 Data Node 2 P2 F3 F1 P3 Data Node 3 P4 F2 F4 Node Group 2 Fx Primary Fragment Data Node 4As long as one data node in each node group F4 F2is running we have a complete copy of the Fx Secondary Fragmentdata 38 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Automatic Data Partitioning 4 Partitions * 2 Replicas = 8 Fragments Table T1 Data Node 1 F1 F3 ID FirstName LastName Email Phone Px Partition P1 Node Group 1 Data Node 2 P2 F3 F1 P3 Data Node 3 P4 F2 F4 Node Group 2 Fx Primary Fragment Data Node 4As long as one data node in each node group F4 F2is running we have a complete copy of the Fx Secondary Fragmentdata 39 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Automatic Data Partitioning 4 Partitions * 2 Replicas = 8 Fragments Table T1 Data Node 1 F1 F3 ID FirstName LastName Email Phone Px Partition P1 Node Group 1 Data Node 2 P2 F3 F1 P3 Data Node 3 P4 F2 F4 Node Group 2 Fx Primary Fragment Data Node 4- No complete copy of the data F4 F2- Cluster shutdowns Fx Secondary Fragmentautomatically 40 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Key Concepts • Partition – Horizontal partitioning – A portion of a table, each partition contains a set of rows – Number of partitions = number of data nodes • Fragment – A copy of a partition • Replica – A complete copy of the data • Node Group – Created automatically – # of groups = # of data nodes / # of replicas – As long as there is one data node in each node group we have a complete copy of the data41 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Questions? keith.hollman@oracle.com42 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • My turn to ask… • Do you always need a storage • Why would we use the engine. MEMORY storage engine. • What is a schema. • How could we simulate table • How could I ‘pretend’ to use an snapshots. Oracle type db. • Other than Cluster, what HA • What’s the equivalent of an solutions are there. archivelog. • What’s the difference between • Is MySQL open-source. Community & Enterprise.43 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • Learn More • mysql.com - MySQL Products and Editions - TCO calculator - Customer use cases and success stories • dev.mysql.com - Downloads, Documentation - Forums - PlanetMySQL • eDelivery.oracle.com - Download and evaluate all MySQL products44 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 45 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.
    • 46 Copyright © 2012, Oracle and/or its affiliates. All rights reserved.