66
<Insert Picture Here> Nik Eichler Leitender Systemberater STCC Düsseldorf Neue Features der Oracle 11g Datenbank

Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Embed Size (px)

Citation preview

Page 1: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

<Insert Picture Here>

Nik Eichler

Leitender Systemberater

STCC Düsseldorf

Neue Features der Oracle 11g Datenbank

Page 2: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Safe Harbor Statement & Confidentiality

• 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.

• All information regarding the beta program is subject to change without notice

• The information provided in this presentation is confidential and is covered by the terms of the Beta Trial License agreed upon byyou or a representative from your company

Page 3: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

11.Juli Launch in New York

Page 4: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Self-Managing Database: Die 3 M s

Man

age

Cha

nge

Manage Performance & Resource

Manage FaultManage Fault

Page 5: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Manage Change

MEMORY_TARGET, Real Application Testing (RAT), Database

Replay, Automatic Maintenance Tasks Management, Incident

packaging service (IPS) and incident packages, SQL Test Case

Builder, DIAGNOSTIC_DEST, dbms_hm.run_check,

DDL_LOCK_TIMEOUT, Standardized trace formats, Automatic

Diagnostic Repository Command Interpreter (ADRCI), Grants und Audit

Statements für Datamining, automatic

capture of diagnostic data upon first failure, READ ONLY table, default

resource manager plan enabled, database control enhancements,

CONTROL_MANAGEMENT_PACK_ACCESS, flashback data archive,

real time monitoring of longtime SQL u.v.m.

Page 6: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Post-Change Test System

…Replay Driver

………

App ServerApp ServerApp Server

Process Process Process… Process Process Process…

Can use Snapshot Standby as test system

Replay Driver

ClientClient

…Client

Pre-Change Production System

Processed Captured Workload

Backup

Capture Workload

Database Replay

Page 7: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

To:From:

Why DB Replay?

Complete workflowsPartial workflows

Low riskHigh risk

AutomatedManual intensive

Production workloadsArtificial workloads

Days of developmentMonths of development

150

Days

10

Days

Page 8: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Enterprise Manager: Database Replay

Page 9: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Trace und Log- Dateien, Health Monitor... Automatic Diagnostic Repository

• Ein (!) Repository (sogenanntes ADR) für Diagnostic Daten aus Datenbank, ASM, CRS und anderen

Oracle Produkten/Komponenten

• ADRCI ist ein neues Command-line Tool:

• Um Diagnostic Daten im ADR zu monitoren

• Um "incident" und "problem" Informationen in einer ZIP Datei zur Verfügung zu stellen

• Ohne Login nutzbar

• Bietet Interface für Health Monitor Checks

Page 10: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

ADR Interface

Page 11: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Self-Managing Database: Die 3 M s

Man

age

Cha

nge

Manage Performance & Resource

Manage FaultManage Fault

Page 12: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Manage Availability

RAC optimized cache Fusion, Total Recall, Flashback Data

Archive, Data Recovery Advisor, Oracle Flashback

Transaction Backout, ASM fast mirror (DISK) resync, SYSASM

role and OSASM OS group, ASM variable size extents, ASM preferred

read, multisection RMAN backup, lost write detection, Snapshot

standby, Real-time query capability of physical standby, LOGMiner in

EM, Use of physical standby database for rolling upgrades,Faster role

transitions, Support for additional object datatypes and PL/SQL

package support, READ_ONLY_OPEN_DELAYED, Heterogeneous

Data Guard Configuration (Linux und Windows), Support Transparent

Data Encryption, Compression of redo traffic over the network in a Data

Guard configuration, Improved Integration with RMAN u.v.m

Page 13: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Flashback-Techniken

Undo ManagementFlashback Version

Flashback Transaction Query

BatchJobs

Undo ManagementFlashback Table

Flashback Transaction Query

DML

DefaultRecycle BinDROP TABLE

Flash Recovery Area, FLASH- und

ARCHIVELOG Mode

Flashback DatabaseDROP USER,

TRUNCATE...

KonfigurationLösungProblem

Und nun .......

Page 14: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Flashback Data Archive

• Speicherung von Veränderungen durch

Transaktionen über langen Zeitraum

• Einfache Nutzung mit AS OF

select * from employees

AS OF TIMESTAMP

(systimestamp - interval '3'

month)

where last_name='Fox'

Page 15: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Flashback Data Archive: Einfaches Setup und Verwendung

• Erzeugen des Data Archive mit Retention Policy:

create FLASHBACK ARCHIVE ts1 tablespace

QUOTA 100M RETENTION 2 year;

• Einschalten für die Tabellen:alter table employees FLASHBACK ARCHIVE ts1;

Im Hintergrund:

• Anwenden:select * from employees AS OF TIMESTAMP

(systimestamp - interval '3' month)

where last_name='Fox'

Page 16: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Transaction Backout: Was ist das?

• Rollback einer Transaktion und der abhängigen Transaktionen

• Verwendet dazu Undo, Archivierte Redo Logs und Supplemental Logging

• Analysiert die Abhängigkeiten der Transaktionen, führt DML durch und generiert Berichte

• Führt kein COMMIT durch

• Verwendbar im EM und mit Package DBMS_FLASHBACK.TRANSACTION_BACKOUT

Page 17: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Gesteuert über Database Control

Page 18: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Dataguard News 3 - Real Time Query

• Physical Standby für Abfragen öffnen

• Log Apply läuft im Hintergrund weiter

• Volles Disaster Recovery

• Voll-aktive Nutzung der Standby-Datenbank

phySTBYPROD

Redo Shipping

und Redo Apply

Page 19: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

• Physical Standby Read/Write öffnen, Testen, Daten ändern - unddanach einfach auf Knopfdruck wieder zurückstellen

• Dabei Zero Data Loss erhalten

Updates

Primary

Database

Queries

Physical Standby

DatabaseSnapshot Standby

Database

UpdatesQueries

Physical Standby

Database

Dataguard - Snapshot Standby

Page 20: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Dataguard - Transient Logical Standby

• Für Rolling Upgrades die Physical Standby in eine Logical Standbytransferieren, das Upgrade durchführen und danach wieder Rücktransformation in eine Physical Standby

PhysicalPhysical

LogicalLogical

UpgradeUpgrade

PhysicalPhysical

Page 21: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

ASM Fast Mirror Resync

Disk again accessible:Only need to resync modified extents

2

Failure time < DISK_REPAIR_TIME

1• Fraction of time to establish

redundancy

• Only changed blocks are resync’ed

• Benefits:

• Fast recovery from transient failures

• Enables pro-active maintenance

Page 22: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

ASM Preferred Mirror Read

Site BSite A

P S

• Allow local mirror read operations

• Eliminate network latencies in extended clusters

Extended Cluster

ASM_PREFERRED_READ_

FAILURE_GROUPS=DATA

.SITEA

ASM_PREFERRED_READ_

FAILURE_GROUPS=DATA

.SITEB

SELECT preferred_read FROM v$asm_disk;

SELECT * FROM v$asm_disk_iostat;

Page 23: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Self-Managing Database: Die 3 M s

Man

age

Cha

nge

Manage Performance & Resource

Manage FaultManage Fault

Page 24: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Manage ALL your data

SECUREFILE, LOB Deduplicate, LOB compression, invisible index,

XMLDIFF, XMLPATCH, compound DML trigger, Reihenfolge für

Trigger Firing, LOCK TABLE WAIT, REGEXP_COUNT, PL/SQL

hierarchical profiler, CUBE_TABLE Funktion, XML Index, READ ONLY

table, SIMPLE_INTEGER, function result cache, CONTINUE

statement, PL/SQL Native Compiler, PL/Scope, Inlining, SQL Developer

Erweiterungen, Result Cache Memory Pool, database

resident connection pool, XML storage: binary XML, repository events,

native xml db web services, in place schema evolution, Xlink, Xinclude,

JSR-170 support, Composite Domain Index für Text, Oracle Text

Manager, user defined scoring, incremental text indexing, OWL

inferencing, 3-D geometry support, DICOM-Format Unterstützung,

ORDDicom Objekttyp, PHP Connection Pool, Online Domain Index

Rebuild, APEX by default u.v.m.

Page 25: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Result Cache

Table 1

Table 2 Table 3

join

join

Group by

query 1executes

Table 1

Table 2 Table 3

join

join

Group bycachedresult

result iscached

Table 5 Table 5

join

Table 4

join

Group by

joinquery 2 uses cachedresult transparently

• Memorybereich für Resultate für sich wiederholende Ergebnisse aus Queries und PL/SQL-Funktionen

• Poolbereich wird im Shared Pool reserviert

• Bei Veränderungen: Cache Refresh/Invalidierung

• Einstellung auf Session/System-, Tabellen-Ebene und mit Hint

• Parameter: RESULT_CACHE_MODE (MANUAL/FORCE/AUTO)

• Größeneinstellung: RESULT_CACHE_MAX_SIZE

Page 26: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

PL/SQL Function Cache

create or replace function plcache

return number

result_cache relies_on(scott.emp)

is

Page 27: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

OCI Consistent Client Cache

• Caches query results on client

• Improves performance for read-mostly tables

• Faster response time - eliminates network round trips

• Saves server CPU

• Consistent with server

• Cache proactively refreshed when result set changes

• Same consistency semantics as RAC max_commit_propagation

• Like Cache Fusion between server and client

Application Server

Database

Consistent Caching

Page 28: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Manage large dataManage performance

SQL Performance Analyzer (SPA), OLTP compression,

Automatischer SQL Tuning Advisor, ASH

enhancements, Interval Partitioning, system partitioning, ref

partitioning, pivot und unpivot operator, partition advisor, list-list, list-

range, list-hash range-rangepartitioning, virtual column based

partitioning, query rewrite enhancements, refresh enhancements, ILM,

securefile, LOB compression, LOB deduplication, automatic

performance diagnostic, enhanced optimizer statistics (multi column

statistics), resource manager (I/O statistics), query result cache, SQL

plan baselines, SQL plan management, AWR baslines, ADDM for

clusters, pending statistics, publication of statistics, data pump

compression, compression for external tables, SQL Test Case Builder,

RESULT_CACHE_MODE u.v.m

Page 29: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

SQL Tuning in Oracle Datenbank 10g

Workload

SQL Tuning Kandidaten

SQL Tuning Advisor

ADDM

AWR

one hour

Empfehlungen generieren

DBA

Advisor aufrufen

Implementieren

DBA

Bedeutende Automatisierung, aber DBA noch erforderlich

Empfehlungen bewerten

DBA

Page 30: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

It’s Automatic!

Choose Candidate

SQLone

week

Automatisches SQL Tuning in Oracle 11g

Workload

SQL Tuning Candidates

Test SQL ProfilesImplement

SQL Profiles

Generate

Recommendations

AWRDBA

View Reports / Control Process

Page 31: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Automatisches Memory Tuning

• Automatiche Anpassung an Lastveränderungen

• Vereint Shared-(SGA) und Prozess- (PGA) Memory Management

• Ein dynamischer Parameter

• Maximiert Memory-Ausnutzung

• Verhindert out- of-memory Fehler

• Verwaltet OS Memory: Linux, Windows and Solaris, HPUX, AIX

O/S Memory

O/S Memory

PGA

SGA

PGA

SGA

Page 32: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Partitioning,Partitioning,Partitioning

Interval PartitioningPartition Advisor

List-ListList-Range

List-HashRange-Range

REF PartitioningVirtual Column PartitioningSystem Partitioning

Oracle 11g

Fast drop tablePartitionen pro Tabelle (1024 K)Oracle10gR2

Local Index MaintenanceGlobal hash indexesOracle10g

Composite range-listOracle9iR2

Global Index MaintenanceListOracle9i

Merge OperationHashcomposite range-hash

Oracle8i

Maintenance Operationen wie add, drop, exchange…

Range

Global range indexesOracle8

ManageabibilityFunktionenVersion

Page 33: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Interval Partitioning

CREATE TABLE sales (order_date DATE, ...) PARTITON BY RANGE (order_date)

INTERVAL(NUMTOYMINTERVAL(1,'month')

(PARTITION p_first VALUES LESS THAN ('01-FEB-2006');

Table SALES

Jan 2006

... ...

Feb 2006 Mar 2006 Jan 2007 Oct 2009 Nov 2009

...

1te Partition wird angelegt Später hinzugefügt

Page 34: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

INTERVAL PARTITIONING

• Derivative of RANGE partitioning

• Creates partitions with constant width (e.g., “month”)

• For DATE and NUMBER columns

• Partitions created on the fly, when 1st row inserted

• Existing RANGE partitions can be converted to INTERVAL

CREATE TABLE Orders

PARTITION BY RANGE (time_id)

INTERVAL(‘MONTH’) ….

Page 35: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Virtual Columns & Partitioning

• ANSI syntax

• Look just like regular columns from SQL perspective

• Support for indexes, constraints, statistics, histograms

• Used by expression evaluation when applicable

• Can partition on virtual columns

Create table t1 (c1 number, c2 number,c3 as (c1+c2) virtual)

Page 36: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

REF PARTITIONING

• Equi-partitions a foreign key table with a primary key table

• Foreign key table need not contain the partitioning key

• Foreign keys will be placed in same relative partition

as parent primary keys

• Joins between primary key and foreign key will be

partition-wise

• Great for ILM

Partition Order_lines by Order_Date in Orders table

Page 37: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

SQL Access Advisor: Recommendations

Indexes Materialized

views

Materialized

views log

SQL Access Advisor

Hypothetical

SQL cache

Filter Options

STS

Workload

Partitioned

objects

Page 38: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Oracle11g und Java (JDBC)

• Unterstützung für Java Standards:

• JDK 1.5 und 1.6

• JDBC 4.0

• Interface für Database Change Notification

• Native-Interface für Streams Advanced Queuing

• Database Startup und Shutdown via JDBC

• Auch mit dem "thin"-Treiber

• Beispielcode verfügbar

Page 39: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Oracle 11g: Java in the Database

• Java auf aktuellem Stand: J2SE 5.0 (Java 1.5)

• Java "just got faster": Just-In-Time-Compiler

• Testcase: Arithmetik und Tabellenzugriff

• Java ohne JIT: 21 Sekunden

• Java mit JIT: 5 Sekunden

Java und PL/SQL sind gleichberechtigte Alternativen!

Page 40: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

ODP.NET 11g

• Endlich: Instant Client Support

• Unterstützung für Objekttypen

• Erweiterungen beim Connection Pool

• Als öffentliche Beta bereits jetzt verfügbar!

http://www.oracle.com/technology/software/tech/windows/odpnet/index_11gbeta.html

Page 41: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Database-Resident Connection Pool

• Starten des Connection Pools

• Datenbank-Connect am Beispiel PHP

dbms_connection_pool.start_pool(

pool_name => 'SYS_DEFAULT_CONNECTION_POOL'

);

$conn = oci_connect(

'scott',

'tiger',

'localhost:1521/ORCL.de.oracle.com:POOLED'

);

Ohne Pool: ~ 10 Sekunden

Mit Pool: ~ 5-6 Sekunden

Page 42: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Optimizer Statistics

• Faster

• Order of magnitude faster optimizer stats computations

• Efficient incremental maintenance of partitioned table stats

• Better

• Correlated stats (NDV, histograms) on multiple columns

• Safer

• Stats gathered can remain private in "statistics workspace" until they are ready to publish for general use

Oracle Confidential

Page 43: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Bilder, Dokumente und mehr ...Oracle SecureFiles

• Securefile = Neue LOB-Storage-Technologie

• Bessere Performance

• Zusätzliche Features: Deduplication, Encryption

• Aktivierung durch Storage-Clause

• Zusätzlich: Init.ora-Parameter

CREATE TABLE LOBTEST(

LOBCOL BLOB

)

LOB (LOBCOL) STORE AS [SECUREFILE | BASICFILE]

[deduplication-params, encrypt-params]

DB_SECUREFILE =

[NEVER | PERMITTED | ALWAYS | IGNORE]

Page 44: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

SecureFilesFür den Entwickler ändert sich ... eigentlich Nichts!

• Securefiles sind für den Entwickler transparent

• Datentypen weiterhin BLOB/CLOB

• Definition in der Storage-Clause oder durch DB-Parameter

• Keine funktionalen Unterschiede

• Selbst "deduplication" ist transparent für den Entwickler

• API-Zugriffe PL/SQL (DBMS_LOB), JDBC, .NET, PHP, ...

"These features are implemented in the database and are transparently available to [...] programs through the existing APIs."

Page 45: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

High Performance

• Preliminary performance compared to Linux filesystem

• No network, no logging, single stream of file reads or

writes

• Filesystem-like performance

0

20

40

60

80

100

120

0.1 1 10 100

File Read Performance

File Size (MB)

Speed (MB/sec)

0

20

40

60

80

100

120

0.1 1 10 100

File Write Performance

File Size (MB)

LOBs

Linux Files

SecureFiles

LOBs

Linux Files

SecureFiles

Page 46: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Database and File System Interfaces

• SecureFiles can be accessed by both database clients and file system clients

• Database clients use extended LOB interfaces

• JDBC, ODBC, OCI, .NET, PL/SQL

• 11g has a highly optimized streaming protocol for SecureFiles

• File system clients use the file system protocols implemented inthe XML DB repository

• FTP access

• WebDav Access

• Mountable NFS V4 file system (preview only)

Page 47: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Designed from Scratch

• SecureFiles is a major rearchitecture of how the database handles file data

• Not an incremental improvement to LOBs

• Entirely new:

• Disk format

• Network protocol

• Versioning and sharing mechanisms

• Caching and locking

• Redo and undo algorithms

• Space and memory management

• Cluster consistency algorithms

Page 48: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Storage Optimized

• Deduplication

• Multiple copies of identical SecureFiles are stored only once

• Great for document management, testing, product “homes”

• Significantly better performance for copy operations

• Compression

• Intelligent – Automatically determines if data is compressible

• 2x to 3x compression for typical files

• Improves performance by reducing IO, buffer cache requirements, redo generation and encryption overhead

• Transparent to applications

Page 49: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Oracle TEXT 11gMehr Performance: Composite Domain Indizes

• Optimierung für Mixed Queries und Sortierungen

• Sortierung und Filtern werden direkt im

TEXT-Index durchgeführt

CREATE INDEX myindex on docs(text)

INDEXTYPE is CTXSYS.CONTEXT

FILTER BY category, publisher, pub_date

ORDER BY pub_date desc;

Page 50: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Oracle TEXT 11gMehr Performance: Composite Domain Indexes

• Beispiel für eine Mixed Queryselect rowid from docs

where contains(dok, 'Tag') > 0 and

pub_date between '2006-01-01' and '2006-12-31'

Plan mit Composite Domain Index Plan ohne Composite Domain Index

Page 51: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Oracle InterMedia

• Neuer Name in den Handbüchern: MultiMedia

• Performance / Skalierbarkeit

• Objekte bis zu 128TB = LOB Maximum

• Performance-Verbesserungen (auch durch JVM)

• Stark erweitert: DICOM Unterstützung

• Eigener Datentyp ORDDicom Metadatenextraktion, -Manipulation,

Anonymisierung, DICOM-Spezifische API

• XML basierte MetadatenNutzung der XML DB

Page 52: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Oracle XML DB:Neu: Binary XML und XML Index

• Neue Speicherungsform

• Compact Binary XML

• Neuer Index für XML: XML Index

• Für Speicherung als CLOB oder Binary XML

create index idx_xml on xml_tab(dokument)

indextype is xdb.xml_index

PARAMETERS

('PATHS (INCLUDE (/path/to/xml/node)(//another-

node))')

create table xml_tab (doc xmltype)

xmltype column store as binary_xml

allow nonschema

Page 53: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

XML DB Native Web Services

• Datenbankkomponenten als Web Service bereitstellen

• SQL-Abfragen, XQuery-Abfragen

• PL/SQL-Prozeduren, -Funktionen und –Packages

• Ohne zusätzliche Entwicklung

SOAP / HTTP JDBC

•Oracle 9i•Oracle10g

Middleware• BEA, IBM WS

Page 54: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

XML DB Native Web Services

• Datenbankkomponenten als Web Service bereitstellen

• SQL-Abfragen, XQuery-Abfragen

• PL/SQL-Prozeduren, -Funktionen und –Packages

• Ohne zusätzliche Entwicklung

SOAP / HTTP

Listener als HTTP EndpointXML DB ProtokollserverWSDL-Generierung on demand

Page 55: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Oracle11g XML DBWeitere Neuigkeiten

• "Functional Completeness"

• XMLTYPE und Data Pump

• XMLTYPE und Data Guard Logical Standby (Textbasierte (CLOB)-Speicherung)

• Große Textknoten (> 64k) werden unterstützt

• Weitere neue Features

• "In Place" Schema Evolution

• XMLDiff und XMLPatch

• PL/SQL ACL basieren auf XML DB(DBMS_NETWORK_ACL_ADMIN, DBMS_NETWORK_ACL_UTILITY)

• Allgemein bessere Performance

Page 56: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Oracle Spatial 11g ... Die 3. Dimension

• Vollständige Unterstützung für 3D-Geometrien

• Modellierung Oberflächen, geschlossene Körper, TIN, Punktwolken

• IndizierungP(10,10,20) und P(10,10,30) sind verschiedene Punkte

• Anwendungsgebiete

• 3D-Stadtmodelle

• "Noise Maps" (EU)

• Google Earth-Integration (KML)

Page 57: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

SQL: Allgemeine Erweiterungen

• Tabellen-ErweiterungenREAD ONLY-Tabellen, Virtuelle Columns, Flashback Archive Klausel, Neue Partitioning Klauseln u.v.m.

• Index-ErweiterungenINVISIBLE Index, Text Index, XML Index u.v.m.

• FunktionenREGEXP-Funktionen, XML-Funktionen wie XMLDIFF,XMLEXISTS, CUBE_TABLE u.v.m.

• StatementsMERGE für Tabellen mit Domain Indizes, SELECT mit PIVOT und UNPIVOT,CREATE TRIGGER, LOCK TABLE u.v.m.

Page 58: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Enhanced SQL –PIVOT und UNPIVOT

100Q3Jeans

1000Q4Jeans

500Q3Jeans

1000Q1Jeans

1000Q2Shoes

2000Q1Shoes

AMOUNTQUARTERPROD

1000600Null1000Jeans

NullNull10002000Shoes

Q4Q3Q2Q1PROD

SELECT * FROM sales

PIVOT

(sum(amount)

FOR quarter in

‘Q1’,’Q2’,’Q3’,’Q4’);

Beispiel

Page 59: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

PL/SQL ProfilingPL/SQL Hierarchical Profiler

• Nicht-hierarchische (flat) Profiler listen die Zeit, die ein Programm in seinen Unterprogrammen verbringt

• Wichtige Fragen:

• Wieviele Calls überhaupt?

• Wieviel Zeit insgesamt auch für die Unterprogramme?

• Neu: Dynamisches Execution Profiling von PL/SQL

• Keine spezielle Source nötig

• Resultat in speziellen "hierarchical profiler" Tabellen

• Liefert Unterprogramm-Level Execution Informationen

• Detaillierte parent-children Informationen

• SQL und PL/SQL werden separat behandelt

Page 60: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

PL/SQL native Compiler

• PL/SQL native Compilation funktioniert out-of-the-box

• Kein C-Compiler mehr nötig

• Native Code ist gespeichert im SYSTEM-Tablespace

• Einzige Einstellung über Session/System/ALTER

PROCEDURE Kommandos:

PLSQL_CODE_TYPE = NATIVE/INTERPRETED

• Besonders sinnvoll bei Berechnungen (BINARY_INTEGER!) mit geringem Anteil an SQL

• Tests mit Fibonacci-Zahlen (FIB35) :)

• interpreted: 29:01/native: 12:08

Page 61: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Manage Security

Tablespace level encryption, Master Key protection in hardware using

PKCS #11, Enforced case Sensitivity (SEC_CASE_SENSITIVE_LOGON),

SYSDBA and SYSOPER Strong Authentication, SYSASM Privilege for

Automatic Storage Management, Intelligent LOB Compression and

Encryption with SecureFiles, Compressed and Encrypted Dump File Sets,

Automatic Secure Configuration, DBCA, Default Auditing for

Security Relevant SQL Statements and Privileges, Configuring Password

Settings in the Default Profile, Fine-Grained Access Control on Network

Services on the Database, XDB_WEBSERVICES,

XDB_WEBSERVICES_OVER_HTTP,XDB_WEBSERVICES_WITH_PUBLICpredefined roles, Enterprise User Security in EM, DB_ULTRA_SAFE u.v.m.

Page 62: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Automatic Secure Configuration

Page 63: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Audit By Default und Default ProfileALTER ANY PROCEDURE

ALTER ANY TABLE

ALTER DATABASE

ALTER PROFILE

AUDIT ROLE

ALTER SYSTEM

ALTER USER

AUDIT SYSTEM BY ACCESS

CREATE ANY JOB

CREATE ANY LIBRARY

CREATE ANY PROCEDURE

CREATE ANY TABLE

CREATE EXTERNAL JOB

CREATE SESSION

CREATE USER

CREATE PUBLIC DATABASE LINK

DROP ANY PROCEDURE

DROP ANY TABLE

DROP PROFILE

DROP USER

EXEMPT ACCESS POLICY

GRANT ANY OBJECT PRIVILEGE

GRANT ANY ROLE

GRANT ANY PRIVILEGE

Das Default Profile

FAILED_LOGIN_ATTEMPTS= 10

PASSWORD_GRACE_TIME = 7

PASSWORD_LIFE_TIME= 180

PASSWORD_LOCK_TIME = 1

PASSWORD_REUSE_MAX = UNLIMITED

PASSWORD_REUSE_TIME = UNLIMITED

Page 64: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

Oracle Scheduler enhancements in Oracle Database 11g

• Local OS jobs

• run as any OS user

• Remote OS jobs

• no Oracle database required

on node

• run as any OS user

Agent

11g

Schedule

Jobs

Execute remote

OS job as OS user XExecute remote

OS Job as OS user Z

Agent

Execute local OS

job A as OS user X &

job B as OS user Y

Page 65: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

11g Veranstaltungen

• Oracle Education ab 23.07.• 11g Launch Events

• 25.09. Hamburg• 16.10. Köln• 23.10. Stuttgart• 07.11. München

• DOAG Special Interest Group• 27.09. Düsseldorf – Umgang mit großen Datenmengen• 28.09. Aktiv Workshop

• Internet Seminare in Vorbereitung• 2 x pro Monat, nach der Sommerpause

• DOAG Konferenz• 20.-22.11. in Nürnberg

• ODD: Hochverfügbarer und sicherer IT-Betrieb mit 11g• in allen NLs ab 29.11. insgesamt 10 Veranstaltungen

• Inklusive der Schweiz

Page 66: Neue Features der Oracle 11g Datenbank - Home: DOAG e.V. NRW... · capture of diagnostic data upon first failure, READ ONLY table, ... SELECT * FROM v$asm_disk_iostat; ... Composite

FragenFragen

A n t w o r t e nA n t w o r t e n