You are on page 1of 31

Part I What Is Oracle?

1. 1 Introduction to the Oracle Server

1.1. Database Structure and Space Management Overview

1.1.1. Logical Database Structures

1.1.2. Schemas and Schema Objects


1.1.3. Data Blocks, Extents, and Segments
1.1.4. Tablespaces

1.1.5. Physical Database Structures

1.1.6. Datafiles
1.1.7. Redo Log Files
1.1.8. Control Files
1.1.9. Data Utilities

1.1.10. Data Dictionary Overview

1.2. Data Access Overview

1.2.1. SQL Overview

1.2.2. SQL Statements

1.2.3. Objects Overview

1.2.4. Advantages of Objects

1.2.5. PL/SQL Overview

1.2.6. PL/SQL Program Units

1.2.7. Java Overview


1.2.8. XML Overview
1.2.9. Transactions Overview

1.2.10. Commit and Roll Back Transactions


1.2.11. Savepoints
1.2.12. Data Consistency Using Transactions

1.2.13. Data Integrity Overview

1.2.14. Integrity Constraints


1.2.15. Keys
1.2.16. SQL*Plus Overview

1.3. Memory Structure and Processes Overview

1.3.1. An Oracle Instance

1.3.2. Real Application Clusters: Multiple Instance Systems

1.3.3. Memory Structures

1.3.4. System Global Area


1.3.5. Program Global Area

1.3.6. Process Architecture

1.3.7. User (Client) Processes


1.3.8. Oracle Processes

1.3.9. The Program Interface Mechanism

1.3.10. Communications Software and Oracle Net Services

1.3.11. An Example of How Oracle Works

1.4. Application Architecture Overview

1.4.1. Client/Server Architecture

1.4.2. The Client


1.4.3. The Server

1.4.4. Multitier Architecture: Application Servers

1.5. Distributed Databases Overview

1.5.1. Location Transparency


1.5.2. Site Autonomy
1.5.3. Distributed Data Manipulation
1.5.4. Two-Phase Commit

1.5.5. Replication Overview

1.5.6. Table Replication


1.5.7. Multitier Materialized Views
1.5.8. Streams Overview
1.5.9. Advanced Queuing Overview
1.5.10. Heterogeneous Services Overview

1.6. Data Concurrency and Consistency Overview

1.6.1. Concurrency
1.6.2. Read Consistency

1.6.3. Read Consistency, Undo Records, and Transactions


1.6.4. Read-Only Transactions

1.6.5. Locking Mechanisms

1.6.6. Automatic Locking


1.6.7. Manual Locking

1.6.8. Quiesce Database

1.7. Database Security Overview

1.7.1. Security Mechanisms

1.7.2. Database Users and Schemas


1.7.3. Privileges
1.7.4. Roles
1.7.5. Storage Settings and Quotas
1.7.6. Profiles and Resource Limits
1.7.7. Selective Auditing of User Actions
1.7.8. Fine-Grained Auditing

1.8. Database Administration Overview

1.8.1. Enterprise Manager Overview


1.8.2. Database Backup and Recovery Overview

1.8.3. Why Recovery Is Important


1.8.4. Types of Failures
1.8.5. Structures Used for Recovery

1.9. Data Warehousing Overview

1.9.1. Differences Between Data Warehouse and OLTP Systems

1.9.2. Workload
1.9.3. Data Modifications
1.9.4. Schema Design
1.9.5. Typical Operations
1.9.6. Historical Data

1.9.7. Data Warehouse Architecture

1.9.8. Data Warehouse Architecture (Basic)


1.9.9. Data Warehouse Architecture (with a Staging Area)
1.9.10. Data Warehouse Architecture (with a Staging Area and Data
Marts)

1.9.11. Materialized Views


1.9.12. OLAP Overview
1.9.13. Change Data Capture Overview

1.10. High Availability Overview

1.10.1. Transparent Application Failover

1.10.2. Elements Affected by Transparent Application Failover

1.10.3. Online Reorganization Architecture


1.10.4. Data Guard Overview

1.10.5. Data Guard Configurations


1.10.6. Data Guard Components

1.10.7. LogMiner Overview


1.10.8. Real Application Clusters
1.10.9. Real Application Clusters Guard

1.11. Content Management Overview

1.11.1. Oracle Internet File System Overview

Part II Database Structures


2. 2 Data Blocks, Extents, and Segments

2.1. Introduction to Data Blocks, Extents, and Segments


2.2. Data Blocks Overview

2.2.1. Data Block Format

2.2.2. Header (Common and Variable)


2.2.3. Table Directory
2.2.4. Row Directory
2.2.5. Overhead
2.2.6. Row Data
2.2.7. Free Space

2.2.8. Free Space Management

2.2.9. Availability and Compression of Free Space in a Data Block


2.2.10. Row Chaining and Migrating
2.2.11. PCTFREE, PCTUSED, and Row Chaining

2.3. Extents Overview

2.3.1. When Extents Are Allocated


2.3.2. Determine the Number and Size of Extents
2.3.3. How Extents Are Allocated
2.3.4. When Extents Are Deallocated

2.3.5. Extents in Nonclustered Tables


2.3.6. Extents in Clustered Tables
2.3.7. Extents in Materialized Views and Their Logs
2.3.8. Extents in Indexes
2.3.9. Extents in Temporary Segments
2.3.10. Extents in Rollback Segments

2.4. Segments Overview

2.4.1. Introduction to Data Segments


2.4.2. Introduction to Index Segments
2.4.3. Introduction to Temporary Segments

2.4.4. Operations that Require Temporary Segments


2.4.5. Segments in Temporary Tables and Their Indexes
2.4.6. How Temporary Segments Are Allocated

2.4.7. Automatic Undo Management

2.4.8. Undo Mode


2.4.9. Undo Quota
2.4.10. Undo Retention Control
2.4.11. External Views

3. 3 Tablespaces, Datafiles, and Control Files

3.1. Introduction to Tablespaces, Datafiles, and Control Files

3.1.1. Oracle-Managed Files


3.1.2. Allocate More Space for a Database

3.2. Tablespaces Overview

3.2.1. The SYSTEM Tablespace

3.2.2. The Data Dictionary


3.2.3. PL/SQL Program Units Description

3.2.4. Undo Tablespaces

3.2.5. Creation of Undo Tablespaces


3.2.6. Assignment of Undo Tablespaces

3.2.7. Default Temporary Tablespace

3.2.8. How to Specify a Default Temporary Tablespace

3.2.9. Using Multiple Tablespaces


3.2.10. Managing Space in Tablespaces

3.2.11. Locally Managed Tablespaces


3.2.12. Segment Space Management in Locally Managed Tablespaces
3.2.13. Dictionary Managed Tablespaces

3.2.14. Multiple Block Sizes


3.2.15. Online and Offline Tablespaces

3.2.16. When a Tablespace Goes Offline


3.2.17. Use of Tablespaces for Special Procedures

3.2.18. Read-Only Tablespaces


3.2.19. Temporary Tablespaces for Sort Operations

3.2.20. Sort Segments


3.2.21. Creation of Temporary Tablespaces

3.2.22. Transport of Tablespaces Between Databases

3.2.23. How to Move or Copy a Tablespace to Another Database

3.3. Datafiles Overview

3.3.1. Datafile Contents


3.3.2. Size of Datafiles
3.3.3. Offline Datafiles
3.3.4. Temporary Datafiles

3.4. Control Files Overview

3.4.1. Control File Contents


3.4.2. Multiplexed Control Files

4. 4 The Data Dictionary

4.1. Introduction to the Data Dictionary

4.1.1. Structure of the Data Dictionary

4.1.2. Base Tables


4.1.3. User-Accessible Views

4.1.4. SYS, Owner of the Data Dictionary

4.2. How the Data Dictionary Is Used

4.2.1. How Oracle Uses the Data Dictionary

4.2.2. Public Synonyms for Data Dictionary Views


4.2.3. Cache the Data Dictionary for Fast Access
4.2.4. Other Programs and the Data Dictionary

4.2.5. How to Use the Data Dictionary

4.2.6. Views with the Prefix USER


4.2.7. Views with the Prefix ALL
4.2.8. Views with the Prefix DBA
4.2.9. The DUAL Table

4.3. Dynamic Performance Tables


4.4. Database Object Metadata

Part III The Oracle Instance


5. 5 Database and Instance Startup and Shutdown

5.1. Introduction to an Oracle Instance

5.1.1. The Instance and the Database


5.1.2. Connection with Administrator Privileges
5.1.3. Initialization Parameter Files

5.1.4. How Parameter Values Are Changed


5.2. Instance and Database Startup

5.2.1. How an Instance Is Started

5.2.2. Restricted Mode of Instance Startup


5.2.3. Forced Startup in Abnormal Situations

5.2.4. How a Database Is Mounted

5.2.5. How a Database Is Mounted with Real Application Clusters


5.2.6. How a Standby Database Is Mounted
5.2.7. How a Clone Database Is Mounted

5.2.8. What Happens When You Open a Database

5.2.9. Instance Recovery


5.2.10. Undo Space Acquisition and Management
5.2.11. Resolution of In-Doubt Distributed Transaction
5.2.12. Open a Database in Read-Only Mode

5.3. Database and Instance Shutdown

5.3.1. Close a Database

5.3.2. Close the Database by Terminating the Instance

5.3.3. Unmount a Database


5.3.4. Shut Down an Instance

5.3.5. Abnormal Instance Shutdown

6. 6 Application Architecture

6.1. Client/Server Architecture


6.2. Multitier Architecture

6.2.1. Clients
6.2.2. Application Servers
6.2.3. Database Servers

6.3. Oracle Net Services

6.3.1. Connectivity
6.3.2. Manageability
6.3.3. Internet Scalability
6.3.4. Internet Security

6.3.5. How Oracle Net Services Works


6.3.6. The Listener

6.3.7. Service Information Registration

7. 7 Memory Architecture

7.1. Introduction to Oracle Memory Structures


7.2. System Global Area (SGA) Overview

7.2.1. Dynamic SGA

7.2.2. Dynamic SGA Granules

7.2.3. Database Buffer Cache

7.2.4. Organization of the Database Buffer Cache


7.2.5. The LRU Algorithm and Full Table Scans
7.2.6. Size of the Database Buffer Cache
7.2.7. Multiple Buffer Pools

7.2.8. Redo Log Buffer


7.2.9. Shared Pool

7.2.10. Library Cache


7.2.11. Shared SQL Areas and Private SQL Areas
7.2.12. PL/SQL Program Units and the Shared Pool
7.2.13. Dictionary Cache
7.2.14. Allocation and Reuse of Memory in the Shared Pool

7.2.15. Large Pool


7.2.16. Control of the SGA's Use of Memory
7.2.17. Other SGA Initialization Parameters

7.2.18. Physical Memory


7.2.19. SGA Starting Address
7.2.20. Extended Buffer Cache Mechanism

7.3. Program Global Areas (PGA) Overview

7.3.1. Content of the PGA

7.3.2. Private SQL Area


7.3.3. Session Memory
7.3.4. SQL Work Areas
7.3.5. PGA Memory Management for Dedicated Mode

7.4. Dedicated and Shared Servers


7.5. Software Code Areas

8. 8 Process Architecture

8.1. Introduction to Processes

8.1.1. Multiple-Process Oracle Systems


8.1.2. Types of Processes

8.2. User Processes Overview

8.2.1. Connections and Sessions

8.3. Oracle Processes Overview

8.3.1. Server Processes


8.3.2. Background Processes

8.3.3. Database Writer Process (DBWn)


8.3.4. Log Writer Process (LGWR)
8.3.5. Checkpoint Process (CKPT)
8.3.6. System Monitor Process (SMON)
8.3.7. Process Monitor Process (PMON)
8.3.8. Recoverer Process (RECO)
8.3.9. Job Queue Processes
8.3.10. Archiver Processes (ARCn)
8.3.11. Lock Manager Server Process (LMS)
8.3.12. Queue Monitor Processes (QMNn)

8.3.13. Trace Files and the Alert Log

8.4. Shared Server Architecture

8.4.1. Scalability
8.4.2. Dispatcher Request and Response Queues

8.4.3. Dispatcher Processes (Dnnn)

8.4.4. Shared Server Processes (Snnn)


8.4.5. Restricted Operations of the Shared Server
8.5. Dedicated Server Configuration
8.6. The Program Interface

8.6.1. Program Interface Structure


8.6.2. Program Interface Drivers
8.6.3. Communications Software for the Operating System

9. 9 Database Resource Management

9.1. Introduction to the Database Resource Manager

9.1.1. Database Resource Manager Overview


9.1.2. Example of a Simple Resource Plan

9.2. How the Database Resource Manager Works

9.2.1. Resource Control

9.2.2. Example of Resource Control


9.2.3. Effectiveness of the Database Resource Manager

9.2.4. Database Integration


9.2.5. Performance Overhead

9.3. Resource Plans and Resource Consumer Groups

9.3.1. Activation of a Resource Plan

9.3.2. Persistent
9.3.3. Dynamic

9.3.4. Groups of Resource Plans

9.4. Resource Allocation Methods and Resource Plan Directives

9.4.1. Resource Plan Directives

9.4.2. CPU Method


9.4.3. Active Session Pool with Queuing
9.4.4. Degree of Parallelism Limit
9.4.5. Automatic Consumer Group Switching
9.4.6. Execution Time Limit
9.4.7. Undo Pool

9.4.8. CPU Resource Allocation


9.4.9. CPU Allocation Rules
9.4.10. Levels and Priorities

9.5. Interaction with Operating-System Resource Control

9.5.1. Dynamic Reconfiguration

Part IV Data
10. 10 Schema Objects

10.1. Introduction to Schema Objects


10.2. Tables

10.2.1. How Table Data Is Stored

10.2.2. Row Format and Size


10.2.3. Rowids of Row Pieces
10.2.4. Column Order

10.2.5. Nulls Indicate Absence of Value


10.2.6. Default Values for Columns

10.2.7. Default Value Insertion and Integrity Constraint Checking

10.2.8. Partitioned Tables


10.2.9. Nested Tables
10.2.10. Temporary Tables

10.2.11. Segment Allocation


10.2.12. Parent and Child Transactions

10.2.13. External Tables

10.2.14. The Access Driver


10.2.15. Data Loading with External Tables
10.2.16. Parallel Access to External Tables

10.3. Views

10.3.1. How Views are Stored


10.3.2. How Views Are Used
10.3.3. Mechanics of Views

10.3.4. Globalization Support Parameters in Views


10.3.5. Use of Indexes Against Views
10.3.6. Dependencies and Views
10.3.7. Updatable Join Views
10.3.8. Object Views
10.3.9. Inline Views

10.4. Materialized Views

10.4.1. Define Constraints on Views


10.4.2. Refresh Materialized Views
10.4.3. Materialized View Logs

10.5. Dimensions
10.6. The Sequence Generator
10.7. Synonyms
10.8. Indexes

10.8.1. Unique and Nonunique Indexes


10.8.2. Composite Indexes
10.8.3. Indexes and Keys
10.8.4. Indexes and Nulls
10.8.5. Function-Based Indexes

10.8.6. Uses of Function-Based Indexes


10.8.7. Optimization with Function-Based Indexes
10.8.8. Dependencies of Function-Based Indexes

10.8.9. How Indexes Are Stored

10.8.10. Format of Index Blocks


10.8.11. The Internal Structure of Indexes
10.8.12. Index Properties
10.8.13. Advantages of B-tree Structure

10.8.14. How Indexes Are Searched

10.8.15. Index Unique Scan


10.8.16. Index Range Scan
10.8.17. Index Range Scan Descending

10.8.18. Key Compression

10.8.19. Prefix and Suffix Entries


10.8.20. Performance and Storage Considerations
10.8.21. Uses of Key Compression

10.8.22. Reverse Key Indexes


10.8.23. Bitmap Indexes

10.8.24. Benefits for Data Warehousing Applications


10.8.25. Cardinality
10.8.26. Bitmap Index Example
10.8.27. Bitmap Indexes and Nulls
10.8.28. Bitmap Indexes on Partitioned Tables

10.8.29. Bitmap Join Indexes

10.8.30. Four Join Models


10.8.31. Creation of a Bitmap Join Index

10.9. Index-Organized Tables

10.9.1. Benefits of Index-Organized Tables


10.9.2. Index-Organized Tables with Row Overflow Area
10.9.3. Secondary Indexes on Index-Organized Tables
10.9.4. Bitmap Indexes on Index-Organized Tables

10.9.5. Mapping Table

10.9.6. Partitioned Index-Organized Tables


10.9.7. B-tree Indexes on UROWID Columns for Heap- and Index-
Organized Tables
10.9.8. Index-Organized Table Applications

10.10. Application Domain Indexes


10.11. Clusters
10.12. Hash Clusters

11. 11 Partitioned Tables and Indexes

11.1. Introduction to Partitioning

11.1.1. Partition Key


11.1.2. Partitioned Tables
11.1.3. Partitioned Index-Organized Tables

11.2. Partitioning Methods

11.2.1. Range Partitioning

11.2.2. Range Partitioning Example

11.2.3. List Partitioning


11.2.4. List Partitioning Example

11.2.5. Hash Partitioning

11.2.6. Hash Partitioning Example

11.2.7. Composite Partitioning

11.2.8. Composite Partitioning Range-Hash Example


11.2.9. Composite Partitioning Range-List Example

11.2.10. When to Partition a Table

11.3. Partitioned Indexes

11.3.1. Local Partitioned Indexes


11.3.2. Global Partitioned Indexes

11.3.3. Maintenance of Global Partitioned Indexes

11.3.4. Global Nonpartitioned Indexes


11.3.5. Partitioned Index Examples

11.3.6. Example of Index Creation: Starting Table Used for Examples


11.3.7. Example of a Local Index Creation
11.3.8. Example of a Global Index Creation
11.3.9. Example of a Global Partitioned Index Creation
11.3.10. Example of a Partitioned Index-Organized Table Creation

11.3.11. Miscellaneous Information about Creating Indexes on Partitioned


Tables
11.3.12. Using Partitioned Indexes in OLTP Applications
11.3.13. Using Partitioned Indexes in Data Warehousing and DSS
Applications
11.3.14. Partitioned Indexes on Composite Partitions

11.4. Partitioning to Improve Performance

11.4.1. Partition Pruning

11.4.2. Partition Pruning Example

11.4.3. Partition-wise Joins


11.4.4. Parallel DML
12. 12 Native Datatypes

12.1. Introduction to Oracle Datatypes


12.2. Character Datatypes

12.2.1. CHAR Datatype


12.2.2. VARCHAR2 and VARCHAR Datatypes

12.2.3. VARCHAR Datatype

12.2.4. Length Semantics for Character Datatypes


12.2.5. NCHAR and NVARCHAR2 Datatypes

12.2.6. NCHAR
12.2.7. NVARCHAR2

12.2.8. Use of Unicode Data in an Oracle Database

12.2.9. Implicit Type Conversion

12.2.10. LOB Character Datatypes


12.2.11. LONG Datatype

12.3. NUMBER Datatype

12.3.1. Internal Numeric Format

12.4. DATE Datatype

12.4.1. Use of Julian Dates


12.4.2. Date Arithmetic
12.4.3. Centuries and the Year 2000
12.4.4. Daylight Savings Support
12.4.5. Time Zones

12.4.6. Example:

12.5. LOB Datatypes

12.5.1. BLOB Datatype


12.5.2. CLOB and NCLOB Datatypes
12.5.3. BFILE Datatype

12.6. RAW and LONG RAW Datatypes


12.7. ROWID and UROWID Datatypes
12.7.1. The ROWID Pseudocolumn
12.7.2. Physical Rowids

12.7.3. Extended Rowids


12.7.4. Restricted Rowids
12.7.5. Examples of Rowid Use
12.7.6. How Rowids Are Used

12.7.7. Logical Rowids

12.7.8. Comparison of Logical Rowids with Physical Rowids


12.7.9. Guesses in Logical Rowids

12.7.10. Rowids in Non-Oracle Databases

12.8. ANSI, DB2, and SQL/DS Datatypes


12.9. XML Datatypes

12.9.1. XMLType Datatype

12.10. URI Datatypes


12.11. Data Conversion

13. 13 Object Datatypes and Object Views

13.1. Introduction to Object Datatypes

13.1.1. Complex Data Models

13.1.2. Complex Data Model Example

13.1.3. Multimedia Datatypes

13.2. Object Datatype Categories

13.2.1. Object Types

13.2.2. Purchase Order Example


13.2.3. Types of Methods
13.2.4. Object Tables
13.2.5. Object Identifiers
13.2.6. Object Views Description
13.2.7. REFs

13.2.8. Collection Types


13.2.9. VARRAYs
13.2.10. Nested Tables Description

13.3. Type Inheritance

13.3.1. FINAL and NOT FINAL Types

13.3.2. Example of Creating a NOT FINAL Object Type

13.3.3. NOT INSTANTIABLE Types and Methods

13.4. User-Defined Aggregate Functions

13.4.1. Why Have User-Defined Aggregate Functions?


13.4.2. Creation and Use of UDAGs
13.4.3. How Do Aggregate Functions Work?

13.5. Application Interfaces

13.5.1. SQL
13.5.2. PL/SQL
13.5.3. Pro*C/C++

13.5.4. Dynamic Creation and Access of Type Descriptions

13.5.5. OCI
13.5.6. OTT
13.5.7. JPublisher
13.5.8. JDBC
13.5.9. SQLJ

13.5.10. SQLJ Object Types

13.6. Datatype Evolution


13.7. Introduction to Object Views

13.7.1. Advantages of Object Views


13.7.2. How Object Views Are Defined
13.7.3. Use of Object Views
13.7.4. Updates of Object Views
13.7.5. Updates of Nested Table Columns in Views
13.7.6. View Hierarchies

Part V Data Access


14. 14 SQL, PL/SQL, and Java
14.1. SQL Overview

14.1.1. SQL Statements

14.1.2. Data Manipulation Language Statements


14.1.3. Data Definition Language Statements
14.1.4. Transaction Control Statements
14.1.5. Session Control Statements
14.1.6. System Control Statements
14.1.7. Embedded SQL Statements

14.1.8. Identification of Nonstandard SQL


14.1.9. Recursive SQL
14.1.10. Cursors

14.1.11. Scrollable Cursors

14.1.12. Shared SQL


14.1.13. Parsing
14.1.14. SQL Processing

14.1.15. SQL Statement Execution


14.1.16. DML Statement Processing
14.1.17. DDL Statement Processing
14.1.18. Control of Transactions

14.1.19. The Optimizer Overview

14.1.20. Execution Plans

14.2. PL/SQL Overview

14.2.1. How PL/SQL Runs

14.2.2. Native Execution


14.2.3. Interpreted Execution

14.2.4. Language Constructs for PL/SQL

14.2.5. Variables and Constants


14.2.6. Cursors
14.2.7. Exceptions
14.2.8. Dynamic SQL in PL/SQL

14.2.9. PL/SQL Program Units


14.2.10. Stored Procedures and Functions
14.2.11. PL/SQL Packages

14.2.12. PL/SQL Collections and Records

14.2.13. Collections
14.2.14. Records

14.2.15. PL/SQL Server Pages

14.3. Java Overview

14.3.1. Java and Object-Oriented Programming Terminology

14.3.2. Classes

14.3.3. Class Hierarchy


14.3.4. Interfaces
14.3.5. Polymorphism
14.3.6. The Java Virtual Machine (JVM)
14.3.7. Why Use Java in Oracle?

14.3.8. Multithreading
14.3.9. Automated Storage Management
14.3.10. Footprint
14.3.11. Performance
14.3.12. Dynamic Class Loading

14.3.13. Oracle's Java Application Strategy

14.3.14. Java Stored Procedures


14.3.15. PL/SQL Integration and Oracle RDBMS Functionality

15. 15 Dependencies Among Schema Objects

15.1. Introduction to Dependency Issues


15.2. Resolution of Schema Object Dependencies

15.2.1. Compilation of Views and PL/SQL Program Units

15.2.2. Views and Base Tables


15.2.3. Program Units and Referenced Objects
15.2.4. Data Warehousing Considerations
15.2.5. Session State and Referenced Packages
15.2.6. Security Authorizations
15.2.7. Function-Based Index Dependencies

15.2.8. Requirements
15.2.9. DETERMINISTIC Functions
15.2.10. Privileges on the Defining Function
15.2.11. Resolve Dependencies of Function-Based Indexes

15.3. Object Name Resolution


15.4. Shared SQL Dependency Management
15.5. Local and Remote Dependency Management

15.5.1. Management of Local Dependencies


15.5.2. Management of Remote Dependencies

15.5.3. Dependencies Among Local and Remote Database Procedures


15.5.4. Dependencies Among Other Remote Schema Objects
15.5.5. Dependencies of Applications

16. 16 Transaction Management

16.1. Introduction to Transactions

16.1.1. Statement Execution and Transaction Control


16.1.2. Statement-Level Rollback
16.1.3. Resumable Space Allocation

16.2. Transaction Management Overview

16.2.1. Commit Transactions


16.2.2. Rollback of Transactions
16.2.3. Savepoints In Transactions
16.2.4. Transaction Naming

16.2.5. How Transactions Are Named


16.2.6. Commit Comment

16.2.7. The Two-Phase Commit Mechanism

16.3. Discrete Transaction Management


16.4. Autonomous Transactions

16.4.1. Autonomous PL/SQL Blocks


16.4.2. Transaction Control Statements in Autonomous Blocks

17. 17 Triggers
17.1. Introduction to Triggers

17.1.1. How Triggers Are Used

17.1.2. Some Cautionary Notes about Triggers


17.1.3. Triggers Compared with Declarative Integrity Constraints

17.2. Parts of a Trigger

17.2.1. The Triggering Event or Statement


17.2.2. Trigger Restriction
17.2.3. Trigger Action

17.3. Types of Triggers

17.3.1. Row Triggers and Statement Triggers

17.3.2. Row Triggers


17.3.3. Statement Triggers

17.3.4. BEFORE and AFTER Triggers

17.3.5. BEFORE Triggers


17.3.6. AFTER Triggers
17.3.7. Trigger Type Combinations

17.3.8. INSTEAD OF Triggers

17.3.9. Modify Views


17.3.10. Views That Are Not Modifiable
17.3.11. INSTEAD OF Triggers on Nested Tables

17.3.12. Triggers on System Events and User Events

17.3.13. Event Publication


17.3.14. Event Attributes
17.3.15. System Events
17.3.16. User Events

17.4. Trigger Execution

17.4.1. The Execution Model for Triggers and Integrity Constraint


Checking
17.4.2. Data Access for Triggers
17.4.3. Storage of PL/SQL Triggers
17.4.4. Execution of Triggers
17.4.5. Dependency Maintenance for Triggers

Part VI Parallel SQL and Direct-Load INSERT


18. 18 Parallel Execution of SQL Statements

18.1. Introduction to Parallel Execution

18.1.1. When to Implement Parallel Execution


18.1.2. When Not to Implement Parallel Execution

18.2. How Parallel Execution Works

18.2.1. Parallelized SQL Statements

18.2.2. Parallelism Between Operations

18.2.3. Degree of Parallelism


18.2.4. Parallel Query Intra- and Inter-Operation Example

18.3. SQL Operations That Can Be Parallelized

18.3.1. Parallel Query


18.3.2. Parallel DDL

18.3.3. DDL Statements that can be Parallelized

18.3.4. Parallel DML


18.3.5. SQL*Loader
18.3.6. How to Make a Statement Run in Parallel

18.3.7. Parallel Query


18.3.8. Parallel DDL
18.3.9. Parallel DML

19. 19 Direct-Path INSERT

19.1. Introduction to Direct-Path INSERT


19.2. Advantages of Direct-Path INSERT
19.3. Serial and Parallel Direct-Path INSERT
19.4. Direct-Path INSERT Into Partitioned and Nonpartitioned Tables

19.4.1. Serial Direct-Path INSERT into Partitioned and Nonpartitioned


Tables
19.4.2. Parallel Direct-Path INSERT into Partitioned Tables
19.4.3. Parallel Direct-Path INSERT into Nonpartitioned Tables
19.5. Direct-Path INSERT and Logging Mode

19.5.1. Direct-Path INSERT with Logging


19.5.2. Direct-Path INSERT without Logging

19.6. Additional Considerations for Direct-Path INSERT

19.6.1. Index Maintenance with Direct-Path INSERT


19.6.2. Space Considerations with Direct-Path INSERT
19.6.3. Locking Considerations with Direct-Path INSERT

Part VII Data Protection


20. 20 Data Concurrency and Consistency

20.1. Introduction to Data Concurrency and Consistency in a Multiuser


Environment

20.1.1. Preventable Phenomena and Transaction Isolation Levels


20.1.2. Overview of Locking Mechanisms

20.2. How Oracle Manages Data Concurrency and Consistency

20.2.1. Multiversion Concurrency Control


20.2.2. Statement-Level Read Consistency
20.2.3. Transaction-Level Read Consistency
20.2.4. Read Consistency with Real Application Clusters
20.2.5. Oracle Isolation Levels

20.2.6. Set the Isolation Level


20.2.7. Read Committed Isolation
20.2.8. Serializable Isolation

20.2.9. Comparison of Read Committed and Serializable Isolation

20.2.10. Transaction Set Consistency


20.2.11. Row-Level Locking
20.2.12. Referential Integrity
20.2.13. Distributed Transactions

20.2.14. Choice of Isolation Level

20.2.15. Read Committed Isolation


20.2.16. Serializable Isolation
20.2.17. Quiesce Database

20.3. How Oracle Locks Data


20.3.1. Transactions and Data Concurrency

20.3.2. Modes of Locking


20.3.3. Lock Duration
20.3.4. Data Lock Conversion Versus Lock Escalation

20.3.5. Deadlocks

20.3.6. Deadlock Detection


20.3.7. Avoid Deadlocks

20.3.8. Types of Locks


20.3.9. DML Locks

20.3.10. Row Locks (TX)


20.3.11. Table Locks (TM)
20.3.12. DML Locks Automatically Acquired for DML Statements

20.3.13. DDL Locks

20.3.14. Exclusive DDL Locks


20.3.15. Share DDL Locks
20.3.16. Breakable Parse Locks
20.3.17. Duration of DDL Locks
20.3.18. DDL Locks and Clusters

20.3.19. Latches and Internal Locks

20.3.20. Latches
20.3.21. Internal Locks

20.3.22. Explicit (Manual) Data Locking

20.3.23. Examples of Concurrency under Explicit Locking

20.3.24. Oracle Lock Management Services

20.4. Flashback Query

20.4.1. Flashback Query Benefits


20.4.2. Some Uses of Flashback Query

20.4.3. Self-Service Repair


20.4.4. E-Mail or Voice Mail Applications
20.4.5. Account Balances
20.4.6. Packaged Applications

21. 21 Data Integrity

21.1. Introduction to Data Integrity

21.1.1. Types of Data Integrity

21.1.2. Null Rule


21.1.3. Unique Column Values
21.1.4. Primary Key Values
21.1.5. Referential Integrity Rules
21.1.6. Complex Integrity Checking

21.1.7. How Oracle Enforces Data Integrity

21.1.8. Integrity Constraints Description


21.1.9. Database Triggers

21.2. Introduction to Integrity Constraints

21.2.1. Advantages of Integrity Constraints

21.2.2. Declarative Ease


21.2.3. Centralized Rules
21.2.4. Maximum Application Development Productivity
21.2.5. Immediate User Feedback
21.2.6. Superior Performance
21.2.7. Flexibility for Data Loads and Identification of Integrity
Violations

21.2.8. The Performance Cost of Integrity Constraints

21.3. Types of Integrity Constraints

21.3.1. NOT NULL Integrity Constraints


21.3.2. UNIQUE Key Integrity Constraints

21.3.3. Unique Keys


21.3.4. UNIQUE Key Constraints and Indexes
21.3.5. Combine UNIQUE Key and NOT NULL Integrity Constraints

21.3.6. PRIMARY KEY Integrity Constraints

21.3.7. Primary Keys


21.3.8. PRIMARY KEY Constraints and Indexes
21.3.9. Referential Integrity Constraints

21.3.10. Self-Referential Integrity Constraints


21.3.11. Nulls and Foreign Keys
21.3.12. Actions Defined by Referential Integrity Constraints
21.3.13. Concurrency Control, Indexes, and Foreign Keys

21.3.14. CHECK Integrity Constraints

21.3.15. The Check Condition


21.3.16. Multiple CHECK Constraints

21.4. The Mechanisms of Constraint Checking

21.4.1. Default Column Values and Integrity Constraint Checking

21.5. Deferred Constraint Checking

21.5.1. Constraint Attributes


21.5.2. SET CONSTRAINTS Mode
21.5.3. Unique Constraints and Indexes

21.6. Constraint States

21.6.1. Constraint State Modification

22. 22 Controlling Database Access

22.1. Introduction to Database Security


22.2. Schemas, Database Users, and Security Domains
22.3. User Authentication

22.3.1. Authentication by the Operating System


22.3.2. Authentication by the Network

22.3.3. Third Party-Based Authentication Technologies


22.3.4. Public Key Infrastructure-Based Authentication
22.3.5. Remote Authentication

22.3.6. Authentication by the Oracle Database

22.3.7. Password Encryption While Connecting


22.3.8. Account Locking
22.3.9. Password Lifetime and Expiration
22.3.10. Password History
22.3.11. Password Complexity Verification

22.3.12. Multitier Authentication and Authorization

22.3.13. Clients, Application Servers, and Database Servers


22.3.14. Security Issues for Middle-Tier Applications
22.3.15. Identity Issues in a Multitier Environment
22.3.16. Restricted Privileges in a Multitier Environment

22.3.17. Authentication by the Secure Socket Layer Protocol


22.3.18. Authentication of Database Administrators

22.4. Oracle Internet Directory


22.5. User Tablespace Settings and Quotas

22.5.1. Default Tablespace Option


22.5.2. Temporary Tablespace Option
22.5.3. Tablespace Access and Quotas

22.6. The User Group PUBLIC


22.7. User Resource Limits and Profiles

22.7.1. Types of System Resources and Limits

22.7.2. CPU Time


22.7.3. Logical Reads
22.7.4. Other Resources

22.7.5. Profiles

22.7.6. When to Use Profiles


22.7.7. Determine Values for Resource Limits of a Profile

23. 23 Privileges, Roles, and Security Policies

23.1. Introduction to Privileges

23.1.1. System Privileges

23.1.2. Grant and Revoke System Privileges


23.1.3. Who Can Grant or Revoke System Privileges?

23.1.4. Schema Object Privileges

23.1.5. Grant and Revoke Schema Object Privileges


23.1.6. Who Can Grant Schema Object Privileges?
23.1.7. Table Security

23.1.8. Data Manipulation Language Operations


23.1.9. Data Definition Language Operations

23.1.10. View Security

23.1.11. Privileges Required to Create Views


23.1.12. Increase Table Security with Views

23.1.13. Procedure Security

23.1.14. Procedure Execution and Security Domains


23.1.15. System Privileges Needed to Create or Alter a Procedure
23.1.16. Packages and Package Objects

23.1.17. Type Security

23.1.18. System Privileges for Named Types


23.1.19. Object Privileges
23.1.20. Method Execution Model
23.1.21. Privileges Required to Create Types and Tables Using Types
23.1.22. Privileges Required to Create Types and Tables Using Types
Example
23.1.23. Privileges on Type Access and Object Access
23.1.24. Type Dependencies

23.2. Introduction to Roles

23.2.1. Common Uses for Roles

23.2.2. Application Roles


23.2.3. User Roles

23.2.4. The Mechanisms of Roles


23.2.5. Grant and Revoke Roles
23.2.6. Who Can Grant or Revoke Roles?
23.2.7. Role Names
23.2.8. Security Domains of Roles and Users
23.2.9. PL/SQL Blocks and Roles

23.2.10. Named Blocks with Definer Rights


23.2.11. Anonymous Blocks with Invoker Rights

23.2.12. Data Definition Language Statements and Roles


23.2.13. Predefined Roles
23.2.14. The Operating System and Roles
23.2.15. Roles in a Distributed Environment

23.3. Fine-Grained Access Control

23.3.1. Dynamic Predicates

23.4. Application Context


23.5. Secure Application Roles

23.5.1. Creation of Secure Application Roles

24. 24 Auditing

24.1. Introduction to Auditing

24.1.1. Features of Auditing

24.1.2. Types of Auditing


24.1.3. Focus of Auditing
24.1.4. Audit Records and the Audit Trail

24.1.5. Mechanisms for Auditing

24.1.6. When Are Audit Records Generated?


24.1.7. Events Always Audited to the Operating System Audit Trail
24.1.8. When Do Audit Options Take Effect?
24.1.9. Audit in a Distributed Database
24.1.10. Audit to the Operating System Audit Trail

24.2. Statement Auditing


24.3. Privilege Auditing
24.4. Schema Object Auditing

24.4.1. Schema Object Audit Options for Views and Procedures

24.5. Fine-Grained Auditing


24.6. Focus Statement, Privilege, and Schema Object Auditing

24.6.1. Successful and Unsuccessful Statement Executions Auditing


24.6.2. BY SESSION and BY ACCESS Clauses of Audit Statement

24.6.3. BY SESSION
24.6.4. BY ACCESS
24.6.5. Defaults and Excluded Operations
24.6.6. Audit By User

24.7. Audit in a Multitier Environment

You might also like