Escolar Documentos
Profissional Documentos
Cultura Documentos
Dan Hotka
Author/Instructor/Oracle Expert
www.DanHotka.com
www.DanHotka.com
www.DanHotka.com
Dan is a Training
Consultant
www.DanHotka.com
Agenda
Database Enhancements
ASMM
ASM
ASSM
Automatic Everything
Tuning
RBO to CBO
New hints
Tuning Advisor
www.DanHotka.com
Agenda
Object Enhancement
SQL Enhancements
Tablespace Enhancements
New SQL
New syntax
Table Redefinition
Clob, nclob, unicode
Materialized view
enhancement
PL/SQL Enhancements
OP article
Triggers/lobs
www.DanHotka.com
Agenda
Flashback Enhancements
Flashback features
Sqlplus
Drop/recycle bin
login.sql
Rman Enhancements
Utilities enhancements
Spool
Define variables
Log miner
Database Enhancements
ASMM
Automatic Shared
Memory Management
Init param:
SGA_TARGET
Set to 0, disables automatic sizing
Set to MAX SGA Size
Cannot be larger than
MAX_SGA_SIZE
V$DB_Cache_Advice
V$Shared_Pool_Advice
Useful for:
Smaller/self-managed databases
Overworked DBA shops
www.DanHotka.com
Database Enhancements
ASM
Automatic Storage Management
Automatic file management
Disk Groups
Normal Redundancy (Raid 0+1)
High Redundancy (Raid 5)
External redundancy (Separate RAID device)
www.DanHotka.com
Database Enhancements
ASM (continued)
www.DanHotka.com
Database Enhancements
V$OSM_Diskgroup
V$OSM_Disk
V$OSM_File
V$OSM_Template
V$OSM_Alias
V$OSM_Operation
ASM Summary:
Eliminates the need to
manage/create files
Replaces volume managers
High availability
www.DanHotka.com
www.DanHotka.com
Tuning
2 (default):
All unanalyzed tables in SQL
2x default sampling
www.DanHotka.com
Tuning
New Hints
Leading
Cardinality
Selectivity
No_use_nl merge hash
No_index_ffs ss
Index_ss ss_asc ss_desc
Cpu_costing no_cpu_costing
www.DanHotka.com
Tuning
Obsolete Hints
And_equal
Nl_adj merge hash
Nl_sj merge hash
Ordered predicates
Rowid
star
ADDM
Automatic Database Diagnostic
Monitor
Uses MMON process
Tracks bottlenecks and analyzes
workloads
OEM Interface, character-mode
interface via
DBA_ADVISOR_FINDINGS
www.DanHotka.com
Tuning
www.DanHotka.com
Object Enhancements
Temporary TS Groups
Oracle assigns users in a round-robin
fashion
ALTER <temporary tablespace
name> TABLESPACE GROUP
<group name>
Temporary TS must exist
www.DanHotka.com
Object Enhancements
New TS Features
(continued)
Bigfile Tablespace
Oracle10g allows for
65,536 total number of
files
Small TSs (regular TS)
up to 1022 files
32K block: 131,000GB
www.DanHotka.com
Object Enhancements
Transportable Tablespace
Enhanced to allow for cross-platform TS movements
V$Transportable_Platform to view supported
platforms and file types
Endian_Format
Big & Small
No conversion necessary if both source and target are of the
same format
Use RMAN to convert from one format type to another
www.DanHotka.com
Object Enhancements
IOTs
Support for List Partitioning
Support for LOBs
CLOB/NCLOB Support
New to_clob and to_nclob functions for
these long fields
BFILE to LOB
Loadfromfile2() function
Introduced in Oracle9i
LOBS, CLOBS, BLOBS now
supported
Bfile not supported
Replaces LOADFROMFILE
Allows BFILE to load into LOB
Allows for character set definition
www.DanHotka.com
Object Enhancements
Materialized Views
Fast refresh now supports
Self-joins
Views
Remote tables
Rewrite_or_Error Hint
Fails the SQL if it did not
do a rewrite
www.DanHotka.com
SQL Enhancements
Returning Clause
DML syntax
Useful to extract totals of
calculation
Can only be used on single
tables, MV, or views with
single tables
Contains a single-set
aggregate function
Can use rowid, etc, if DML
is only affecting 1 row
SQL Enhancements
Model function
Creates mutidimensional array
Spreadsheet Columns
Spreadsheet columns
Reference_spreadsheet
Main_spreadsheet
Spreadsheet_column_values
www.DanHotka.com
SQL Enhancements
REGEXP_INSTR
REGEXP_LIKE
REGEXP_REPLACE
Any POSIX operators
^ - beginning of line
$ - end of line
. match any char
\n match string
www.DanHotka.com
PL/SQL Enhancements
Optimizing compiler
Runtime improvements
Optimizer levels:
0 no optimization
1 moderate optimization
2 aggressive optimization
USER_PLSQL_Object_Settings
Compile-time warnings
Programmer-defined
quoting for strings
Floating Point data type
enhancements
Now uses native arithmetic
functions saving memory/time
www.DanHotka.com
Flashback Enhancements
Flashback Database
Flashback Transaction
History
rollback corruption
Syncronize DB with Standby
Flashback Standby DB
Undoes corruption
Flashback Drop
Flashback Table
www.DanHotka.com
Flashback Enhancements
www.DanHotka.com
Recycle Bin
Purge recyclebin
Purge recyclebin purges user_recyclebin
Purge dba_recyclebin
Purge tablespace <ts name> - purges all objects from this TS that were in the
recyclebin
www.DanHotka.com
Rman Enhancements
www.DanHotka.com
Rman Enhancements
Change-Aware Incremental
Backups
Cataloging
Much simpler to modify the
catalog
DB_Recovery_File_Dest_Size
DB_Recovery_File_Dest
Catalog
Uncatalog
V$Recovery_File_Dest
SQL*Plus Enhancements
New Variables
_date
_user
_privilege
Compatibility
Sqlplus c 9.0 .
Show recyclebin
DID you know
Set html markup on
www.DanHotka.com
SQL*Plus Enhancements
Tip on reading login.sql on each connectadd my little script again grant select on v$_instance to public
Login.sql
column INSTANCE_ID new_value INST_ID noprint
select HOST_NAME || ':' || INSTANCE_NAME || ':' || USER || '> ' INSTANCE_ID
from sys.v_$instance
/
set SQLPROMPT &&INST_ID
www.DanHotka.com
ROWID can be
eliminated from output
UNDO-REDO SQL
New Stuff:
Remove_logfile command
Support for:
CLOB
NCLOB
LONG
LONG Raq
Binary_Float
Binary_Double
IOTs
www.DanHotka.com
www.DanHotka.com
Additional Reading
www.DanHotka.com
Additional Reading
www.DanHotka.com
More Information
www. Ixora .com.au
Evdbt.com www. Sagelogix .com
www.jlcomp.demon.co.uk
Presentation downloads
www.DanHotka.com
www.DanHotka.com
www.DanHotka.com
Dan is a Training
Consultant
www.DanHotka.com