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 decisions. The development, release, and timing of any features or functionality described for Oracle s products remains at the sole discretion of Oracle. Copyright 2014 Oracle and/or its affiliates. All rights reserved. Oracle Confidential Internal 2
Oracle Database12c Best Practices in Migrating Applications to an Oracle Multitenant Database Sean Stacey Director PTS, Server Technologies Database Product Management
Release Roadmap Today 2025 2024 2023 2022 2021 2020 2019 2018 2017 2016 2015 2014 2013 2012 2011 2010 2009 2008 2007 Oracle 11.1 (GA: Aug 2007) AUG 2012 AUG 2015 Oracle 11.2 (GA: Sep 2009) JAN 2015 JAN 2018 Oracle 12.1 (GA: Jun 2013) JUN 2018 JUN 2021 Premier Support Waived Extended Extended Support Sustaining Support Oracle Database 12c Release 2 Targeted for Release 1HCY2016 (MyOracle Support Note 742060.1 ) 1
Non-CDB Architecture Deprecation http://docs.oracle.com/database/121/dblic/editions.htm#dblic116 2
Licensing the Multitenant Option http://docs.oracle.com/database/121/dblic/editions.htm#dblic116 3
Continuous Oracle Database Innovations Preserving customer s investment though each new Computing Era Client-Server Stored Procedures Partitioning Parallel Query Unstructured Data Internet Resource Management Real Application Clusters Data Guard XML Big Data & Cloud Exadata Multitenant In-Memory JSON
Journey to Database as a Service Silos Standardized Consolidated Cloud Complex Simple Efficient Agile
Consolidation Density Database Consolidation on Clouds Traditional consolidation methods Virtual Machines Dedicated Databases Schema Consolidation Share Servers Share Servers & OS Share Servers, OS, & Database 6
Consolidation Density Oracle Multitenant High consolidation density, transparent to existing applications Virtual Machines Dedicated Databases Pluggable Databases Share Servers Share Servers & OS Share Servers, OS, & Database 7
New Multitenant Architecture Memory and processes required at container level only System Resources GL OE AP GL OE AP 8
Oracle Database Architecture More efficient utilization of system resources System Resources GL OE AP 9
Pluggable versus Separate Databases Highly Efficient: 6x Less H/W Resource, 5x more Scalable OLTP benchmark comparison Only 3GB of memory vs. 20GB memory used for 50 databases Pluggable databases scaled to over 250 while separate database instances maxed at 50 Public 10
Oracle Multitenant on SuperCluster T5-8 Consolidation Tests of PDBs vs. non-cdbs Performance (Total Throughput) 252 PDBs vs. non-cdbs Number of supported Databases (same Throughput per Database) 80% higher aggregate throughput tps 140,000 120,000 100,000 80,000 60,000 40,000 20,000 0 SIDBs PDBs databases 300 250 200 150 100 50 0 SIDBs PDBs 50% more databases consolidated Memory Footprint per Database (not including Buffer Cache) Number of Cores required to support 252 Databases Storage IOPS required to support 252 Databases 2000 MB 1500 1000 500 0 SIDBs PDBs cores 200 150 100 50 0 SIDBs PDBs IOPS 400000 350000 300000 250000 200000 150000 100000 50000 0 SIDBs PDBs 8x reduction in memory footprint 64 fewer cores needed 3x reduction in storage IOPS
Multitenant Improves Consolidation Density Tests comparing 252 single instance and pluggable databases Throughput (TPS) Memory Utilized (MBs) 140000 1800 120000 100000 1600 1400 1200 80000 1000 60000 800 40000 20000 600 400 200 0 SIDB PDB 0 SIDB PDB
Managing Shared Resources Resource management in a multitenant environment GL OE AP High Priority Medium Priority Low Priority 13
Database as a Service Patching & Upgrades Apply changes once, all pluggable databases updated GL OE AP 12.X 12.1 12.X 12.1 12.X 12.1 Upgrade in-place 14
Database as a Service Patching & Upgrades Flexible choice when patching & upgrading databases GL OE AP GL OE Original Container Database 12.1 Upgraded Container Database 12.x 15
Manage Many Databases as One Backup databases as one; recover at pluggable database Level GL OE AP One Backup Point-in-time recovery at pluggable database level Public 16
Database as a Service on the Cloud Development and deployment agility Development On Premise Development in the Cloud 17
Database as a Service for Development Fast Provisioning, Snapshot Clones Original PDB Clone of PDB Snapshot Clone of PDB 25 20 Time Taken to Provision New Database 15 10 5 Development Container 0 Non CDB PDB Clone PDB using Copy-on- Write File System 18
Traditional File System Full copy duplicates all data blocks my_file my_file_copy File is collection of data blocks And headers Copy duplicates header & data blocks Effective & simple, but expensive! cp my_file my_file_copy
Copy-on-Write Basics Much more efficient storage of substantially similar files my_file File is collection of data blocks And headers Copy file requires only copy of header Much more efficient storage Minimal IO to create copy my_file_copy cp my_file my_file_copy
Copy-on-Write Basics Much more efficient storage of substantially similar files my_file File is collection of data blocks And headers Copy file requires only copy of header Much more efficient storage Minimal IO to create copy Copy block only when change needed my_file_copy cp my_file my_file_copy
Multitenant for Software as a Service Multitenancy implemented by the Database, not the Application Customer 1 Customer 2 Customer 3 Customer 4 Customer 5 Customer 6 Customer 7 22
Oracle Multitenant for Database as a Service Different service levels for different requirements Mission Critical GOLD RAC, Data Guard Production SILVER RAC Test and Development BRONZE Backups 23
Lessons Learned from Application Validations 1 2 3 4 5 Oracle Multitenant Database Restrictions Upgrading and Patching Application considerations when Connecting to Pluggable databases Sharing data across multiple Pluggable Databases Security considerations and Common users 24
Lessons Learned from Application Validations 1 2 3 4 5 Oracle Multitenant Database Restrictions Upgrading and Patching Application considerations when Connecting to Pluggable Databases Sharing data across multiple Pluggable Databases Security considerations and Common users 25
Lessons Learned from Application Validations 1 Oracle Multitenant Database Restrictions http://docs.oracle.com/database/121/readm/chapter12102.htm#babghdgb 26
Lessons Learned from Application Validations 2 Upgrading and Patching Upgrading to Multitenant 1. Upgrade to 12c non-cdb 2. Startup the 12c non-cdb in read only mode 3. Exec procedure dbms_pdb.describe() to generate manifest 4. Backup the manifest (.xml) and data files together 5. On the CDB, using the manifest, exec function dbms_pdb.check_plug_compatibility() 6. In CDB$ROOT query pdb_plug_in_violations view for ERRORS and/or WARNINGs 7. Using the manifest, execute Create pluggable database. using <manifest file path >. - No copy or copy of storage 8. Run noncdb_to_pdb.sql in the new PDB Follow Upgrade Documentation! run preupgrd.sql Run describe and check violations Open the pdb with the ` open upgrade ` flag Applying Patches Now use catctl.pl NOT catalog.sql Upgrade multiple PDBs simultaneously Schema Consolidation Migrations Use PDB Subset Cloning for converting non- CDB multi schemas to separate PDBs Create pluggable database USER_TABLESPACES clause
Lessons Learned from Application Validations 3 Connectivity Implications Use Services Default service in single instance Managed service in RAC USE_SID_AS_SERVICE_listenername=ON Only for legacy SID connect strings Opportunity to identify laggards Set TWO_TASK for legacy management scripts Update these scripts ASAP Connectivity Implications Client Authentication Start using the SQL Easy Connect syntax: scott@//hostname:1521/pdb1 jdbc:oracle:thin:@//hostname:1521/pdb1 For OS Authentication use the new parameter: common_user_prefix SQLNET.ALLOWED_LOGON_VERSION_CLIENT Avoid ORA-28040: No matching authentication Check protocol client library versions for 12c compatibility Specifically for third party applications Third party monitoring tools
Lessons Learned from Application Validations 3 Connectivity Implications Connection Pools Use an Oracle Connection Pool UCP, Active GridLink in WLS Release Connections as soon as possible in to the pool Don t leave connections checked out for too long. Do not Oversize the Pool Degrades performance Size 10 to 20 times the number of cores Use setminpoolsize() and setmaxpoolsize() Use connection labeling in UCP to map a tenant with a PDB 29
Lessons Learned from Application Validations 4 Sharing Data Between Pluggable Databases Data can be shared between multiple Pluggable Databases by the use of External tables DDL operations can be performed across multiple PDBs in parallel by using: catcon.pl -c to include Container -C to exclude Container Querying across multiple PDBs- Database links can be used for accessing the data between PDBs Can span across different CDBs In Database 12.1.0.2 there is a new CONTAINERS clause: SQL> SELECT ename FROM CONTAINERS(scott.emp) WHERE CON_ID IN (5, 8, 12) ; jj 30
Lessons Learned from Application Validations 5 Security Implications and Common Users Define and Generalize your common user local user policies Define the role separation between local and common users Avoid GRANT session to common user globally New PDBs plugged in inherit common user Enforce local grant session to the common user Standardize on common user prefix and suffix Avoids plug in violations if the common user is unknown to the CDB Use the common user to lock down accounts across PDBs Do not create objects in the common users schema Do not change privileges on Oracle supplied common users Grant the privilege within the targeted PDBs Validate impact of common users prior to unplug/plug operations conflicts are not captured in PDB compatibility checks
Lessons Learned from Application Validations 5 Security Implications and Common Users Implement Security features where appropriate Consolidate PDBs of common security features Use Oracle Security products Fully integrated with Multitenant DB Vault, Label Security, TDE, Masking, Redaction Implement Security features with post clone trigger Follow Standard Oracle Security Best Practices to minimize exposure to vulnerabilities Monitor database role and privilege usage Privilege Analysis DBMS_PRIVILEGE_CAPTURE Use the 12c Unified Auditing Simplify the privilege model Leverage the separation of duties SYSBACKUP, SYSDG, SYSKM
Database as a Service on the Cloud Development and deployment agility Development in the Cloud Development On Premise 1
Oracle Multitenant New Oracle Database architecture for the Cloud Virtualize the database into PDBs ERP CRM DW Applications run unchanged Lower OPEX Manage many as one Patch, upgrade, backup, standby Granular control when appropriate Easy to provision, move, clone Complementary to VMs Lower CAPEX More databases per server Shared memory and background processes 2
Achieve Database as a Service Today With a Two-Prong approach New Project 1 Stand up DBaaS platform today to show immediate value for new projects 2 In parallel, consolidate/optimize with long term goal to move to strategic DBaaS Silos Standardized Consolidated Cloud
Partners who support Oracle Multitenant today
Oracle Technology Network Multitenant Community Page: http://www.oracle.com/technetwork/database/multitenant/overview/index.html
6