Download - Oracle Database 11g Release 1 For DBAs
![Page 1: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/1.jpg)
<Insert Picture Here>
Oracle Database 11g Release 1For DBAsThomas Kytehttp://asktom.oracle.com
![Page 2: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/2.jpg)
The Beginning...
• Data Model with Structure• Data Independent of Code• Set-oriented• 1977 the work begins
““A A Relational Model
Relational Model
forfor
Large Shared
Large Shared
Databanks”
Databanks”
E.F. Codd - 1970
![Page 3: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/3.jpg)
First RDBMS: Version 2 June 1979
• FIRST Commercial SQL RDBMS• Impressive First SQL
• Joins, Subqueries • Outer Joins, Connect By
• A Simple Server• No transactions, ‘Limited’ Reliability
• Portability from the Start• Written in Fortran• But multi-platform – PDP11, Dec VAX
![Page 4: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/4.jpg)
![Page 5: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/5.jpg)
Oracle7.3 February 1996
• Partitioned Views• Bitmapped Indexes• Asynchronous read ahead for
table scans• Standby Database• Deferred transaction recovery
on instance startup• Updatable Join View• SQLDBA no longer shipped.• Index rebuilds• DBV introduced• Context Option• PL/SQL - UTL_FILE
Spatial Data Option Tablespaces changes -
Coalesce, Temporary Permanent,
Trigger compilation, debug Unlimited extents on STORAGE
clause. Some init.ora parameters
modifiable - TIMED_STATISTICS HASH Joins, Antijoins Histograms Oracle Trace Advanced Replication Object
Groups
![Page 6: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/6.jpg)
![Page 7: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/7.jpg)
![Page 8: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/8.jpg)
![Page 9: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/9.jpg)
Encrypted
Tablespaces
![Page 10: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/10.jpg)
Encrypted Tablespaces
• Oracle Database 10g Release 2 introduced column encryption• Could not range scan• Primary/foreign key issues
• Tablespace encryption Removes those limitations
• Many encryption algorithms• 3DES168• AES128• AES192• AES256 Demo: encrypt.sql
![Page 11: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/11.jpg)
Standby Just
got better
![Page 12: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/12.jpg)
Standby Database
• Logical Standby was…• Limited in type support• But was always open for business
• Physical Standby was…• Easy• But considered “not useful day to day”
![Page 13: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/13.jpg)
Standby Database
• Logical Standby has…• XMLType support• DBMS_RLS & DBMS_FGA support• TDE support
![Page 14: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/14.jpg)
Active Data Guard: Develop & Test on Standby DB
• Use physical standby databasefor development & testing• Preserves zero data loss in test/dev mode
• Flashback DB to back-outchanges & use as standby
ProductionDatabase
Standby Database
Developers,Testers
Eliminates cost of idle DR system
![Page 15: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/15.jpg)
Active Data Guard: Report & Backup from Standby DB
• Offload reporting to standby• Simultaneously available for recovery
• Offload backups to standby• Complete database and fast incremental
backups
ProductionDatabase
Standby Database
Reporting
Backups
Improves performance on production database
![Page 16: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/16.jpg)
Real
Application
Testing
![Page 17: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/17.jpg)
Real Application Testing –Database Replay
• Recreate actual production database workload
• Capture production workload incl. concurrency
• Replay workload in test with production timing
• Analyze & fix issues before production
MiddleTier
Capture DB Workload
Storage
OracleDB servers Replay DB
Workload
ProductionEnvironment
Test (RAC)Environment`
![Page 18: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/18.jpg)
Smaller more
secure DMP
files
![Page 19: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/19.jpg)
Datapump
• COMPRESSION• ALL, DATA_ONLY, METADATA_ONLY, NONE
• ENCRYPTION• All• Data_only• Metadata_only• None• Encrypted_columns_only
• PARTITION_OPTIONS• Impdp
• None• Departition• Merge
• REUSE_DUMPFILES
• Ability to use DML error logging like features • DATA_OPTIONS parameter
Demo: dp.sql
![Page 20: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/20.jpg)
Virtual
Columns
![Page 21: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/21.jpg)
Virtual Columns
• Create Table
• Alter Table Add Column
• Are ‘column expressions’• Expressions involving other columns in table• Constants• Deterministic functions
• Ease of use and Optimizer enhancementDemo: vc.sql
![Page 22: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/22.jpg)
Partitioning
just got better
![Page 23: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/23.jpg)
Partitioning
• Composite Completely
• Virtual Column Partitioning
• Partition by Reference
• Interval Partitioning
![Page 24: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/24.jpg)
Range List Hash
Range 9i 8i
List
• Partition on virtual (computed) columns • New composite partitioning
Range List Hash
Range 11g 9i 8i
List 11g 11g 11g
JANFEB
>5000
1000-
5000
ORDERS
RANGE-RANGEOrder Date by
Order Value
USA EUROPE
>5000
1000-
5000
ORDERS
LIST-RANGERegion by
Order Value
USA EUROPE
Gold
SilverORDERS
LIST-LISTRegion by
Customer Type
Enhanced Partitioning
![Page 25: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/25.jpg)
Partitioningby REFERENCE
Table ORDERS
Jan 2006
... ...
Feb 2006
Table LINEITEMS
Jan 2006
... ...
Feb 2006
• RANGE(order_date)• Primary key order_id
• RANGE(order_date)• Foreign key order_id
• Partitioning key inherited through PK-FK relationship
• Avoids redundant storage, maintenance of order_date
Demo: part1.sql
![Page 26: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/26.jpg)
New “INTERVAL” partitioning
• Automatically creates a new partition when data outside the existing range is first inserted • E.g., monthly partitions, automatic
new partition first day of the month
• Composite partitioning: interval, interval-list, interval-hash, and interval-range
• Automates partition management
ORDERS
Jul Aug Sep
Sep 1 2007
PartitioningAutomation
Demo: part2.sql
![Page 27: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/27.jpg)
Flashback Data
Archive
![Page 28: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/28.jpg)
Flashback Data ArchiveTotal Data Recall
• Tamper-proof data archive• Efficient storage and
retrieval of undo • Keep data for months,
years, decades!• Fast access to even very
old data• View data, versions of
rows as of any time
• Control data retention time, purging of data
User Tablespaces
Flashback Data Archive
Oracle 11g Database
Select * from orders AS OF ‘Midnight 31-Dec-2004’
Changes ArchiveArchiveTablesTables
![Page 29: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/29.jpg)
Finer Grained
Dependency
Tracking
![Page 30: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/30.jpg)
Finer Grained Dependency Tracking
• Fewer Invalidations• Add to a specification – so what• Add/Drop/Modify a column – so what• Holds true with view modifications too• Change a synonym pointer – so what• Replace a procedure – so what
![Page 31: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/31.jpg)
Cache More
Stuff
![Page 32: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/32.jpg)
Cache More
• Everyone knows the fastest way to do something is – to not do it• Client Side Cache• Server Results Cache (JIT-MV)• PL/SQL Function results cache
![Page 33: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/33.jpg)
Single Memory
Setting
![Page 34: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/34.jpg)
Single Memory Parameter
• Well, Two • MEMORY_TARGET• MEMORY_MAX_TARGET
• Sizes PGA and SGA• Not every platform:
• Linux, Solaris, Windows, HP-UX, AIX
• As with automatic SGA memory management in 10g – you can set lower bounds for various segments
![Page 35: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/35.jpg)
New Diagnostics
Area
Demo: diag.sql
![Page 36: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/36.jpg)
Invisible Indexes
![Page 37: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/37.jpg)
Invisible Indexes
• Can create them that way
• Can alter them to be that way
• Why?• Testing of course• How will plans change if we add this index• How will plans change if we remove this
index• OPTIMIZER_USE_INVISIBLE_INDEXES
![Page 38: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/38.jpg)
Database
Resident
Connection
Pooling
![Page 39: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/39.jpg)
DRCP
• Anyone out there remember prespawned servers?• This is similar.
• Pool of dedicated servers that can be reused• Instead of 50 app servers pooling 50
connections each (250 dedicated servers) – we’ll be able to have 50 app servers share 50 dedicated servers
• PHP right now, others later.
![Page 40: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/40.jpg)
DDL that waits
![Page 41: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/41.jpg)
Blocking DDL
• Sometimes, it mattered not how many times you hit the / key – it was never going to happen
Demo: wait.sql
![Page 42: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/42.jpg)
Alter table T read
only
![Page 43: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/43.jpg)
True ONLINE
index build
![Page 44: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/44.jpg)
Disabled Triggers
![Page 45: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/45.jpg)
Disabled Triggers
• Safer way to install code• Same thoughts as invisible indexes.
create or replace trigger Trg before insert on My_Table for each row disablebegin :New.ID := My_Seq.Nextvak;end;/
![Page 46: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/46.jpg)
Data Recovery
Advisor
![Page 47: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/47.jpg)
Data Recovery Advisor
• Analyzes failures based on symptoms• e.g. “Open failed” because datafiles missing
• Intelligently determines repair strategies• Aggregates failures for efficient repair
• e.g. for many bad blocks restore entire file
• Presents only feasible repair options• Are there backups? • Is there a standby database?
• Ranked by repair time and data loss
• Can automatically perform repairs
![Page 48: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/48.jpg)
<Insert Picture Here>
AQ&
![Page 49: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/49.jpg)
![Page 50: Oracle Database 11g Release 1 For DBAs](https://reader036.vdocuments.mx/reader036/viewer/2022062305/56814afd550346895db81179/html5/thumbnails/50.jpg)