Oracle Database 12c New Features DBA Perspective Sushil … · 2017. 5. 18. · Oracle Database 12c...

41
Oracle Database 12c New Features – DBA Perspective Sushil Motwani – Oracle Solution Architect

Transcript of Oracle Database 12c New Features DBA Perspective Sushil … · 2017. 5. 18. · Oracle Database 12c...

  • Oracle Database 12c New Features – DBA PerspectiveSushil Motwani – Oracle Solution Architect

  • AGENDA

    1. Mission Statements – About Rolta AdvizeX

    2. Multitenant Architecture

    3. Other significant Oracle 12c Features

    4. Questions and Answers

  • Speaker ProfileSushil Motwani – Oracle Pre-Sales Solution Architect – Rolta AdvizeX

    • 24 years of experience as an Oracle Professional, especially on the Database Administration, Apps DBA technologies, Oracle Fusion Middleware Technologies and Business Intelligence Applications.

    • Astute thought leader in Oracle; has published training material for Oracle University, and presented on multiple occasions at events such as Collaborate (Oracle Applications User Group), Oracle Open World, Oracle Health Sciences Conference. Sushil is actively involved with the OAUG and IOUG groups and presented at a number of SIGs (Special Interest Groups) at regional and national levels.

    • Has worked at Oracle's Advanced Customer Services for 6+ years leading some of Oracle’s largest premier customers as a Technical Account Manager, Senior Director at Data Intensity as part of their Application Engineering Team, and at Harvard University as their Oracle and Microsoft SME.

    • Won several awards in the different roles at the organizations that he worked for, both as an Individual Contributor as well as Management positions

  • We enable our clients to achieve their business objectives through our committed professionals utilizing AdvizeX proven technology solutions and methodologies.

    Our passion for technology is guided by our vision of “Customers for Life”.

    We believe that technology is at the heart of maintaining relevance and creating value for our clients, partners, and people.

  • What does AdvizeX do?

    • Define an IT strategy and Cloud Strategy that aligns customers short-term needs with their long-term goals.

    • Drive greater agility and achieve increased profitability.

    • IT Modernization and Dramatic Improvements• Data Center Strategies for IT Efficiency• On Premise and/or Cloud Infrastructure

  • TRUSTED ADVISORS41+ years, 96% customer loyalty

    EXPONENTIAL SOLUTIONSHybrid Cloud, Security, and Data

    LEADING TECH EXPERTS264+ TechnologistsOver 800 certifications

    INTEGRATED SERVICESAdvisory, Consulting and Cloud Managed Services

    LOCAL/GLOBAL OPERATIONS Global company — local support, sales and technology resources

    BROAD CUSTOMER BASE Over 2,700 customers covering, automotive, healthcare, education, utility, financial, government, and retail markets.

  • AdvisoryWe work together to create a unique plan based on your business needs, spell out the costs and the benefits, and map out the best way for you to get there.

    ConsultingWe bring the right people and partners together to solve your business challenges, drawing from our team of 2,500+ IT specialists.

    Cloud Managed ServicesOnce the solution is built, we keep it running 24/7/365 with our global managed services, so you can stay focused on innovation rather than operations.

  • Our value is not in the technology, our value is in our technologists and the solutions they build for you.

  • Multitenant Architecture

  • Pre 12c Oracle Database Challenges

    Several customers have a large number of “departmental” applications on Oracle RDBMS• Very small databases using insignificant amount of

    hardware resources• Due to each database with its own SGA, a large

    number of small databases have to be created for each departmental need

    • Do require significant amount of time to patch or upgrade each one separately

  • Pre 12c Oracle Database Challenges

  • New Multitenant Architecture - Benefits

    • The Oracle Multitenant options allows the DBAs to consolidate large number of small departmental database applications into a single, larger RDBMS installation• Less instance overhead• Less storage cost

    • The consolidated database is called Container Database CDB and the smaller embedded databases are called pluggable databases PDBs

  • New Multitenant Architecture - Benefits

    • Fast provisioning of PDBs• Quick clone from one PDB to another• PDB can be unplugged from one CDB and plugged on another CDB on a

    different platform• A non-CDB can be easily plugged into a CDB to form a new PDB• Upgrade by unplugging from one CDB and attached to a CDB of a

    higher version

    • Multitenant database still maintains:• Separation of duties – one PDB cannot see another PDB• Dictionary separation enabling the Oracle database to manage multiple

    PDBs separate from each other and from the CDB itself

  • Multitenant Architecture – Other Benefits

    • Ensure full backward compatibility with non-CDBs. For e.g. DBA_OBJECTS will be exactly the same in a non-CDB, when moved into a PDB

    • Fully operates in a RAC environment• Allows central management and administration of

    multiple databases• Backups / disaster recovery• Patching and upgrades

  • Oracle 12c Database Configurations

    In Oracle Database 12c, there are three possible configuration options:• Multitenant configuration – Typically more than

    one PDB per CDB, requires license• Single-Tenant configuration – One PDB per CDB, no

    license needed• Non-CDB – Exactly the same as earlier versions of

    Oracle

  • Multitenant Architecture - Overview• Container database has a root

    container, and additional pluggable (in this case 3) databases

    • One user SYS that can manage the root container and every pluggable database

    • Each pluggable database has its own container administrator

    • Each pluggable database has its own set of users and schemas

    • Only one instance sharing set of shared / background processes, memory allocation, one data dictionary in the root container, and each PDB having its own application data dictionary

  • User Data in Oracle 12c Database

    In a non-CDB, as user data is added, the metadata about the user’s data is mixed with the Oracle supplied data in the data dictionary: Object Definations, User Definations, PL/SQL Code and other user-created objects

  • Separating User and SYSTEM User Data

    In Oracle 12c, there is a SYSTEM Tablespace is each container holding a data dictionary:

    • There is a dictionary in the Oracle Metadata – only container that has the metadata for Oracle supplied objects

    • There is a dictionary in the user container holding the user metadata

  • Separating User and SYSTEM User Data

    • In multitenant architecture, each container has a one-to-one relationship with its application

    • The application or user container has access to the Oracle supplied objects by way of pointers , so that objects are not duplicated

    • The user container contains all the pieces it needs to be a complete environment, just as it is in a non-CDB environment

  • Oracle 12c Multitenant – Detailed Architecture

  • Oracle 12c Multitenant – Detailed Architecture

    Diagram shows CDB with 4 containers, the root container CDB$ROOT, the Seed PDB PDB$SEED, and two separate application PDB databases

    • The two applications share a single instance, but are maintained separately

    • The redo logs are common for the whole CDB – All the PDBs in the CDB share the same ARCHIVELOG mode of the CDB

    • The control files are common for the whole CDB

    • The UNDO Tablespace is common for all containers

    • A Mandatory Temporary Tablespace common to all containers is created. Each PDB can hold its own TEMP tablespaces for its application

    • The PDBs have their own set of Tablespaces according to their application

    • Each data file in the database is associated with a specific container, named CON_ID

  • Oracle 12c Multitenant – Summary

    Two types of containers in V$CONTAINERS

    • The root container CDB$ROOT• Mandatory

    • Contains system supplied common objects and metadata

    • Contains system supplied common users and roles

    • Pluggable Databases (PDB) • Seed PDB PDB$SEED – Only one possible per CDB

    • Application specific PDBs• Own set of Tablespaces (permanent and temporary), schemas, objects and privileges

    • Up to 252 PDBs can exist within a CDB not including the Seed PDB

  • Other Oracle Database 12c New Features

  • Active Datafile Rename / Move

    • In earlier releases of Oracle, moving or renaming a datafile, involved several steps, including putting the Tablespace in READ ONLY, followed by datafile offline action.

    • In Oracle 12c, a data file can be renamed or moved online simply using the ALTER DATABASE MOVE DATAFILE SQL statement.

    • The end user can perform queries, DML and DDL tasks during the move.

    • Data files can be migrated between storages e.g. from non-ASM to ASM and vice versa.ALTER DATABASE MOVE DATAFILE '/u00/data/users01.dbf' TO '/u00/data/users_01.dbf';

    ALTER DATABASE MOVE DATAFILE '/u00/data/users_01.dbf' TO '+DG_DATA';

    ALTER DATABASE MOVE DATAFILE '+DG_DATA/DBNAME/DATAFILE/users_01.dbf ' TO '+DG_DATA_02';

    • The progress of the datafile move can be tracked in the Alert.Log or by quering v$session_longops

  • Temporary UNDO

    • Each Oracle database has a SYSTEM, SYSAUX, UNDO and TEMP Tablespace and each has their own individual purpose

    • In earlier Oracle releases, UNDO records generated by temporary tables would use the UNDO tablespace, just like it would for permanent tables.

    • In Oracle 12c, Temporary UNDO records can now be stored in temporary tables under the TEMP tablespace.

    • Reduction in UNDO tablespace usage, thus reduction in redo log generation• Increase in TEMP tablespace usage

    • Enabling Temporary UNDO:• COMPATIBLE parameter needs to be higher than 12.0.0• Set TEMP_UNDO_ENABLED=TRUE at session or system level

    • The following Data Dictionary views can query Temporary UNDO usage: V$TEMPUNDOSTAT, DBA_HIST_UNDOSTAT, V$UNDOSTAT

  • Multiple Indexes on the Same Column

    • In earlier releases of Oracle, multiple indexes on the same column or a set of columns was not possible

    • For e.g. if you have an index on column {a} or columns {a,b}, you can’t create another index on the same column or set of columns in the same order

    • In Oracle 12c, multiple indexes on the same column or set of columns is allowed as long as:

    • The index type is different• Only one index is usable / visible at a given time• To test the invisible indexes, set the parameter

    “optimizer_use_invisible_indexes=true” at session or system level

    SQL> CREATE INDEX emp_ind1 ON EMP(ENO,ENAME);

    SQL> CREATE BITMAP INDEX emp_ind2 ON EMP(ENO,ENAME) INVISIBLE;

  • Invisible Columns

    • In earlier releases of Oracle, to hide a particular column, a view would be created with the required columns to hide information for security reasons.

    • We can delete / drop those views now!! You can have an invisible column in a table now.

    • When a column is defined as invisible, the column won’t appear in generic queries, unless the column is explicitly referred to in the SQL statement or condition.CREATE TABLE emp (eno number(6), ename name varchar2(40), sal number(9) INVISIBLE);

    ALTER TABLE emp MODIFY (sal visible);

    • Explicit invisible column name must be specified with the INSERT statement to insert data into the invisible columns.

    • Temporary tables, external tables and cluster tables do not support invisible columns

  • Restricting PGA Size

    • In earlier releases of Oracle, the parameter PGA_AGGREGATE_TARGET did not limit or control the PGA size

    • If Automatic Memory Management was enabled using MEMORY_TARGET then the PGA_AGGREGATE_TARGET would be the minimum value to allocate to the instance PGA

    • We can now set a limit to the instance PGA with the Parameter: PGA_AGGREGATE_LIMIT

    • Default value: PGA_AGGREGATE_LIMIT is set to the greater of 2 GB, 200% of PGA_AGGREGATE_TARGET, and 3 MB times the PROCESSES parameter

    • Oracle recommends that you do not set PGA_AGGREGATE_LIMIT below its default value. If a value of 0 is specified, it means there is no limit to the aggregate PGA memory consumed by the instance.

    • If PGA_AGGREGATE_LIMIT is exceeded:• Parallel sessions that are using the most untunable memory will have their calls aborted

    followed by the sessions that are using the most untunable memory will be terminated.• SYS processes and background processes other than job queue processes will not be subjected

    to any of the actions described. Instead, if they are using the most untunable memory, they will periodically write a brief summary of their PGA usage to a trace file.

  • Table Partition Maintenance Enhancements

    • Add multiple new partitions with one command instead a separate command per partitionALTER TABLE emp_part ADD PARTITION

    PARTITION p4 VALUES LESS THAN (35000),

    PARTITION p5 VALUES LESS THAN (40000);

    • Split a partition or sub-partition into multiple new partition with one single command:ALTER TABLE emp_part SPLIT PARTITION p_max INTO

    (PARTITION p3 VALUES LESS THAN (25000),

    PARTITION p4 VALUES LESS THAN (30000), PARTITION p_max);

    • Merge multiple partitions into one partition:ALTER TABLE emp_part MERGE PARTITIONS p3,p4,p5 INTO PARTITION p_merge;

    • Drop or truncate multiple partitions with one single command:ALTER TABLE emp_part TRUNCATE PARTITIONS p4,p5 UPDATE GLOBAL INDEXES;

  • Partitioning Enhancements – Online Migration

    • Migration of a table partition or sub-partition to a different tablespace no longer requires a complex procedure in Oracle 12c.

    • A table partition or sub-partition can be moved to a different tablespace online or offline.

    • When an ONLINE clause is specified, all DML operations can be performed without any interruption on the partition/sub-partition which is involved in the procedure.

    • In contrast, no DML operations are allowed if the partition/sub-partition is moved offline. The first example is used to move a table partition|sub-partition to a new tablespace offline. ALTER TABLE table_name MOVE PARTITION|SUBPARTITION partition_name TO tablespace tablespace_name UPDATE INDEXES ONLINE;

    • The example above moves a table partition/sub-partitioning online maintaining any local/global indexes on the table.

    • The UPDATE INDEXES clause will avoid any local/global indexes going unusable on the table.• There will be locking mechanism involved to complete the procedure, also it might leads to

    performance degradation and can generate huge redo, depending upon the size of the partition, sub-partition.

  • In-Memory Oracle Database

    • Oracle Database In-Memory (Database In-Memory) provides the best of both worlds by allowing data to be simultaneously populated in both an in-memory row format (the buffer cache) and a new in-memory column format: a dual-format architecture

    • The in-memory column format should be sized to accommodate the objects that must be stored in memory.

    • In practice, it is expected that the dual-format architecture will impose less than a 20% additional memory overhead. This is a small price to pay for optimal performance at all times for all workloads.

  • In-Memory Oracle Database

    • With Oracle’s unique approach, there remains a single copy of the table on storage, so there are no additional storage costs or synchronization issues.

    • The database maintains full transactional consistency between the row and the column formats, just as it maintains consistency between tables and indexes.

    • The Oracle Optimizer is fully aware of the column format: It automatically routes analytic queries to the column format and OLTP operations to the row format, ensuring outstanding performance and complete data consistency for all workloads without any application changes

  • In-Memory Oracle Database

    • The Database In-Memory (IM) is not enabled if: INMEMORY_SIZE is set to zero!

    • Add space to the SGA_TARGET to accommodate the IM: ALTER SYSTEM SET SGA_TARGET=200G scope=both (SGA_TARGET must be large enough for new IM)

    • ALTER SYSTEM SET INMEMORY_SIZE=100G scope=both

    • The IM Column Store (IM) creates an area in the SGA called In-Memory Area. This is an added memory area in addition to the buffer cache and other SGA areas.

  • We develop comprehensive on-premise and/or cloud infrastructure strategies that specifically work for you.

  • ADVIZEX HYBRID CLOUD

    BUY, CONSUMPTION BASED, LEASE, PAY PER USE

    Financial Options

    ON PREMISE, CO-LOCATION, PUBLIC CLOUD

    Location Flexibility

    ORACLE, HPE, DELL/EMC, MICROSOFT, PALO ALTO

    Top Partnerships

    PLANNING, IMPLEMENTATION, AND MIGRATION

    Consulting Services

    INFRASTRUCTURE, APPLICATION AND DATA

    Cloud Managed Services

    DEEP EXPOSURE TO REAL WORLD PROBLEMS

    Industry Experience

    TECHNOLOGISTS LOCATED IN NORTH AMERICA,

    EUROPE, AND INDIA

    Global Talent

  • Database Practice – Organization Structure

    Database Consulting Services Database Managed Services

    DB Infrastructure

    Oracle FMW

    OS,

    Virtualization

    Security

    Engineered Systems

    Core Database

    Database

    Backup, HA, DR

    Storage

    1099 / Subk Pool

    Middle Ware

    Custom Development

    DB Consulting

    Core DBA

    Oracle

    MS SQL

    MySQL

    Apps DBAShared pool with Managed Services

    SQL Server

    MySQL

    Oracle DBA’s

    Oracle Apps DBA’s

  • Next Generation – Oracle Cloud Offerings

    Consulting Services

    • Cloud migration Assessments using

    both IAAS and PAAS

    • Data Management - Backup to the

    Cloud - PAAS

    • Data Management – Disaster

    Recovery to the Cloud - PAAS

    • DBaaS - Migrate to Cloud | Sandbox

    Oracle Database 12c - PAAS

    • DBaaS - Migrate to Cloud |

    Production Oracle Database 12c -

    PAAS

    • Exadata / ODA as a Service –

    Hybrid Cloud @Customer – On

    Premise IAAS

    Managed Services

    • Cloud Managed Support for:

    o Database on Cloud

    o Exadata Cloud Service

    o Database Backup Cloud

    Service

    o Storage Cloud Service

    o Elastic Compute Cloud Service

  • DATABASE SYSTEMS

    ADVISORY• Data Advizer

    • Strategic Roadmap Services

    • Technology Evaluations and Recommendations

    • Architectural Design and Planning

    • Backup and DR Planning

    • Proof of Concepts (POCs) and Pilots

    • Health Checks and Performance Reviews

    • Best Practices

    • Security Assessments

    CONSULTING• Installation and Configuration

    • High Availability and Clustering

    • Integration

    • Backup and Replication Configuration

    • DR

    • Migrations

    • Upgrades and Patching

    • Performance Tuning and Optimization

    • Security Implementations

    MANAGED SERVICES

    • Oracle

    • Microsoft

    • MySQL

    • SAP HANA

  • DATA MANAGEMENT

    ADVISORY• Information Advizer

    • Technology Evaluations and Roadmaps

    • Data Use Cases

    • Data Ownership assessment

    • Proof of Concepts (POCs) and Pilots

    • Business Process Analysis and Engineering

    • Architectural Designs

    • Health Checks

    • Scalability Assessments

    • Performance Benchmarking

    • Financial Analysis

    • Knowledge Transfer

    CONSULTING• Installation and Configuration

    • Migrations

    • Performance Tuning and Optimization

    • Match Merge, De-duplication, Address Cleansing

    • Process Optimization and Automation

    MANAGED SERVICES

    • ETL Operations

    • Tuning and Optimization

  • WAREHOUSE AND MODELING

    ADVISORY• Data Advizer

    • Data Strategy Roadmap

    • Business Data Requirements Assessment

    • Data Use Cases

    • Data Model Requirements Assessment

    • Data Mode Design

    • Data Modeling Best Practices Review

    • Connectivity and Security Assessments

    • Knowledge Transfer

    CONSULTING• Platform Installation and

    Configuration

    • Data Extraction and Insertion Automation

    • Data Reconciliation Process and Automation

    • Eliminating Performance Bottlenecks

    • Optimizing Warehouse Operations

    • Analyze Statistical Data

    • Design End User Experience

    • Design Schema Objects (Tables, Indexes, and Views)

    • Configure Management Platforms

    MANAGED SERVICES

    • Job and Process Monitoring

    • Monitor the Data and Activities Inside the Data Warehouse

    • Administer the Data Warehousing Platform

    • Oracle Engineered Systems

  • NEXT STEPS