As such, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation and technical data, shall be subject to the licensing restrictions set forth
Trang 1Oracle® Database
Administrator's Guide
11g Release 1 (11.1)
B28310-03
October 2007
Trang 2
Oracle Database Administrator’s Guide, 11g Release 1 (11.1)
B28310-03
Copyright © 2001, 2007, Oracle All rights reserved.
Primary Author: Steve Fogel
Contributing Author: Tony Morales, Padmaja Potineni, Sheila Moore
Contributors: David Austin, Bharat Baddepudi, Prasad Bagal, Cathy Baird, Mark Bauer, Eric Belden, Allen Brumm, Atif Chaudhry, Sudip Datta, Mark Dilman, Jacco Draaijer, Harvey Eneman, Marcus Fallen, Amit Ganesh, GP Gongloor, Vira Goorah, Carolyn Gray, Joan Gregoire, Shivani Gupta, Daniela Hansell, Lilian Hobbs, Bill Hodak, Wei Huang, Pat Huey, Robert Jenkins, Bhushan Khaladkar, Balaji Krishnan, Srinath Krishnaswamy, 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, Catherine Luu, Scott Lynn, Raghu Mani, Vineet Marwah, Colin McGregor, Mughees Minhas, Krishna Mohan, Sheila Moore, Valarie Moore, Niloy Mukherjee, Sujatha Muthulingam, Gary Ngai, Waleed Ojeil, Rod Payne, Hanlin Qian, Ananth Raghavan, Mark Ramacher, Ravi Ramkissoon, Ann Rhee, Yair Sarig, Vikram Shukla, Bipul Sinha, Anupam Singh, Wayne Smith, Jags Srinivasan, Deborah Steiner, Janet Stern, Michael Stewart, Mahesh Subramaniam, Nick Taylor, Anh-Tuan Tran, Alex Tsukerman, Kothanda Umamageswaran, Guhan
Viswanathan, Eric Voss, Daniel M Wong, Wanli Yang, Paul Youn, Wei Zhang
The Programs (which include both the software and documentation) contain proprietary information; they are provided under a license agreement containing restrictions on use and disclosure and are also protected
by copyright, patent, and other intellectual and industrial property laws Reverse engineering, disassembly,
or decompilation of the Programs, except to the extent required to obtain interoperability with other independently created software or as specified by law, is prohibited.
The information contained in this document is subject to change without notice If you find any problems in the documentation, please report them to us in writing This document is not warranted to be error-free Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose.
If the Programs are delivered to the United States Government or anyone licensing or using the Programs
on behalf of the United States 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, use, duplication, disclosure, modification, and adaptation of the Programs, including documentation and technical data, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement, and, to the extent applicable, the additional rights set forth in FAR 52.227-19, Commercial Computer Software Restricted Rights (June 1987) Oracle USA, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications It shall be the licensee's responsibility to take all appropriate fail-safe, backup, redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and we disclaim liability for any damages caused by such use of the Programs
Oracle, JD Edwards, PeopleSoft, and Siebel are registered trademarks of Oracle Corporation and/or its affiliates Other names may be trademarks of their respective owners.
The Programs may provide links to Web sites and access to content, products, and services from third parties Oracle is not responsible for the availability of, or any content provided on, third-party Web sites You bear all risks associated with the use of such content If you choose to purchase any products or services from a third party, the relationship is directly between you and the third party Oracle is not responsible for: (a) the quality of third-party products or services; or (b) fulfilling any of the terms of the agreement with the third party, including delivery of products or services and warranty obligations related to purchased products or services Oracle is not responsible for any loss or damage of any sort that you may incur from dealing with any third party
Trang 3Contents
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 1 (11.1) 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-6 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-11
Trang 4Release Number Format 1-11 Checking Your Current Release Number 1-12
About Database Administrator Security and Privileges 1-13 The Database Administrator's Operating System Account 1-13 Administrative User Accounts 1-13
Database Administrator Authentication 1-14 Administrative Privileges 1-15 Selecting an Authentication Method for Database Administrators 1-16 Using Operating System Authentication 1-18 Using Password File Authentication 1-19
Creating and Maintaining a Password File 1-21 Using ORAPWD 1-21 Setting REMOTE_LOGIN_ PASSWORDFILE 1-23 Adding Users to a Password File 1-23 Maintaining a Password File 1-25
Data Utilities 1-25
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-4
Creating a Database with the CREATE DATABASE Statement 2-4 Step 1: Specify an Instance Identifier (SID) 2-5 Step 2: Ensure That the Required Environment Variables Are Set 2-6 Step 3: Choose a Database Administrator Authentication Method 2-6 Step 4: Create the Initialization Parameter File 2-7 Step 5: (Windows Only) Create an Instance 2-7 Step 6: Connect to the Instance 2-8 Step 7: Create a Server Parameter File 2-8 Step 8: Start the Instance 2-9 Step 9: Issue the CREATE DATABASE Statement 2-9 Step 10: Create Additional Tablespaces 2-13 Step 11: Run Scripts to Build Data Dictionary Views 2-13 Step 12: Run Scripts to Install Additional Options (Optional) 2-13 Step 13: Back Up the Database 2-14 Step 14: (Optional) Enable Automatic Instance Startup 2-14
Understanding the CREATE DATABASE Statement 2-14 Protecting Your Database: Specifying Passwords for Users SYS and SYSTEM 2-15 Creating a Locally Managed SYSTEM Tablespace 2-15 About the SYSAUX Tablespace 2-16 Using Automatic Undo Management: Creating an Undo Tablespace 2-17 Creating a Default Permanent Tablespace 2-18 Creating a Default Temporary Tablespace 2-18 Specifying Oracle-Managed Files at Database Creation 2-18 Supporting Bigfile Tablespaces During Database Creation 2-20 Specifying the Database Time Zone and Time Zone File 2-21 Specifying FORCE LOGGING Mode 2-22
Trang 5Understanding Initialization Parameters 2-23 Determining the Global Database Name 2-25 Specifying a Flash Recovery Area 2-26 Specifying Control Files 2-26 Specifying Database Block Sizes 2-27 Specifying the Maximum Number of Processes 2-28 Specifying the DDL Lock Timeout 2-28 Specifying the Method of Undo Space Management 2-28 AboutThe COMPATIBLE Initialization Parameter 2-29 Setting the License Parameter 2-30
Troubleshooting Database Creation 2-30
Dropping a Database 2-30
Managing Initialization Parameters Using a Server Parameter File 2-31 What Is a Server Parameter File? 2-31 Migrating to a Server Parameter File 2-32 Creating a Server Parameter File 2-32 Storing the Server Parameter File on HARD-Enabled Storage 2-34 The SPFILE Initialization Parameter 2-36 Changing Initialization Parameter Values 2-36 Clearing Initialization Parameter Values 2-38 Exporting the Server Parameter File 2-38 Backing Up the Server Parameter File 2-38 Recovering a Lost or Damaged Server Parameter File 2-39 Viewing Parameter Settings 2-39
Defining Database Services 2-40 Deploying Services 2-41 Configuring Services 2-42 Using Services 2-42
Considerations After Creating a Database 2-43 Some Security Considerations 2-43 Enabling Transparent Data Encryption 2-44 Creating a Secure External Password Store 2-44 Installing the Oracle Database Sample Schemas 2-45
Database Data Dictionary Views 2-45
3 Starting Up and Shutting Down
Starting Up a Database 3-1 Options for Starting Up a Database 3-1 Understanding Initialization Parameter Files 3-2 Preparing to Start Up an Instance 3-4 Starting Up an Instance 3-4
Altering Database Availability 3-7 Mounting a Database to an Instance 3-7 Opening a Closed Database 3-7 Opening a Database in Read-Only Mode 3-8 Restricting Access to an Open Database 3-8
Shutting Down a Database 3-8
Trang 6dropping, 22-12
file mapping views, 13-22
FOR UPDATE clause and, 22-2
invalid, 22-5
join See join views.
location transparency in distributed
databases, 30-19
managing, 22-1, 22-4
managing privileges with, 30-20
name resolution in distributed databases, 29-29
ORDER BY clause and, 22-2
remote object security, 30-20
restrictions, 22-5
USER_RESUMABLE, 17-12
using, 22-4
V$ARCHIVE, 11-14
V$ARCHIVE_DEST, 11-8
V$DATABASE, 11-15
V$LOG, 11-14
V$LOGFILE, 10-12
V$OBJECT_USAGE, 19-14
wildcards in, 22-3
WITH CHECK OPTION, 22-2
virtual columns, 18-2
indexing, 19-3
W
wallet, Oracle, 12-8, 18-6
wildcards
in views, 22-3
window groups
creating, 27-30
disabling, 27-32
dropping, 27-31
dropping a member from, 27-32
enabling, 27-32
overview, 26-10
using, 27-30
window logs, 27-23
windows (Scheduler)
altering, 27-25
closing, 27-26
creating, 27-23
disabling, 27-27
dropping, 27-26
enabling, 27-27
opening, 27-25
overlapping, 27-28
overview, 26-9
using, 27-22
WORM devices
and read-only tablespaces, 12-19
WRH$_UNDOSTAT view, 14-12
X
XMLTypes
in transportable tablespaces, 12-32
Trang 7Index-28