Tải bản đầy đủ (.pdf) (1,000 trang)

Oracle® Database Administrator''''s Guide potx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (14.65 MB, 1,000 trang )


Oracle® Database
Administrator's Guide
11g Release 2 (11.2)
E10595-04
August 2009

Oracle Database Administrator's Guide, 11g Release 2 (11.2)
E10595-04
Copyright © 2001, 2009, Oracle and/or its affiliates. All rights reserved.
Primary Author: Steve Fogel
Contributing Authors: Caroline Johnston, Sheila Moore, Tony Morales, Padmaja Potineni, Randy Urbano
Contributors: David Austin, Bharat Baddepudi, Cathy Baird, Mark Bauer, Eric Belden, Atif Chaudhry,
Jonathan Creighton, Sudip Datta, Mark Dilman, Jacco Draaijer, Marcus Fallen, Amit Ganesh, GP Gongloor,
Vira Goorah, Shivani Gupta, Bill Hodak, Pat Huey, Chandrasekharan Iyer, Bhushan Khaladkar, Balaji
Krishnan, Vasudha Krishnaswamy, Bala Kuchibhotla, Sushil Kumar, Vikram Kumar, Paul Lane, Adam Lee,
Bill Lee, Sue K. Lee, Chon Lei, Yunrui Li, Ilya Listvinsky, Bryn Llewellyn, Barb Lundhild, Scott Lynn, Raghu
Mani, Vineet Marwah, Colin McGregor, Mughees Minhas, Krishna Mohan, Sheila Moore, Valarie Moore,
Niloy Mukherjee, Sujatha Muthulingam, Gary Ngai Ananth Raghavan, Mark Ramacher, Ravi Ramkissoon,
Yair Sarig, Bipul Sinha, Deborah Steiner, Janet Stern, Michael Stewart, Mahesh Subramaniam, Anh-Tuan
Tran, Alex Tsukerman, Kothanda Umamageswaran, Eric Voss, Daniel M. Wong, Paul Youn, Wei Zhang
This software and related documentation are provided under a license agreement containing restrictions on
use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your
license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license,
transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse
engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is
prohibited.
The information contained herein is subject to change without notice and is not warranted to be error-free. If
you find any errors, please report them to us in writing.
If this software or related documentation is delivered to the U.S. Government or anyone licensing it on
behalf of the U.S. Government, the following notice is applicable:


U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data
delivered to U.S. Government customers are "commercial computer software" or "commercial technical data"
pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As
such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and
license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of
the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software
License (December 2007). Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
This software is developed for general use in a variety of information management applications. It is not
developed or intended for use in any inherently dangerous applications, including applications which may
create a risk of personal injury. If you use this software in dangerous applications, then you shall be
responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure the safe use
of this software. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of
this software in dangerous applications.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks
of their respective owners.
This software and documentation may provide access to or information on content, products, and services
from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all
warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and
its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of
third-party content, products, or services.
iii
Contents
Preface xxvii
Audience xxvii
Documentation Accessibility xxvii
Related Documents xxviii
Conventions xxviii
What's New in Oracle Database Administrator's Guide? xxix
Oracle Database 11g Release 2 (11.2) New Features in the Administrator's Guide xxix
Part I Basic Database Administration

1 Getting Started with Database Administration
Types of Oracle Database Users 1-1
Database Administrators 1-1
Security Officers 1-2
Network Administrators 1-2
Application Developers 1-2
Application Administrators 1-3
Database Users 1-3
Tasks of a Database Administrator 1-3
Task 1: Evaluate the Database Server Hardware 1-3
Task 2: Install the Oracle Database Software 1-4
Task 3: Plan the Database 1-4
Task 4: Create and Open the Database 1-5
Task 5: Back Up the Database 1-5
Task 6: Enroll System Users 1-5
Task 7: Implement the Database Design 1-5
Task 8: Back Up the Fully Functional Database 1-5
Task 9: Tune Database Performance 1-5
Task 10: Download and Install Patches 1-5
Task 11: Roll Out to Additional Hosts 1-6
Submitting Commands and SQL to the Database 1-6
About SQL*Plus 1-7
Connecting to the Database with SQL*Plus 1-7
Identifying Your Oracle Database Software Release 1-12
iv
Release Number Format 1-13
Checking Your Current Release Number 1-13
About Database Administrator Security and Privileges 1-14
The Database Administrator's Operating System Account 1-14
Administrative User Accounts 1-14

Database Administrator Authentication 1-16
Administrative Privileges 1-16
Selecting an Authentication Method for Database Administrators 1-18
Using Operating System Authentication 1-20
Using Password File Authentication 1-21
Creating and Maintaining a Password File 1-22
Creating a Password File with ORAPWD 1-23
Sharing and Disabling the Password File 1-24
Adding Users to a Password File 1-25
Maintaining a Password File 1-27
Data Utilities 1-27
2 Creating and Configuring an Oracle Database
About Creating an Oracle Database 2-1
Considerations Before Creating the Database 2-2
Creating a Database with DBCA 2-5
Creating a Database with Interactive DBCA 2-5
Creating a Database with Noninteractive/Silent DBCA 2-5
Creating a Database with the CREATE DATABASE Statement 2-6
Step 1: Specify an Instance Identifier (SID) 2-7
Step 2: Ensure That the Required Environment Variables Are Set 2-7
Step 3: Choose a Database Administrator Authentication Method 2-7
Step 4: Create the Initialization Parameter File 2-8
Step 5: (Windows Only) Create an Instance 2-9
Step 6: Connect to the Instance 2-9
Step 7: Create a Server Parameter File 2-10
Step 8: Start the Instance 2-10
Step 9: Issue the CREATE DATABASE Statement 2-11
Step 10: Create Additional Tablespaces 2-14
Step 11: Run Scripts to Build Data Dictionary Views 2-14
Step 12: Run Scripts to Install Additional Options (Optional) 2-15

Step 13: Back Up the Database. 2-15
Step 14: (Optional) Enable Automatic Instance Startup 2-15
Specifying CREATE DATABASE Statement Clauses 2-16
Protecting Your Database: Specifying Passwords for Users SYS and SYSTEM 2-16
Creating a Locally Managed SYSTEM Tablespace 2-17
About the SYSAUX Tablespace 2-17
Using Automatic Undo Management: Creating an Undo Tablespace 2-19
Creating a Default Permanent Tablespace 2-19
Creating a Default Temporary Tablespace 2-19
Specifying Oracle-Managed Files at Database Creation 2-20
Supporting Bigfile Tablespaces During Database Creation 2-21
v
Specifying the Database Time Zone and Time Zone File 2-22
Specifying FORCE LOGGING Mode 2-23
Specifying Initialization Parameters 2-24
About Initialization Parameters and Initialization Parameter Files 2-25
Determining the Global Database Name 2-27
Specifying a Fast Recovery Area 2-28
Specifying Control Files 2-29
Specifying Database Block Sizes 2-29
Specifying the Maximum Number of Processes 2-30
Specifying the DDL Lock Timeout 2-30
Specifying the Method of Undo Space Management 2-31
About The COMPATIBLE Initialization Parameter 2-31
Setting the License Parameter 2-32
Managing Initialization Parameters Using a Server Parameter File 2-32
What Is a Server Parameter File? 2-33
Migrating to a Server Parameter File 2-33
Creating a Server Parameter File 2-34
Storing the Server Parameter File on HARD-Enabled Storage 2-35

The SPFILE Initialization Parameter 2-37
Changing Initialization Parameter Values 2-38
Clearing Initialization Parameter Values 2-39
Exporting the Server Parameter File 2-39
Backing Up the Server Parameter File 2-40
Recovering a Lost or Damaged Server Parameter File 2-40
Viewing Parameter Settings 2-41
Managing Application Workloads with Database Services 2-42
About Database Services 2-42
Creating Database Services 2-43
Database Service Data Dictionary Views 2-44
Considerations After Creating a Database 2-45
Some Security Considerations 2-45
Enabling Transparent Data Encryption 2-45
Creating a Secure External Password Store 2-46
Installing the Oracle Database Sample Schemas 2-46
Dropping a Database
2-47
Database Data Dictionary Views 2-47
3 Starting Up and Shutting Down
Starting Up a Database 3-1
About Database Startup Options 3-1
Specifying Initialization Parameters at Startup 3-2
About Automatic Startup of Database Services 3-5
Preparing to Start Up an Instance 3-5
Starting Up an Instance 3-6
Altering Database Availability 3-9
Mounting a Database to an Instance 3-9
Opening a Closed Database 3-10
vi

Opening a Database in Read-Only Mode 3-10
Restricting Access to an Open Database 3-11
Shutting Down a Database 3-12
Shutting Down with the Normal Mode 3-12
Shutting Down with the Immediate Mode 3-12
Shutting Down with the Transactional Mode 3-13
Shutting Down with the Abort Mode 3-13
Shutdown Timeout 3-14
Quiescing a Database 3-14
Placing a Database into a Quiesced State 3-15
Restoring the System to Normal Operation 3-16
Viewing the Quiesce State of an Instance 3-16
Suspending and Resuming a Database 3-16
4 Configuring Automatic Restart of an Oracle Database
About Oracle Restart 4-1
Startup Dependencies 4-2
Manually Starting and Stopping Components 4-2
Manually Starting and Stopping Oracle Restart 4-3
Oracle Restart Configuration 4-3
Oracle Restart Integration with Oracle Data Guard 4-4
Fast Application Notification with Oracle Restart 4-5
Configuring Oracle Restart 4-9
Preparing to Run SRVCTL 4-10
Obtaining Help for SRVCTL 4-10
Adding Components to the Oracle Restart Configuration 4-11
Removing Components from the Oracle Restart Configuration 4-13
Disabling and Enabling Oracle Restart Management for a Component 4-14
Viewing Component Status 4-15
Viewing the Oracle Restart Configuration for a Component 4-15
Modifying the Oracle Restart Configuration for a Component 4-16

Managing Environment Variables in the Oracle Restart Configuration 4-16
Creating and Deleting Database Services with SRVCTL 4-18
Enabling FAN Events in an Oracle Restart Environment 4-19
Automating the Failover of Connections Between Primary and Standby Databases 4-20
Enabling Clients for Fast Connection Failover 4-20
Starting and Stopping Components Managed by Oracle Restart 4-24
Starting and Stopping Components Managed by Oracle Restart with SRVCTL 4-25
Starting a Database Managed by Oracle Restart with Oracle Enterprise Manager 4-26
Stopping and Restarting Oracle Restart for Maintenance Operations 4-27
SRVCTL Command Reference 4-29
add 4-31
config 4-37
disable 4-41
enable 4-44
getenv 4-47
modify 4-49
vii
remove 4-53
setenv 4-57
start 4-59
status 4-63
stop 4-67
unsetenv 4-71
CRSCTL Command Reference 4-73
check 4-74
config 4-74
disable 4-74
enable 4-74
start 4-74
stop 4-74

5 Managing Processes
About Dedicated and Shared Server Processes 5-1
Dedicated Server Processes 5-1
Shared Server Processes 5-2
About Database Resident Connection Pooling 5-4
Comparing DRCP to Dedicated Server and Shared Server 5-5
Restrictions on Using Database Resident Connection Pooling 5-5
Configuring Oracle Database for Shared Server 5-6
Initialization Parameters for Shared Server 5-6
Memory Management for Shared Server 5-7
Enabling Shared Server 5-7
Configuring Dispatchers 5-9
Shared Server Data Dictionary Views 5-14
Configuring Database Resident Connection Pooling 5-15
Enabling Database Resident Connection Pooling 5-15
Configuring the Connection Pool for Database Resident Connection Pooling 5-16
Data Dictionary Views for Database Resident Connection Pooling 5-18
About Oracle Database Background Processes 5-18
Managing Processes for Parallel SQL Execution 5-20
About Parallel Execution Servers 5-20
Altering Parallel Execution for a Session 5-21
Managing Processes for External Procedures 5-22
Terminating Sessions 5-22
Identifying Which Session to Terminate 5-23
Terminating an Active Session 5-23
Terminating an Inactive Session 5-23
Process and Session Data Dictionary Views 5-24
6 Managing Memory
About Memory Management 6-1
Memory Architecture Overview 6-2

Using Automatic Memory Management 6-3
viii
About Automatic Memory Management 6-3
Enabling Automatic Memory Management 6-4
Monitoring and Tuning Automatic Memory Management 6-6
Configuring Memory Manually 6-7
Using Automatic Shared Memory Management 6-7
Using Manual Shared Memory Management 6-14
Using Automatic PGA Memory Management 6-19
Using Manual PGA Memory Management 6-20
Memory Management Reference 6-21
Platforms That Support Automatic Memory Management 6-21
Memory Management Data Dictionary Views 6-21
7 Managing Users and Securing the Database
The Importance of Establishing a Security Policy for Your Database 7-1
Managing Users and Resources 7-1
Managing User Privileges and Roles 7-2
Auditing Database Use 7-2
Predefined User Accounts 7-2
8 Monitoring Database Operations
Monitoring Errors and Alerts 8-1
Monitoring Errors with Trace Files and the Alert Log 8-1
Monitoring Database Operations with Server-Generated Alerts 8-4
Monitoring Performance 8-6
Monitoring Locks 8-7
Monitoring Wait Events 8-7
Performance Monitoring Data Dictionary Views 8-7
9 Managing Diagnostic Data
About the Oracle Database Fault Diagnosability Infrastructure 9-1
Fault Diagnosability Infrastructure Overview 9-1

About Incidents and Problems 9-3
Fault Diagnosability Infrastructure Components 9-5
Structure, Contents, and Location of the Automatic Diagnostic Repository 9-7
Investigating, Reporting, and Resolving a Problem 9-10
Roadmap—Investigating, Reporting, and Resolving a Problem 9-10
Task 1 – View Critical Error Alerts in Enterprise Manager 9-12
Task 2 –View Problem Details 9-13
Task 3 – (Optional) Gather Additional Diagnostic Information 9-13
Task 4 – (Optional) Create a Service Request 9-13
Task 5 – Package and Upload Diagnostic Data to Oracle Support 9-14
Task 6 – Track the Service Request and Implement Any Repairs 9-15
Task 7 – Close Incidents 9-16
Viewing Problems with the Enterprise Manager Support Workbench 9-17
Creating a User-Reported Problem 9-18
Viewing the Alert Log 9-19
ix
Finding Trace Files 9-20
Running Health Checks with Health Monitor 9-20
About Health Monitor 9-21
Running Health Checks Manually 9-22
Viewing Checker Reports 9-23
Health Monitor Views 9-26
Health Check Parameters Reference 9-27
Repairing SQL Failures with the SQL Repair Advisor 9-28
About the SQL Repair Advisor 9-28
Running the SQL Repair Advisor 9-28
Viewing, Disabling, or Removing a SQL Patch 9-29
Repairing Data Corruptions with the Data Recovery Advisor 9-30
Creating, Editing, and Uploading Custom Incident Packages 9-32
About Incident Packages 9-32

Packaging and Uploading Problems with Custom Packaging 9-35
Viewing and Modifying Incident Packages 9-38
Creating, Editing, and Uploading Correlated Packages 9-44
Deleting Correlated Packages 9-45
Setting Incident Packaging Preferences 9-45
Part II Oracle Database Structure and Storage
10 Managing Control Files
What Is a Control File? 10-1
Guidelines for Control Files 10-2
Provide Filenames for the Control Files 10-2
Multiplex Control Files on Different Disks 10-2
Back Up Control Files 10-3
Manage the Size of Control Files 10-3
Creating Control Files 10-3
Creating Initial Control Files 10-3
Creating Additional Copies, Renaming, and Relocating Control Files 10-4
Creating New Control Files 10-4
Troubleshooting After Creating Control Files 10-7
Checking for Missing or Extra Files 10-7
Handling Errors During CREATE CONTROLFILE 10-7
Backing Up Control Files 10-8
Recovering a Control File Using a Current Copy 10-8
Recovering from Control File Corruption Using a Control File Copy 10-8
Recovering from Permanent Media Failure Using a Control File Copy 10-8
Dropping Control Files 10-9
Control Files Data Dictionary Views 10-9
11 Managing the Redo Log
What Is the Redo Log? 11-1
Redo Threads 11-1
x

Redo Log Contents 11-2
How Oracle Database Writes to the Redo Log 11-2
Planning the Redo Log 11-4
Multiplexing Redo Log Files 11-4
Placing Redo Log Members on Different Disks 11-6
Planning the Size of Redo Log Files 11-7
Planning the Block Size of Redo Log Files 11-7
Choosing the Number of Redo Log Files 11-8
Controlling Archive Lag 11-9
Creating Redo Log Groups and Members 11-10
Creating Redo Log Groups 11-10
Creating Redo Log Members 11-11
Relocating and Renaming Redo Log Members 11-11
Dropping Redo Log Groups and Members 11-13
Dropping Log Groups 11-13
Dropping Redo Log Members 11-13
Forcing Log Switches 11-14
Verifying Blocks in Redo Log Files 11-14
Clearing a Redo Log File 11-15
Redo Log Data Dictionary Views 11-16
12 Managing Archived Redo Logs
What Is the Archived Redo Log? 12-1
Choosing Between NOARCHIVELOG and ARCHIVELOG Mode 12-2
Running a Database in NOARCHIVELOG Mode 12-2
Running a Database in ARCHIVELOG Mode 12-3
Controlling Archiving 12-4
Setting the Initial Database Archiving Mode 12-4
Changing the Database Archiving Mode 12-4
Performing Manual Archiving 12-5
Adjusting the Number of Archiver Processes 12-6

Specifying Archive Destinations 12-6
Setting Initialization Parameters for Archive Destinations 12-6
Understanding Archive Destination Status 12-9
Specifying Alternate Destinations 12-10
About Log Transmission Modes 12-10
Normal Transmission Mode 12-10
Standby Transmission Mode 12-10
Managing Archive Destination Failure 12-11
Specifying the Minimum Number of Successful Destinations 12-11
Rearchiving to a Failed Destination 12-12
Controlling Trace Output Generated by the Archivelog Process 12-13
Viewing Information About the Archived Redo Log 12-14
Archived Redo Logs Views 12-14
The ARCHIVE LOG LIST Command 12-15
xi
13 Managing Tablespaces
Guidelines for Managing Tablespaces 13-1
Using Multiple Tablespaces 13-2
Assigning Tablespace Quotas to Users 13-2
Creating Tablespaces 13-2
Locally Managed Tablespaces 13-3
Bigfile Tablespaces 13-6
Compressed Tablespaces 13-8
Encrypted Tablespaces 13-8
Temporary Tablespaces 13-10
Multiple Temporary Tablespaces: Using Tablespace Groups 13-13
Specifying Nonstandard Block Sizes for Tablespaces 13-14
Controlling the Writing of Redo Records 13-15
Altering Tablespace Availability 13-15
Taking Tablespaces Offline 13-16

Bringing Tablespaces Online 13-17
Using Read-Only Tablespaces 13-17
Making a Tablespace Read-Only 13-18
Making a Read-Only Tablespace Writable 13-20
Creating a Read-Only Tablespace on a WORM Device 13-20
Delaying the Opening of Datafiles in Read-Only Tablespaces 13-20
Altering and Maintaining Tablespaces 13-21
Altering a Locally Managed Tablespace 13-21
Altering a Bigfile Tablespace 13-22
Altering a Locally Managed Temporary Tablespace 13-22
Shrinking a Locally Managed Temporary Tablespace 13-23
Renaming Tablespaces 13-23
Dropping Tablespaces 13-24
Managing the SYSAUX Tablespace 13-25
Monitoring Occupants of the SYSAUX Tablespace 13-25
Moving Occupants Out Of or Into the SYSAUX Tablespace 13-26
Controlling the Size of the SYSAUX Tablespace 13-26
Diagnosing and Repairing Locally Managed Tablespace Problems 13-27
Scenario 1: Fixing Bitmap When Allocated Blocks are Marked Free (No Overlap) 13-28
Scenario 2: Dropping a Corrupted Segment 13-28
Scenario 3: Fixing Bitmap Where Overlap is Reported 13-28
Scenario 4: Correcting Media Corruption of Bitmap Blocks 13-29
Scenario 5: Migrating from a Dictionary-Managed to a Locally Managed Tablespace
13-29
Migrating the SYSTEM Tablespace to a Locally Managed Tablespace 13-29
Transporting Tablespaces Between Databases 13-30
Introduction to Transportable Tablespaces 13-30
About Transporting Tablespaces Across Platforms 13-31
Limitations on Transportable Tablespace Use 13-32
Compatibility Considerations for Transportable Tablespaces 13-34

Transporting Tablespaces Between Databases: A Procedure and Example 13-34
Using Transportable Tablespaces: Scenarios 13-43
Moving Databases Across Platforms Using Transportable Tablespaces 13-46
xii
Tablespace Data Dictionary Views 13-47
Example 1: Listing Tablespaces and Default Storage Parameters 13-47
Example 2: Listing the Datafiles and Associated Tablespaces of a Database 13-48
Example 3: Displaying Statistics for Free Space (Extents) of Each Tablespace 13-48
14 Managing Datafiles and Tempfiles
Guidelines for Managing Datafiles 14-1
Determine the Number of Datafiles 14-2
Determine the Size of Datafiles 14-3
Place Datafiles Appropriately 14-4
Store Datafiles Separate from Redo Log Files 14-4
Creating Datafiles and Adding Datafiles to a Tablespace 14-4
Changing Datafile Size 14-5
Enabling and Disabling Automatic Extension for a Datafile 14-5
Manually Resizing a Datafile 14-6
Altering Datafile Availability 14-6
Bringing Datafiles Online or Taking Offline in ARCHIVELOG Mode 14-7
Taking Datafiles Offline in NOARCHIVELOG Mode 14-7
Altering the Availability of All Datafiles or Tempfiles in a Tablespace 14-8
Renaming and Relocating Datafiles 14-8
Procedures for Renaming and Relocating Datafiles in a Single Tablespace 14-9
Procedure for Renaming and Relocating Datafiles in Multiple Tablespaces 14-10
Dropping Datafiles 14-11
Verifying Data Blocks in Datafiles 14-12
Copying Files Using the Database Server 14-12
Copying a File on a Local File System 14-13
Third-Party File Transfer 14-14

File Transfer and the DBMS_SCHEDULER Package 14-14
Advanced File Transfer Mechanisms 14-15
Mapping Files to Physical Devices 14-15
Overview of Oracle Database File Mapping Interface 14-16
How the Oracle Database File Mapping Interface Works 14-16
Using the Oracle Database File Mapping Interface 14-19
File Mapping Examples 14-22
Datafiles Data Dictionary Views 14-25
15 Managing Undo
What Is Undo? 15-1
Introduction to Automatic Undo Management 15-2
Overview of Automatic Undo Management 15-2
About the Undo Retention Period 15-3
Setting the Minimum Undo Retention Period 15-6
Sizing a Fixed-Size Undo Tablespace 15-6
The Undo Advisor PL/SQL Interface 15-7
Managing Undo Tablespaces 15-8
Creating an Undo Tablespace 15-8
Altering an Undo Tablespace 15-9
xiii
Dropping an Undo Tablespace 15-9
Switching Undo Tablespaces 15-10
Establishing User Quotas for Undo Space 15-11
Managing Space Threshold Alerts for the Undo Tablespace 15-11
Migrating to Automatic Undo Management 15-11
Undo Space Data Dictionary Views 15-11
16 Using Oracle-Managed Files
What Are Oracle-Managed Files? 16-1
Who Can Use Oracle-Managed Files? 16-2
Benefits of Using Oracle-Managed Files 16-3

Oracle-Managed Files and Existing Functionality 16-3
Enabling the Creation and Use of Oracle-Managed Files 16-3
Setting the DB_CREATE_FILE_DEST Initialization Parameter 16-4
Setting the DB_RECOVERY_FILE_DEST Parameter 16-5
Setting the DB_CREATE_ONLINE_LOG_DEST_n Initialization Parameters 16-5
Creating Oracle-Managed Files 16-5
How Oracle-Managed Files Are Named 16-6
Creating Oracle-Managed Files at Database Creation 16-7
Creating Datafiles for Tablespaces Using Oracle-Managed Files 16-12
Creating Tempfiles for Temporary Tablespaces Using Oracle-Managed Files 16-14
Creating Control Files Using Oracle-Managed Files 16-15
Creating Redo Log Files Using Oracle-Managed Files 16-16
Creating Archived Logs Using Oracle-Managed Files 16-17
Behavior of Oracle-Managed Files 16-18
Dropping Datafiles and Tempfiles 16-18
Dropping Redo Log Files 16-18
Renaming Files 16-18
Managing Standby Databases 16-19
Scenarios for Using Oracle-Managed Files 16-19
Scenario 1: Create and Manage a Database with Multiplexed Redo Logs 16-19
Scenario 2: Create and Manage a Database with Database and Fast Recovery Areas 16-22
Scenario 3: Adding Oracle-Managed Files to an Existing Database 16-23
Part III Schema Objects
17 Managing Schema Objects
Creating Multiple Tables and Views in a Single Operation 17-1
Analyzing Tables, Indexes, and Clusters 17-2
Using DBMS_STATS to Collect Table and Index Statistics 17-3
Validating Tables, Indexes, Clusters, and Materialized Views 17-3
Listing Chained Rows of Tables and Clusters 17-4
Truncating Tables and Clusters 17-6

Using DELETE 17-6
Using DROP and CREATE 17-6
Using TRUNCATE 17-6
xiv
Enabling and Disabling Triggers 17-7
Enabling Triggers 17-9
Disabling Triggers 17-9
Managing Integrity Constraints 17-9
Integrity Constraint States 17-10
Setting Integrity Constraints Upon Definition 17-11
Modifying, Renaming, or Dropping Existing Integrity Constraints 17-12
Deferring Constraint Checks 17-14
Reporting Constraint Exceptions 17-14
Viewing Constraint Information 17-16
Renaming Schema Objects 17-16
Managing Object Dependencies 17-17
About Object Dependencies and Object Invalidation 17-17
Manually Recompiling Invalid Objects with DDL 17-18
Manually Recompiling Invalid Objects with PL/SQL Package Procedures 17-18
Managing Object Name Resolution 17-19
Switching to a Different Schema 17-21
Managing Editions 17-21
About Editions and Edition-Based Redefinition 17-21
DBA Tasks for Edition-Based Redefinition 17-21
Setting the Database Default Edition 17-22
Querying the Database Default Edition 17-22
Using an Edition 17-22
Editions Data Dictionary Views 17-23
Displaying Information About Schema Objects 17-23
Using a PL/SQL Package to Display Information About Schema Objects 17-23

Schema Objects Data Dictionary Views 17-24
18 Managing Space for Schema Objects
Managing Tablespace Alerts 18-1
Setting Alert Thresholds 18-2
Viewing Alerts 18-3
Limitations 18-3
Managing Resumable Space Allocation 18-4
Resumable Space Allocation Overview 18-4
Enabling and Disabling Resumable Space Allocation 18-7
Using a LOGON Trigger to Set Default Resumable Mode 18-8
Detecting Suspended Statements 18-8
Operation-Suspended Alert 18-10
Resumable Space Allocation Example: Registering an AFTER SUSPEND Trigger 18-10
Reclaiming Wasted Space 18-12
Understanding Reclaimable Unused Space 18-12
Using the Segment Advisor 18-12
Shrinking Database Segments Online 18-26
Deallocating Unused Space 18-27
Understanding Space Usage of Datatypes 18-28
Displaying Information About Space Usage for Schema Objects 18-28
xv
Using PL/SQL Packages to Display Information About Schema Object Space Usage 18-28
Schema Objects Space Usage Data Dictionary Views 18-29
Capacity Planning for Database Objects 18-32
Estimating the Space Use of a Table 18-32
Estimating the Space Use of an Index 18-33
Obtaining Object Growth Trends 18-33
19 Managing Tables
About Tables 19-1
Guidelines for Managing Tables 19-2

Design Tables Before Creating Them 19-2
Specify the Type of Table to Create 19-3
Specify the Location of Each Table 19-4
Consider Parallelizing Table Creation 19-4
Consider Using NOLOGGING When Creating Tables 19-4
Consider Using Table Compression 19-5
Consider Encrypting Columns That Contain Sensitive Data 19-8
Understand Deferred Segment Creation 19-9
Estimate Table Size and Plan Accordingly 19-10
Restrictions to Consider When Creating Tables 19-10
Creating Tables 19-10
Example: Creating a Table 19-11
Creating a Temporary Table 19-12
Parallelizing Table Creation 19-13
Loading Tables 19-14
Improving INSERT Performance with Direct-Path Insert 19-15
Avoiding Bulk INSERT Failures with DML Error Logging 19-19
Automatically Collecting Statistics on Tables 19-22
Altering Tables 19-23
Reasons for Using the ALTER TABLE Statement 19-24
Altering Physical Attributes of a Table 19-24
Moving a Table to a New Segment or Tablespace 19-25
Manually Allocating Storage for a Table 19-25
Modifying an Existing Column Definition 19-26
Adding Table Columns 19-26
Renaming Table Columns 19-27
Dropping Table Columns 19-27
Placing a Table in Read-Only Mode 19-28
Redefining Tables Online 19-30
Features of Online Table Redefinition 19-30

Performing Online Redefinition with DBMS_REDEFINITION 19-31
Results of the Redefinition Process 19-35
Performing Intermediate Synchronization 19-36
Aborting Online Table Redefinition and Cleaning Up After Errors 19-36
Restrictions for Online Redefinition of Tables 19-36
Online Redefinition of a Single Partition 19-37
Online Table Redefinition Examples 19-39
xvi
Privileges Required for the DBMS_REDEFINITION Package 19-45
Researching and Reversing Erroneous Table Changes 19-45
Recovering Tables Using Oracle Flashback Table 19-46
Dropping Tables 19-46
Using Flashback Drop and Managing the Recycle Bin 19-47
What Is the Recycle Bin? 19-48
Enabling and Disabling the Recycle Bin 19-49
Viewing and Querying Objects in the Recycle Bin 19-49
Purging Objects in the Recycle Bin 19-50
Restoring Tables from the Recycle Bin 19-50
Managing Index-Organized Tables 19-52
What Are Index-Organized Tables? 19-52
Creating Index-Organized Tables 19-53
Maintaining Index-Organized Tables 19-57
Creating Secondary Indexes on Index-Organized Tables 19-59
Analyzing Index-Organized Tables 19-60
Using the ORDER BY Clause with Index-Organized Tables 19-61
Converting Index-Organized Tables to Regular Tables 19-61
Managing External Tables 19-61
About External Tables 19-62
Creating External Tables 19-63
Altering External Tables 19-65

Preprocessing External Tables 19-66
Dropping External Tables 19-67
System and Object Privileges for External Tables 19-68
Tables Data Dictionary Views 19-68
20 Managing Indexes
About Indexes 20-1
Guidelines for Managing Indexes 20-2
Create Indexes After Inserting Table Data 20-2
Index the Correct Tables and Columns 20-3
Order Index Columns for Performance 20-3
Limit the Number of Indexes for Each Table 20-4
Drop Indexes That Are No Longer Required 20-4
Estimate Index Size and Set Storage Parameters 20-4
Specify the Tablespace for Each Index 20-5
Consider Parallelizing Index Creation 20-5
Consider Creating Indexes with NOLOGGING 20-5
Understand When to Use Unusable or Invisible Indexes 20-5
Consider Costs and Benefits of Coalescing or Rebuilding Indexes 20-7
Consider Cost Before Disabling or Dropping Constraints 20-8
Creating Indexes 20-8
Creating an Index Explicitly 20-9
Creating a Unique Index Explicitly 20-9
Creating an Index Associated with a Constraint 20-9
Collecting Incidental Statistics when Creating an Index 20-11
xvii
Creating a Large Index 20-11
Creating an Index Online 20-11
Creating a Function-Based Index 20-12
Creating a Key-Compressed Index 20-13
Creating an Unusable Index 20-13

Creating an Invisible Index 20-14
Altering Indexes 20-15
Altering Storage Characteristics of an Index 20-15
Rebuilding an Existing Index 20-16
Making an Index Unusable 20-16
Making an Index Invisible 20-17
Renaming an Index 20-18
Monitoring Index Usage 20-18
Monitoring Space Use of Indexes 20-19
Dropping Indexes 20-19
Indexes Data Dictionary Views 20-20
21 Managing Clusters
About Clusters 21-1
Guidelines for Managing Clusters 21-2
Choose Appropriate Tables for the Cluster 21-3
Choose Appropriate Columns for the Cluster Key 21-3
Specify the Space Required by an Average Cluster Key and Its Associated Rows 21-3
Specify the Location of Each Cluster and Cluster Index Rows 21-4
Estimate Cluster Size and Set Storage Parameters 21-4
Creating Clusters 21-4
Creating Clustered Tables 21-5
Creating Cluster Indexes 21-5
Altering Clusters 21-6
Altering Clustered Tables 21-6
Altering Cluster Indexes 21-7
Dropping Clusters 21-7
Dropping Clustered Tables 21-8
Dropping Cluster Indexes 21-8
Clusters Data Dictionary Views 21-8
22 Managing Hash Clusters

About Hash Clusters 22-1
When to Use Hash Clusters 22-2
Situations Where Hashing Is Useful 22-2
Situations Where Hashing Is Not Advantageous 22-2
Creating Hash Clusters 22-2
Creating a Sorted Hash Cluster 22-3
Creating Single-Table Hash Clusters 22-4
Controlling Space Use Within a Hash Cluster 22-4
Estimating Size Required by Hash Clusters 22-7
xviii
Altering Hash Clusters 22-7
Dropping Hash Clusters 22-7
Hash Clusters Data Dictionary Views 22-8
23 Managing Views, Sequences, and Synonyms
Managing Views 23-1
About Views 23-1
Creating Views 23-2
Replacing Views 23-4
Using Views in Queries 23-4
Updating a Join View 23-6
Altering Views 23-12
Dropping Views 23-12
Managing Sequences 23-12
About Sequences 23-12
Creating Sequences 23-13
Altering Sequences 23-13
Using Sequences 23-14
Dropping Sequences 23-16
Managing Synonyms 23-17
About Synonyms 23-17

Creating Synonyms 23-17
Using Synonyms in DML Statements 23-18
Dropping Synonyms 23-18
Views, Synonyms, and Sequences Data Dictionary Views 23-19
24 Repairing Corrupted Data
Options for Repairing Data Block Corruption 24-1
About the DBMS_REPAIR Package 24-1
DBMS_REPAIR Procedures 24-2
Limitations and Restrictions 24-2
Using the DBMS_REPAIR Package 24-2
Task 1: Detect and Report Corruptions 24-3
Task 2: Evaluate the Costs and Benefits of Using DBMS_REPAIR 24-4
Task 3: Make Objects Usable 24-5
Task 4: Repair Corruptions and Rebuild Lost Data 24-5
DBMS_REPAIR Examples 24-5
Examples: Building a Repair Table or Orphan Key Table 24-6
Example: Detecting Corruption 24-7
Example: Fixing Corrupt Blocks 24-8
Example: Finding Index Entries Pointing to Corrupt Data Blocks 24-9
Example: Skipping Corrupt Blocks 24-9
Part IV Database Resource Management and Task Scheduling
xix
25 Managing Automated Database Maintenance Tasks
About Automated Maintenance Tasks 25-1
About Maintenance Windows 25-2
Configuring Automated Maintenance Tasks 25-3
Enabling and Disabling Maintenance Tasks for all Maintenance Windows 25-3
Enabling and Disabling Maintenance Tasks for Specific Maintenance Windows 25-4
Configuring Maintenance Windows 25-4
Modifying a Maintenance Window 25-4

Creating a New Maintenance Window 25-4
Removing a Maintenance Window 25-5
Configuring Resource Allocations for Automated Maintenance Tasks 25-5
About Resource Allocations for Automated Maintenance Tasks 25-6
Changing Resource Allocations for Automated Maintenance Tasks 25-6
Automated Maintenance Tasks Reference 25-7
Predefined Maintenance Windows 25-7
Automated Maintenance Tasks Database Dictionary Views 25-7
26 Managing Resource Allocation with Oracle Database Resource Manager
About Oracle Database Resource Manager 26-1
What Problems Does the Resource Manager Address? 26-2
How Does the Resource Manager Address These Problems? 26-2
Elements of the Resource Manager 26-3
About Resource Allocation Methods 26-6
About Resource Manager Administration Privileges 26-10
Creating a Simple Resource Plan 26-10
Creating a Complex Resource Plan 26-12
About the Pending Area 26-13
Creating a Pending Area 26-13
Creating Resource Consumer Groups 26-13
Creating a Resource Plan 26-14
Creating Resource Plan Directives 26-15
Validating the Pending Area 26-19
Submitting the Pending Area 26-21
Clearing the Pending Area 26-21
Assigning Sessions to Resource Consumer Groups 26-21
Overview of Assigning Sessions to Resource Consumer Groups 26-22
Assigning an Initial Resource Consumer Group 26-22
Manually Switching Resource Consumer Groups 26-22
Specifying Automatic Resource Consumer Group Switching 26-23

Specifying Session-to–Consumer Group Mapping Rules 26-25
Enabling Users or Applications to Manually Switch Consumer Groups 26-29
Granting and Revoking the Switch Privilege 26-30
Enabling Oracle Database Resource Manager and Switching Plans 26-32
Putting It All Together: Oracle Database Resource Manager Examples 26-33
Multilevel Plan Example 26-34
Examples of Using the Maximum Utilization Limit Attribute 26-36
xx
Example of Using Several Resource Allocation Methods 26-39
An Oracle-Supplied Mixed Workload Plan 26-39
Managing Multiple Database Instances on a Single Server 26-40
About Instance Caging 26-40
Enabling Instance Caging 26-41
Maintaining Consumer Groups, Plans, and Directives 26-42
Updating a Consumer Group 26-42
Deleting a Consumer Group 26-42
Updating a Plan 26-42
Deleting a Plan 26-43
Updating a Resource Plan Directive 26-43
Deleting a Resource Plan Directive 26-44
Viewing Database Resource Manager Configuration and Status 26-44
Viewing Consumer Groups Granted to Users or Roles 26-44
Viewing Plan Information 26-44
Viewing Current Consumer Groups for Sessions 26-45
Viewing the Currently Active Plans 26-45
Monitoring Oracle Database Resource Manager 26-45
Interacting with Operating-System Resource Control 26-48
Guidelines for Using Operating-System Resource Control 26-48
Oracle Database Resource Manager Reference 26-49
Predefined Resource Plans and Consumer Groups 26-49

Predefined Consumer Group Mapping Rules 26-51
Resource Manager Data Dictionary Views 26-52
27 Oracle Scheduler Concepts
Overview of Oracle Scheduler 27-1
About Jobs and Supporting Scheduler Objects 27-3
Programs 27-4
Schedules 27-4
Jobs 27-4
Destinations 27-6
File Watchers 27-7
Credentials 27-7
Chains 27-7
Job Classes 27-9
Windows 27-10
Groups 27-14
More About Jobs 27-14
Job Categories 27-15
Job Instances 27-21
Job Arguments 27-21
How Programs, Jobs, and Schedules are Related 27-21
Scheduler Architecture 27-22
The Job Table 27-23
The Job Coordinator 27-23
How Jobs Execute 27-24
xxi
Job Slaves 27-24
Using the Scheduler in Real Application Clusters Environments 27-25
Scheduler Support for Oracle Data Guard 27-26
Oracle Scheduler and Editions 27-26
28 Scheduling Jobs with Oracle Scheduler

About Scheduler Objects and Their Naming 28-1
Creating, Running, and Managing Jobs 28-2
Job Tasks and Their Procedures 28-2
Creating Jobs 28-2
Altering Jobs 28-15
Running Jobs 28-16
Stopping Jobs 28-16
Dropping Jobs 28-18
Disabling Jobs 28-19
Enabling Jobs 28-20
Copying Jobs 28-20
Viewing stdout and stderr for External Jobs 28-20
Creating and Managing Programs to Define Jobs 28-21
Program Tasks and Their Procedures 28-21
Creating Programs 28-22
Altering Programs 28-23
Dropping Programs 28-23
Disabling Programs 28-24
Enabling Programs 28-24
Creating and Managing Schedules to Define Jobs 28-24
Schedule Tasks and Their Procedures 28-25
Creating Schedules 28-25
Altering Schedules 28-25
Dropping Schedules 28-26
Setting the Repeat Interval 28-26
Using Events to Start Jobs 28-30
About Events 28-30
Starting Jobs with Events Raised by Your Application 28-31
Starting a Job When a File Arrives on a System 28-35
Creating and Managing Job Chains 28-41

Chain Tasks and Their Procedures 28-42
Creating Chains 28-42
Defining Chain Steps 28-43
Adding Rules to a Chain 28-44
Enabling Chains 28-47
Creating Jobs for Chains
28-48
Dropping Chains 28-48
Running Chains 28-49
Dropping Chain Rules 28-49
Disabling Chains 28-49
Dropping Chain Steps 28-50
xxii
Stopping Chains 28-50
Stopping Individual Chain Steps 28-50
Pausing Chains 28-51
Skipping Chain Steps 28-52
Running Part of a Chain 28-52
Monitoring Running Chains 28-52
Handling Stalled Chains 28-52
Prioritizing Jobs 28-53
Managing Job Priorities with Job Classes 28-53
Setting Relative Job Priorities Within a Job Class 28-55
Managing Job Scheduling and Job Priorities with Windows 28-55
Managing Job Scheduling and Job Priorities with Window Groups 28-60
Allocating Resources Among Jobs Using Resource Manager 28-63
Example of Resource Allocation for Jobs 28-64
Monitoring Jobs 28-64
Viewing the Job Log 28-65
Monitoring Multiple Destination Jobs 28-67

Monitoring Job State with Events Raised by the Scheduler 28-68
Monitoring Job State with E-mail Notifications 28-70
29 Administering Oracle Scheduler
Configuring Oracle Scheduler 29-1
Setting Oracle Scheduler Privileges 29-1
Setting Scheduler Preferences 29-2
Enabling and Disabling Remote Jobs 29-4
Monitoring and Managing the Scheduler 29-9
Viewing the Currently Active Window and Resource Plan 29-9
Finding Information About Currently Running Jobs 29-9
Monitoring and Managing Window and Job Logs 29-10
Managing Scheduler Security 29-13
Import/Export and the Scheduler 29-13
Troubleshooting the Scheduler 29-13
A Job Does Not Run 29-13
A Program Becomes Disabled 29-16
A Window Fails to Take Effect 29-16
Examples of Using the Scheduler 29-16
Examples of Creating Job Classes 29-16
Examples of Setting Attributes 29-17
Examples of Creating Chains 29-18
Examples of Creating Jobs and Schedules Based on Events 29-20
Example of Creating a Job In an Oracle Data Guard Environment 29-21
Scheduler Reference 29-21
Scheduler Privileges 29-22
Scheduler Data Dictionary Views 29-23
Part V Distributed Database Management
xxiii
30 Distributed Database Concepts
Distributed Database Architecture 30-1

Homogenous Distributed Database Systems 30-1
Heterogeneous Distributed Database Systems 30-3
Client/Server Database Architecture 30-4
Database Links 30-5
What Are Database Links? 30-6
What Are Shared Database Links? 30-7
Why Use Database Links? 30-8
Global Database Names in Database Links 30-8
Names for Database Links 30-9
Types of Database Links 30-10
Users of Database Links 30-11
Creation of Database Links: Examples 30-13
Schema Objects and Database Links 30-14
Database Link Restrictions 30-16
Distributed Database Administration 30-16
Site Autonomy 30-16
Distributed Database Security 30-17
Auditing Database Links 30-21
Administration Tools 30-22
Transaction Processing in a Distributed System 30-23
Remote SQL Statements 30-23
Distributed SQL Statements 30-24
Shared SQL for Remote and Distributed Statements 30-24
Remote Transactions 30-24
Distributed Transactions 30-25
Two-Phase Commit Mechanism 30-25
Database Link Name Resolution 30-25
Schema Object Name Resolution 30-27
Global Name Resolution in Views, Synonyms, and Procedures 30-29
Distributed Database Application Development 30-31

Transparency in a Distributed Database System 30-31
Remote Procedure Calls (RPCs)
30-33
Distributed Query Optimization 30-33
Character Set Support for Distributed Environments 30-34
Client/Server Environment 30-34
Homogeneous Distributed Environment 30-35
Heterogeneous Distributed Environment 30-35
31 Managing a Distributed Database
Managing Global Names in a Distributed System 31-1
Understanding How Global Database Names Are Formed 31-1
Determining Whether Global Naming Is Enforced 31-2
Viewing a Global Database Name 31-3
Changing the Domain in a Global Database Name 31-3
xxiv
Changing a Global Database Name: Scenario 31-3
Creating Database Links 31-6
Obtaining Privileges Necessary for Creating Database Links 31-6
Specifying Link Types 31-7
Specifying Link Users 31-8
Using Connection Qualifiers to Specify Service Names Within Link Names 31-10
Using Shared Database Links 31-10
Determining Whether to Use Shared Database Links 31-11
Creating Shared Database Links 31-12
Configuring Shared Database Links 31-12
Managing Database Links 31-14
Closing Database Links 31-14
Dropping Database Links 31-15
Limiting the Number of Active Database Link Connections 31-16
Viewing Information About Database Links 31-16

Determining Which Links Are in the Database 31-16
Determining Which Link Connections Are Open 31-17
Creating Location Transparency 31-18
Using Views to Create Location Transparency 31-19
Using Synonyms to Create Location Transparency 31-20
Using Procedures to Create Location Transparency 31-21
Managing Statement Transparency 31-23
Managing a Distributed Database: Examples 31-24
Example 1: Creating a Public Fixed User Database Link 31-25
Example 2: Creating a Public Fixed User Shared Database Link 31-25
Example 3: Creating a Public Connected User Database Link 31-25
Example 4: Creating a Public Connected User Shared Database Link 31-26
Example 5: Creating a Public Current User Database Link 31-26
32 Developing Applications for a Distributed Database System
Managing the Distribution of Application Data 32-1
Controlling Connections Established by Database Links 32-1
Maintaining Referential Integrity in a Distributed System 32-2
Tuning Distributed Queries 32-2
Using Collocated Inline Views 32-3
Using Cost-Based Optimization 32-3
Using Hints 32-6
Analyzing the Execution Plan 32-7
Handling Errors in Remote Procedures 32-8
33 Distributed Transactions Concepts
What Are Distributed Transactions? 33-1
DML and DDL Transactions 33-2
Transaction Control Statements 33-2
Session Trees for Distributed Transactions 33-3
Clients 33-4
Database Servers 33-4

xxv
Local Coordinators 33-4
Global Coordinator 33-4
Commit Point Site 33-5
Two-Phase Commit Mechanism 33-7
Prepare Phase 33-8
Commit Phase 33-10
Forget Phase 33-11
In-Doubt Transactions 33-11
Automatic Resolution of In-Doubt Transactions 33-12
Manual Resolution of In-Doubt Transactions 33-13
Relevance of System Change Numbers for In-Doubt Transactions 33-14
Distributed Transaction Processing: Case Study 33-14
Stage 1: Client Application Issues DML Statements 33-14
Stage 2: Oracle Database Determines Commit Point Site 33-15
Stage 3: Global Coordinator Sends Prepare Response 33-16
Stage 4: Commit Point Site Commits 33-17
Stage 5: Commit Point Site Informs Global Coordinator of Commit 33-17
Stage 6: Global and Local Coordinators Tell All Nodes to Commit 33-17
Stage 7: Global Coordinator and Commit Point Site Complete the Commit 33-18
34 Managing Distributed Transactions
Specifying the Commit Point Strength of a Node 34-1
Naming Transactions 34-2
Viewing Information About Distributed Transactions 34-2
Determining the ID Number and Status of Prepared Transactions 34-2
Tracing the Session Tree of In-Doubt Transactions 34-4
Deciding How to Handle In-Doubt Transactions 34-5
Discovering Problems with a Two-Phase Commit 34-6
Determining Whether to Perform a Manual Override 34-6
Analyzing the Transaction Data 34-7

Manually Overriding In-Doubt Transactions 34-8
Manually Committing an In-Doubt Transaction 34-8
Manually Rolling Back an In-Doubt Transaction 34-9
Purging Pending Rows from the Data Dictionary 34-9
Executing the PURGE_LOST_DB_ENTRY Procedure 34-10
Determining When to Use DBMS_TRANSACTION 34-10
Manually Committing an In-Doubt Transaction: Example 34-11
Step 1: Record User Feedback 34-11
Step 2: Query DBA_2PC_PENDING 34-11
Step 3: Query DBA_2PC_NEIGHBORS on Local Node 34-13
Step 4: Querying Data Dictionary Views on All Nodes 34-14
Step 5: Commit the In-Doubt Transaction 34-16
Step 6: Check for Mixed Outcome Using DBA_2PC_PENDING 34-16
Data Access Failures Due to Locks 34-17
Transaction Timeouts 34-17
Locks from In-Doubt Transactions 34-17
Simulating Distributed Transaction Failure 34-17

×