New Features in Database 11gR2 New Features in Database 11gR2
New Features in Database 11gR2 New Features in Database 11gR2
presentation for:
NoCOUG Summer 2010
New Features in Database 11gR2 You Won't Hear About From Oracle
Introduction
Daniel Morgan – damorgan11g@gmail.com
Oracle Ace Director
University of Washington, retired
The Morgan of Morgan's Library on the web
www.morganslibrary.org/library.html
Member: Western Washington Oracle Users Group
Member: UK Oracle Users Group
Former Member: Oracle Applications Users Group
Frequent speaker . . . . . . . . . . . .
New Features in Database 11gR2 You Won't Hear About From Oracle
cd $MORGAN_HOME
New Features in Database 11gR2 You Won't Hear About From Oracle
cd $MORGAN_HOME
New Features in Database 11gR2 You Won't Hear About From Oracle
cd $MORGAN_HOME
New Features in Database 11gR2 You Won't Hear About From Oracle
America's Cup Boat USA-71
New Features in Database 11gR2 You Won't Hear About From Oracle
Morgan’s Library: www.morganslibrary.org
New Features in Database 11gR2 You Won't Hear About From Oracle
How Can I?
New Features in Database 11gR2 You Won't Hear About From Oracle
... create a data type that will only hold 0s and 1s
DECLARE
SUBTYPE flagtype IS PLS_INTEGER RANGE 0..1;
x flagtype;
BEGIN
BEGIN
x := 0;
dbms_output.put_line('Success: ' || TO_CHAR(x));
EXCEPTION
WHEN others THEN
dbms_output.put_line('Can not assign 0 to flagtype');
END;
BEGIN
x := 1;
dbms_output.put_line('Success: ' || TO_CHAR(x));
EXCEPTION
WHEN others THEN
dbms_output.put_line('Can not assign 1 to flagtype');
END;
....
END;
/
Demo
New Features in Database 11gR2 You Won't Hear About From Oracle
OpenWorld Unconference
New Features in Database 11gR2 You Won't Hear About From Oracle
New in 11gR1
New Features in Database 11gR2 You Won't Hear About From Oracle
New in11gR1
Oracle Database introduced a large number of
new features. Among the most notable:
ADR
Compound Triggers
Continue Statement
Flashback Archive
Follows Clause
Invisible Indexes
Native Compilation Improvements
Partitioning Options
Partition by Interval
Partition by Reference
Partition by System
Many new composite partitioning options
Pivot & Unpivot Operators
New Features in Database 11gR2 You Won't Hear About From Oracle
New in11gR1
PL/Scope
Simple Integer Data Type
SKIP LOCKED
New XML Functions
Pragma Inline
Read Only Tables
Virtual Columns
New Features in Database 11gR2 You Won't Hear About From Oracle
New in11gR1
Many new packages, objects, and parameters in
CTX_DDL
DBMS_ADVISOR
DBMS_AQ and DBMS_AQELM
DBMS_AUTO_TASK
DBMS_AW
DBMS_CAPTURE_ADM
DBMS_CDC_PUBLISH
DBMS_CONNECTION_POOL Connection Pool Management
DBMS_DATAPUMP
DBMS_DRS
DBMS_EXTENDED_TTS_CHECKS
DBMS_FLASHBACK Transaction Backout
DBMS_HM Health Management
New Features in Database 11gR2 You Won't Hear About From Oracle
New in11gR1
DBMS_LOB
DBMS_METADATA
DBMS_MONITOR
DBMS_NETWORK_ACL_ADMIN Access Control Lists
DBMS_ODCI
DBMS_PREDICTIVE_ANALYTICS
DBMS_REGISTRY
DBMS_RESOURCE_MANAGER
DBMS_RESULT_CACHE Result Cache
DBMS_SCHEDULER
DBMS_SERVICE
DBMS_SESSION
DBMS_SHARED_POOL
DBMS_SQL
DBMS_SQLDIAG
DBMS_SQLPA
DBMS_SQLTUNE
DBMS_STATS
New Features in Database 11gR2 You Won't Hear About From Oracle
New in11gR1
DBMS_STREAMS Streams
DBMS_SYSTEM
DBMS_TTS
DBMS_WARNING PL/SQL Warnings
DBMS_WORKLOAD_CAPTURE
Real Application Testing
DBMS_WORKLOAD_REPLAY
DBMS_XA Distributed Transactions
DBMS_XPLAN Explain Plan
UTL_XML
New Features in Database 11gR2 You Won't Hear About From Oracle
New in11gR1
And in 11.1.0.7
DBMS_AUDIT_MANAGEMENT
DBMS_BACKUP_RESTORE
DBMS_IR Incident Reporting
DBMS_LOGSTDBY
DBMS_METADATA
DBMS_SCHEDULER
DBMS_SQLPA
DBMS_SQLTUNE
DBMS_WORKLOAD_CAPTURE
DBMS_WORKLOAD_REPLAY
DBMS_XPLAN
UTL_XML
New Features in Database 11gR2 You Won't Hear About From Oracle
My OpenWorld Predictions
What Oracle
will talk about
"here at OpenWorld"
New Features in Database 11gR2 You Won't Hear About From Oracle
What Oracle Will Talk About
Edition Based Redefinition - 11.2.0.1
Functions, Packages, Procedures, Synonyms, and Views
New Grid Features
Single Node RAC
New ASM Capabilities
Omotion
DBFS
the Grid
Advanced Compression
Exadata V2 and Hybrid Columnar Compression
New Features in Database 11gR2 You Won't Hear About From Oracle
Bryn Llewellyn's White Papers
New Features in Database 11gR2 You Won't Hear About From Oracle
Bryn Llewellyn's White Papers
New Features in Database 11gR2 You Won't Hear About From Oracle
Bryn Llewellyn's White Paper
New Features in Database 11gR2 You Won't Hear About From Oracle
We all have our favorite customers: This is mine
Store
More
Data
Maintain
Performance
Honor
the same
Service
Level
Agreement
New Features in Database 11gR2 You Won't Hear About From Oracle
Hybrid Columnar Compression on Exadata V2
New Features in Database 11gR2 You Won't Hear About From Oracle
How Traditional Compression Works
A grossly oversimplified "how it works"
1. Oracle examines full blocks for duplicates
2. Creates a symbol that is stored in the block header
3. Rewrites the block substituting the symbol for the values it
represents
Compression is performed at the block level
not the table like DB2
New Features in Database 11gR2 You Won't Hear About From Oracle
9.2 Data Segment Compression
Heap Organized Tables
Materialized Views
CREATE TABLE reg_tab AS
SELECT *
FROM dba_tables;
TABLE_NAME BLOCKS
------------------------------ ----------
REG_TAB 109
COMP_TAB 20
New Features in Database 11gR2 You Won't Hear About From Oracle
Database Block Anatomy
Header
General block information
Table Dictionary
Table info in clusters
Row Dictionary
Row info in block (2 bytes/row)
Free Space
Free Space
Used when a new row is inserted
or an existing row is updated
Row Data
New Features in Database 11gR2 You Won't Hear About From Oracle
Logical Compression Unit
Tables are organized into Compression Units (CU)
CU's are logical structure spanning multiple database blocks
Typically 32K - (4 x 8K block size)
Data is organized by column during data load
Each column is compressed separately
Column organization brings similar values close together
New Features in Database 11gR2 You Won't Hear About From Oracle
Logical Compression Unit
CREATE TABLE demo (
person_id NUMBER(10),
first_name VARCHAR2(20),
mid_initial VARCHAR2(4),
last_name VARCHAR2(35),
date_of_birth DATE,
hire_date DATE,
status VARCHAR2(5),
comments VARCHAR2(500));
New Features in Database 11gR2 You Won't Hear About From Oracle
Business as Usual
Fully supported with…
B-Tree, Bitmap Indexes, Text indexes
Materialized Views
Exadata Server and Cells
Partitioning
Parallel Query, PDML, PDDL
Schema Evolution support, online, metadata-only
add/drop columns
Data Guard Physical Standby Support
Will be supported in a future release
Logical Standby
Streams
New Features in Database 11gR2 You Won't Hear About From Oracle
HCC: Things to Consider …
When a row is updated
It is automatically migrated to OLTP Table Compression
Table size will increase moderately
All rows in the compression unit are locked
When tables are queried
Table scans are faster due to less I/O
Index lookups are usually slower
Need to decompress the compression unit to read entire row
New Features in Database 11gR2 You Won't Hear About From Oracle
HCC's Performance Characteristics
GB/s Physical 4 GFC EHCC Required Cores
HBAs Reinflated Data for "Primary
Flow (GB/s) Processing
New Features in Database 11gR2 You Won't Hear About From Oracle
Compression Advisor
DBMS_COMPRESSION built-in package
GET_COMPRESSION_RATIO
Returns the possible compression ratio for an uncompressed
table or materialized view and estimates achievable
compression
GET_COMPRESSION_TYPE
Inspects data and reports what compression type is in use by
row
Enterprise Manager Segment Advisor
Estimates OLTP Table Compression automatically
Advises tables that will benefit from OLTP Compression
New Features in Database 11gR2 You Won't Hear About From Oracle
GET_COMPRESSION_RATIO
CREATE TABLE comp_test1 AS
SELECT * FROM dba_objects;
set serveroutput on
DECLARE
blkcnt_comp PLS_INTEGER;
blkcnt_uncm PLS_INTEGER;
row_comp PLS_INTEGER;
row_uncm PLS_INTEGER;
comp_ratio PLS_INTEGER;
comp_type VARCHAR2(30);
BEGIN tablespace owner table name partition
dbms_compression.get_compression_ratio('UWDATA', 'UWCLASS', 'COMP_TEST1', NULL,
dbms_compression.comp_for_oltp, blkcnt_cmp, blkcnt_uncmp, row_comp, row_uncm,
comp_ratio, comp_type);
New Features in Database 11gR2 You Won't Hear About From Oracle
GET_COMPRESSION_TYPE
CREATE TABLE comp_test2
COMPRESS FOR OLTP AS
SELECT * FROM dba_objects;
set serveroutput on
DECLARE
rid ROWID;
n NUMBER;
BEGIN
SELECT MAX(rowid)
INTO rid
FROM comp_test2;
New Features in Database 11gR2 You Won't Hear About From Oracle
New in 11gR2 and
you won't hear about
from your Oracle rep
New Features in Database 11gR2 You Won't Hear About From Oracle
What's Deprecated
ALTER USER AUTHENTICATED USING PASSWORD
"has been deprecated for this release. If you use this clause,
Oracle Database converts it to the AUTHENTICATION REQUIRED
clause. If you do not specify the AUTHENTICATION REQUIRED
clause, then Oracle Database uses either the AUTHENTICATED
USING CERTIFICATE clause or the AUTHENTICATED USING
DISTINGUISHED NAME clause."
DB_EXTENDED Audit Syntax
Instead, use the DB, EXTENDED
Listener Passwords
"This does not cause a loss of security because authentication is
enforced through local operating system authentication."
WKUSER Role and Ultra Search Schemas Deprecated
DBCA no longer provides default security settings
New Features in Database 11gR2 You Won't Hear About From Oracle
Database Level Changes
Structure changes in the ADR
DataGuard Compressed Table Support for
Logical Standby and LogMiner
DataPump Legacy Mode
ALTER SYSTEM SET cpu_count = 4;
Demo
New Features in Database 11gR2 You Won't Hear About From Oracle
Execute for Directory Objects
In 10g we granted READ and/or WRITE
But this also allowed executing the
ORACLE_LOADER access driver
Only a user that has been given EXECUTE
access to the directory object is allowed to run
programs in it
Demo
New Features in Database 11gR2 You Won't Hear About From Oracle
RAC Clusters
In-Memory Parallel Query
Traditionally, parallel execution has access to large amounts
of data by taking full advantage of the system's I/O capacity
In an Oracle RAC environment, Oracle maps fragments of the
object into each of the buffer caches on the active instances
As clusters scale-out this new functionality optimizes large
parallel operations by minimizing or eliminating physical I/O if
parallel operation can be satisfied in memory
parallel_adaptive_multi_user=TRUE
parallel_automatic_tuning=FALSE
parallel_degree_limit=CPU
parallel_force_local=FALSE
New Features in Database 11gR2 You Won't Hear About From Oracle
RMAN
Automatic Block Repair
RMAN> BLOCKRECOVER DATAFILE 2 BLOCK 12,13 DATAFILE 3
BLOCK 5,98,99 DATAFILE 4 BLOCK 19;
New Features in Database 11gR2 You Won't Hear About From Oracle
Storage
Tablespaces
Enhancements to SecureFiles (learn about DBFS)
New Tablespace Master Rekey
Indexes
Zero-size unusable indexes & index partitions
Tables
Segment creation on demand (deferred segment creation)
Demo
New Features in Database 11gR2 You Won't Hear About From Oracle
SQL
New Analytic Functions
LISTAGG
NTH_VALUE
RESPECT or IGNORE NULLS
New Features in Database 11gR2 You Won't Hear About From Oracle
SQL
ALTER DATABASE LINK
IGNORE_ROW_ON_DUPKEY_INDEX Hint
To ignore collisions and insert the rows that do not collide
with existing rows, put the hint in the INSERT statement
Improved Flashback Archive allows more DDL
DATABASE_ROLE constant for SYS_CONTEXT
PRIMARY
PHYSICAL STANDBY
LOGICAL STANDBY
SNAPSHOT STANDBY
Demo
New Features in Database 11gR2 You Won't Hear About From Oracle
SQL
Recursive Queries
CONNECT BY
Recursive Common Table Expressions (WITH)
WITH <alias> AS
(subquery_sql_statement)
SEARCH <BREADTH | DEPTH>
FIRST BY <column_name> [ASC | DESC] [NULLS FIRST | NULLS LAST]
SET <ordering_column>
CYCLE (alias) SET <cycle_mark_alias>
TO <cycle_value> DEFAULT <no_cycle_value>
SELECT <column_name_list>
FROM <alias_one>, <alias_two>
WHERE <join_condition>;
New Features in Database 11gR2 You Won't Hear About From Oracle
PL/SQL
New NO_DATA_NEEDED Predefined Exception
ORA-06548: For parallel access and pipelined table functions
The caller of a pipelined function does not need more rows to be
produced by the pipelined function.
Improved fine grained dependency tracking
Warnings
Severe
5018 - omitted optional AUTHID clause
5019 - deprecated language element
5020 - parameter name must be identified
Informative
6016 - native code generation turned off (size/time)
6017 - operation will raise an exception
6018 - an infinity or NaN value computed or used
Performance
None Demo
New Features in Database 11gR2 You Won't Hear About From Oracle
Built-in Packages
New Packages (26 in all)
DBMS_COMPRESSION HCC
DBMS_PARALLEL_EXECUTE RAC
DBMS_METADATA
DBMS_METADATA_UTIL
DBMS_NETWORK_ACL_ADMIN Assign ACL to a Wallet
New Features in Database 11gR2 You Won't Hear About From Oracle
Built-in Packages
Packages with new Functions and Procedures
DBMS_SESSION Get package memory utilization & EBR
DBMS_STATS
DBMS_STREAMS & STREAMS_ADM
DBMS_UTILITY WAIT_ON_PENDING_DML
DBMS_WLM
DBMS_WORKLOAD_CAPTURE & REPLAY
DBMS_WORKLOAD_REPOSITORY GLOBAL_DIFF_REPORT
DBMS_XPLAN DIFF_PLAN procs
New Features in Database 11gR2 You Won't Hear About From Oracle
Built-in Packages
Packages with new Functions and Procedures
UTL_HTTP SET_AUTHENTICATION_FROM_WALLET
CLOSE_CONNECTION
UTL_SMTP
And many have new overloads (39+)
And new parameters (13+)
And new types (1+)
And new constants (4+)
Adding new and enhanced functionality
New Features in Database 11gR2 You Won't Hear About From Oracle
New in Database 11.2 Summary
New Features in Database 11gR2 You Won't Hear About From Oracle
Questions
ERROR at line 1:
ORA-00028: your session has been killed
New Features in Database 11gR2 You Won't Hear About From Oracle