copyright © 2013, oracle and/or its affiliates. all rights ... oracle database 11g ... oracle...

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

Upload: ngohanh

Post on 27-May-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

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

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

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. Release timing for

Oracle Database 12c is planned for Calendar Year 2013.

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

Oracle Database 12c Overview

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

Major Database Focus Areas

ENGINEERED

SYSTEMS

BIG

DATA

SOCIAL

BLOG

SMART

METER

101100101001

001001101010

101011100101

010100100101

CLOUD

COMPUTING

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

Private Database Cloud Architectures Using Oracle Database 11g

Dedicated Databases

share servers and OS

Virtual Machines

share servers

Schema Consolidation

share servers, OS and database

Increasing Consolidation

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

Private Database Cloud Architectures Using Oracle Database 12c

Dedicated Databases

share servers and OS

Virtual Machines

share servers

Pluggable Databases

share servers, OS and database

Increasing Consolidation

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

Isolation and multitenancy

Fast provisioning and cloning

Secure and highly available

No application changes

Manage many as one

Greater resource utilization

Performant and scalable

Lower IT costs

Consolidating Databases on Clouds Key requirements…

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

Oracle Database Architecture Requires memory, processes and database files

System Resources

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

New Multitenant Architecture Memory and processes required at container level only

System Resources

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

New Multitenant Architecture Memory and processes required at container level only

System Resources

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

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

Pluggable vs Separate Databases Highly Efficient: 6x Less H/W Resource, 5x more Scalable

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

Consolidating Databases Step1: Upgrade databases in-place

Upgrade in Place

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

Consolidating Databases Step2: Plug-in upgraded databases

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

Managing Shared Resources Resource management for consolidated databases

High Priority

Medium Priority

Low Priority

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

Expand Cluster to Support Flexible Consolidation Model

Services

Single SGA per

CDB Instance

Improved Agility With Changing Workloads

Node1

CDB Instance 1

Node2

CDB Instance 2

Multitenant Container Database (CDB)

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

Services

Single SGA per

CDB Instance

Expand Cluster to Support Flexible Consolidation Model

Node1

CDB Instance 1

Node2

CDB Instance 2

Node3

CDB Instance 3

Improved Agility With Changing Workloads

Multitenant Container Database (CDB)

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

Simplified Patching Apply changes once, all pluggable databases updated

Upgrade

in-place

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

Simplified Upgrades Flexible choice when patching & upgrading databases

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

Manage Many Databases as One Backup databases as one; recover at pluggable database Level

One Backup

Point-in-time recovery

at pluggable database level

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

Manage Many Databases as One One standby database covers all pluggable databases

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

GOLD

SILVER

BRONZE

RAC, Data Guard, Daily Incrementals

Data Guard, Daily Incrementals

Weekly Full Backups

Managing Database Service Level Tiers Change tiers as databases become more mission critical

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

Fast Provisioning Pluggable databases can be quickly provisioned from seed

0

5

10

15

20

25

Non CDB PDB Clone PDB usingCopy-on-Write File

System

Time Taken to Provision New Database

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

Creating Databases for Test and Development Fast, flexible copy and snapshot of pluggable databases

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

Isolation and multitenancy

Fast provisioning and cloning

Secure and highly available

No application changes

Manage many as one

Greater resource utilization

Performant and scalable

Lower IT costs

New Multitenant Architecture Ideal for consolidating databases on Clouds

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

Heat Map

Smart Compression

Automated Tiering

In Database Archiving

Network Compression

Automatic Data Optimization Optimize data storage based on usage

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

Automatic Data Optimization

An in memory heat map tracks access to segments and

blocks

– Data is periodically written to disk

– Information is accessible by views or stored procedures

Uses can attach policies to tables to compress or tier data

based on access to data

– Tables or Partitions can be moved between compression levels

whilst data is still being accessed

Simplifying the life cycle of data

Po licy 1

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

Automatic Data Optimization Add compression and tiering policies to tables

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

Oldest Data Most Recent Data

Po licy 1

Po licy 2

Compress Partitions with

row compression

if they haven’t been modified in

30 days

Compress Partitions with

columnar compression if they

haven’t been modified in 180

days

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

Automatic Data Optimization A heat map tracks the activity of segments and blocks

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

Oldest Data Most Recent Data

Po licy 1

Po licy 2

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

Automatic Data Optimization Policies are automatically applied to tables

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

Oldest Data Most Recent Data

Po licy 1

Po licy 2

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

Automatic Data Optimization Policies are automatically applied to tables

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

Oldest Data Most Recent Data

Po licy 1

Po licy 2

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

Automatic Data Optimization Policies are automatically applied to tables

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

Oldest Data Most Recent Data

Po licy 1

Po licy 2

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

Automatic Data Optimization Reduce storage footprint, read compressed data faster

Copyright © 2012, Oracle and/or its affiliates. All rights reserved. Confidential – Oracle Restricted 32

Oldest Data Most Recent Data

Po licy 1

Po licy 2

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

Automatic Data Optimization Automatically tier data to lower cost storage

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

Oldest Data Most Recent Data

Po licy 1

Po licy 2

Po licy 3

If the tablespace is nearly full

compress the oldest partition

with archive compression and

move it to Tier 2 Storage

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

Data Guard Far Sync

Data Guard Fast Sync

Global Data Services

Active Data Guard Reporting Enhancements

Flex ASM

Rolling Upgrade using Data Guard

Application Continuity

High Availability Active Replicas

GoldenGate Integrated Capture

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

Maximum Availability Architecture

Active Data Guard – Data Protection, DR

– Query Offload

GoldenGate – Active-active

– Heterogeneous

RMAN, Oracle Secure Backup – Backup to tape / cloud

Active Replica

Edition-based Redefinition,

Online Redefinition, Data Guard, GoldenGate – Minimal downtime maintenance, upgrades, migrations

RAC – Scalability

– Server HA

Flashback – Human error

correction

Production Site Application Continuity – Application HA

Global Data Services – Service Failover / Load Balancing

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

Data Guard Far Sync Standby between continents with zero data loss

Primary Standby

Far Sync

Instance (Active)

Far Sync

Instance (Idle)

New York

Bridgeport

Reading

London

sync

async

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

Data Masking at Source

Privilege Analysis

Integrated Audit Framework

Data Redaction

Database Vault Mandatory Realms

Sensitive Data Discovery

Security Defense in Depth

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

Complete Data Security Protecting data at the source

Applications

SQL Monitoring & Blocking

Masking

Privileged user access

Encryption

Data Discovery Compliance Scan Vulnerability Scan

Activity auditing

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

Soc. Sec. # 115-69-3428

DOB 11/06/71

PIN 5623

Policy enforced redaction of sensitive data

Redacting Sensitive Data Mask Application Data Dynamically

Call Center

Operator

Payroll

Processing

Call Centers

Decision Support Systems

Systems with PII, PHI, PCI data

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

Privilege Analysis Reduce Attack Surface

Report on actual privileges and roles used in the database

Revoke unnecessary privileges and roles as needed

Help enforce least privilege and reduce risks

Privilege

Analysis

Create …

Select …

Update …

DBA role

APPADMIN role

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

Automatic Data Optimization

Data Redaction

Data Masking

Sandboxes

Adaptive Query Plans

Temporal

Pattern Matching

Partition Maintenance Enhancements

Data Warehousing & Big Data Enabling Data Scientists

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

Simplified Analysis of Big Data Pattern Matching

Select * from

Ticker MATCH_RECOGNIZE (

PATTERN(X+ Y+ W+ Z+)

DEFINE X AS (price < PREV(price)),

Y AS (price > PREV(price)),

W AS (price < PREV(price)),

Z AS (price > PREV(price)

)

Scalable discovery of business event

sequences

– Clickstream logs: sessionization, search

behaviour

– Financial transactions: fraud detection, double

bottom (“W”) stock analysis

– Telco: dropped calls

– Medical sensors: automated medical

observations and detections

Ascendin

g O

rder

“W” event defined

as regular expression

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

package pigstuff;

import java.io.IOException;

import java.util.ArrayList;

import java.util.Iterator;

import org.apache.pig.EvalFunc;

import org.apache.pig.PigException;

import org.apache.pig.backend.executionengine.ExecException;

import org.apache.pig.data.BagFactory;

import org.apache.pig.data.DataBag;

import org.apache.pig.data.DataType;

import org.apache.pig.data.Tuple;

import org.apache.pig.data.TupleFactory;

import org.apache.pig.impl.logicalLayer.FrontendException;

import org.apache.pig.impl.logicalLayer.schema.Schema;

/**

*

* @author nbayliss

*/

public class W_FINDER extends EvalFunc<Tuple> {

private class V0Line {

String state = null;

String[] attributes;

String prev = "";

String next = "";

public V0Line(String[] atts) {

attributes = atts;

}

public String[] getAttributes() {

return attributes;

}

public void setState(String state) {

this.state = state;

}

public String getQuantity() {

return this.attributes[4];

}

public String setState(V0Line linePrev, V0Line lineNext) {

String q = this.getQuantity();

if (linePrev == null) {

prev = "";

} else {

prev = linePrev.getQuantity();

}

if (lineNext == null) {

next = "";

} else {

next = lineNext.getQuantity();

}

if (!q.isEmpty() && (prev.isEmpty() || (eq(q, prev) && gt(q, next)))) {

state = "S";

return state;

}

if (gt(q, prev) && gt(q, next)) {

state = "T";

return state;

}

if (lt(q, prev) && lt(q, next)) {

state = "B";

return state;

}

if (!q.isEmpty() && (next.isEmpty() || (gt(q, prev) && eq(q, next)))) {

state = "E";

return state;

}

if (q.isEmpty() || eq(q, prev)) {

state = "F";

return state;

}

return state;

}

private boolean eq(String a, String b) {

if (a.isEmpty() || b.isEmpty()) {

return false;

}

return a.equals(b);

}

private boolean gt(String a, String b) {

if (a.isEmpty() || b.isEmpty()) {

return false;

}

return Double.parseDouble(a) > Double.parseDouble(b);

}

private boolean lt(String a, String b) {

if (a.isEmpty() || b.isEmpty()) {

return false;

}

return Double.parseDouble(a) < Double.parseDouble(b);

}

public String getState() {

return this.state;

}

}

BagFactory bagFactory = BagFactory.getInstance();

@Override

public Tuple exec(Tuple input) throws IOException {

long c = 0;

String line = "";

String pbkey = "";

V0Line nextLine;

V0Line thisLine;

V0Line processLine;

V0Line evalLine = null;

V0Line prevLine;

boolean noMoreValues = false;

String matchList = "";

ArrayList<V0Line> lineFifo = new ArrayList<V0Line>();

boolean finished = false;

DataBag output = bagFactory.newDefaultBag();

if (input == null) {

return null;

}

if (input.size() == 0) {

return null;

}

Object o = input.get(0);

if (o == null) {

return null;

}

//Object o = input.get(0);

if (!(o instanceof DataBag)) {

int errCode = 2114;

String msg = "Expected input to be DataBag, but"

+ " got " + o.getClass().getName();

throw new ExecException(msg, errCode, PigException.BUG);

}

DataBag bag = (DataBag) o;

Iterator<Tuple> valueIt = bag.iterator();

while (!finished) {

if (valueIt.hasNext()) {

Tuple nextTuple = valueIt.next();

line = nextTuple.get(0).toString();

String ordk = nextTuple.get(1).toString();

String part = nextTuple.get(2).toString();

String supp = nextTuple.get(3).toString();

String q = nextTuple.get(4).toString();

String ship = nextTuple.get(5).toString();

pbkey = nextTuple.get(6).toString();

thisLine = new V0Line(new String[]{line, ordk, part, supp, q, ship, pbkey});

if (lineFifo.isEmpty()) {

thisLine.setState("S");

} /*else {

if (!lineFifo.get(0).getGroup().equals(thisLine.getGroup())) {

thisLine.setState("S");

}

} */

lineFifo.add(0, thisLine);

if (!valueIt.hasNext()) {

noMoreValues = true;

thisLine.setState("E");

}

} else {

thisLine = null;

}

String evalState = null;

if (lineFifo.size() == 3) {

processLine = lineFifo.get(1);

if (processLine.getState() == null) {

prevLine = lineFifo.get(0);

nextLine = lineFifo.get(2);

processLine.setState(prevLine, nextLine);

}

evalLine = lineFifo.remove(2);

evalState = evalLine.getState();

} else {

if (noMoreValues) {

evalLine = lineFifo.remove(lineFifo.size() - 1);

evalState = evalLine.getState();

}

}

if (evalState != null) {

matchList += evalState;

if (matchList.length() > 5) {

matchList = matchList.substring(1);

}

if (matchList.equals("SBTBE")

|| matchList.equals("TBTBE")

|| matchList.equals("SBTBT")

|| matchList.equals("TBTBT")) {

//String[] atts = evalLine.getAttributes();

c++;

}

}

if (lineFifo.isEmpty()) {

finished = true;

}

}

Tuple outputTuple = TupleFactory.getInstance().newTuple(3);

outputTuple.set(0, line);

outputTuple.set(1, pbkey);

outputTuple.set(2, new Long(c));

return outputTuple;

}

@Override

public Schema outputSchema(Schema input) {

Schema.FieldSchema linenumber = new Schema.FieldSchema("linenumber", DataType.CHARARRAY);

Schema.FieldSchema pbykey = new Schema.FieldSchema("pbykey", DataType.CHARARRAY);

Schema.FieldSchema count = new Schema.FieldSchema("count", DataType.LONG);

Schema tupleSchema = new Schema();

tupleSchema.add(linenumber);

tupleSchema.add(pbykey);

tupleSchema.add(count);

return new Schema(tupleSchema);

}

}

Pattern Matching Finding Double Bottom (W)

SELECT first_x, last_z

FROM ticker MATCH_RECOGNIZE (

PARTITION BY name ORDER BY time

MEASURES FIRST(x.time) AS first_x,

LAST(z.time) AS last_z

ONE ROW PER MATCH

PATTERN (X+ Y+ W+ Z+)

DEFINE X AS (price < PREV(price)),

Y AS (price > PREV(price)),

W AS (price < PREV(price)),

Z AS (price > PREV(price) AND

z.time - FIRST(x.time) <= 7 ))

250+ Lines of Java and PIG 12 Lines of SQL

20x less code, 5x faster

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

Streaming Result Sets

32K Varchar

Identity Data Type

“On The Fly” Translations

Callout Framework

Fetch First (Top “N”) Queries

Application Development and Migrations Making Migrations to Oracle Easy

TSQL:

select top 10 * from table1

PL/SQL:

OPEN v_cursor FOR

SELECT * FROM table1

FETCH FIRST 10 ROWS ONLY;

DBMS_SQL.RETURN_RESULT(v_cursor);

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

Security & Compliance

Big Data

Consolidation

Data Optimization

Application Development

High Availability

In-Memory

Performance & Scalability

Data Warehousing

Plug into the Cloud

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

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