Oracle Database 2 Day DBA - Oracle Documentation

8 downloads 195 Views 2MB Size Report
Oracle Database 2 Day DBA, 10g Release 1 (10.1). Part No. ... Oracle is not responsible for the availability of, or any content provided on, third-party Web sites.
Oracle® Database 2 Day DBA 10g Release 1 (10.1) Part No. B10742-03

June 2004

Oracle Database 2 Day DBA, 10g Release 1 (10.1) Part No. B10742-03 Copyright © 2004, Oracle. All rights reserved. Contributing Authors: Michele Cyran

Colin McGregor, Ruth Baylis, Sushil Kumar, Antonio Romero, David Austin, and

Contributors: Daniela Hansell, Donna Keesling, Vasudha Krishnaswamy, Peter Laquerre, Tony Morales, Venkat Maddali, Mughees Minhas, JP Polk, Mark Townsend, and Wanli Yang 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 Corporation, 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 is a registered trademark 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.

Contents Send Us Your Comments ....................................................................................................................... xi Preface ............................................................................................................................................................... xiii Audience..................................................................................................................................................... xiii Documentation Accessibility ................................................................................................................... xiii Structure..................................................................................................................................................... xiv Related Documentation ............................................................................................................................ xv Conventions ............................................................................................................................................... xv

1

Introduction About this Book........................................................................................................................................ What this Book is Not........................................................................................................................ How to Use this Book with Related Material................................................................................. The Oracle Database ................................................................................................................................ Common Oracle DBA Tasks................................................................................................................... Tools for Administering the Database .................................................................................................

2

1-1 1-1 1-1 1-2 1-2 1-2

Installing Oracle and Building the Database Overview of Installation ......................................................................................................................... 2-1 Checking Prerequisites ...................................................................................................................... 2-1 Installation Choices............................................................................................................................ 2-2 Basic Installation Choices........................................................................................................... 2-2 Advanced Installation Choices ................................................................................................. 2-3 Installing Oracle Software and Database ............................................................................................ 2-4 Using DBCA to Create and Configure a Database............................................................................. 2-7 Starting DBCA .................................................................................................................................... 2-7 Using DBCA to Create a Database .................................................................................................. 2-8 Database Templates.................................................................................................................... 2-8 Database Identification............................................................................................................... 2-8 Management Options ................................................................................................................. 2-8 Database Credentials .................................................................................................................. 2-9 Storage Options ........................................................................................................................... 2-9 Database File Locations.............................................................................................................. 2-9 Recovery Configuration ............................................................................................................. 2-9 Database Content ..................................................................................................................... 2-10 iii

Initialization Parameters ......................................................................................................... Database Storage ...................................................................................................................... Creation Options ...................................................................................................................... Using DBCA to Delete a Database................................................................................................ Using DBCA to Configure Database Options............................................................................. Managing Templates with DBCA................................................................................................. Advantages of Using Templates............................................................................................ Types of Templates .................................................................................................................. DBCA Templates Provided by Oracle .................................................................................. Creating Templates Using DBCA.......................................................................................... Deleting DBCA Templates...................................................................................................... Upgrading a Database .......................................................................................................................... Overview of the Database Upgrade Assistant............................................................................ Before the Upgrade .................................................................................................................. During the Upgrade ................................................................................................................ Real Application Clusters Support........................................................................................ Support for Silent Mode.......................................................................................................... Oracle Database Version Restrictions .......................................................................................... Starting the Database Upgrade Assistant .................................................................................... Upgrading the Database Using the Database Upgrade Assistant ........................................... Installation: Oracle by Example Series .............................................................................................

3

Getting Started with Oracle Enterprise Manager Introduction to the Oracle Enterprise Manager Database Control ................................................ Database Management Features ...................................................................................................... Online Help......................................................................................................................................... Navigational Features........................................................................................................................ Starting the Oracle Enterprise Manager Console .............................................................................. Starting dbconsole in Windows ....................................................................................................... Accessing the Oracle Enterprise Manager Database Control .......................................................... Granting Database Control Administrative Privileges ................................................................... Setting Up Enterprise Manager Preferences ....................................................................................... Defining Blackout Time Periods ...................................................................................................... Setting Preferred Credentials ........................................................................................................... SQL Statements and Other Management Tools: SQL*Plus and iSQL*Plus ................................. Starting SQL*Plus............................................................................................................................... Starting iSQL*Plus.............................................................................................................................. Managing Your Database: A Roadmap ................................................................................................ Getting Started: Oracle by Example Series .........................................................................................

4

3-1 3-1 3-2 3-2 3-2 3-3 3-3 3-4 3-5 3-5 3-6 3-6 3-7 3-7 3-7 3-8

Configuring the Network Environment Understanding Network Configuration............................................................................................... Oracle Net Listener Configuration .................................................................................................. Client Configuration .......................................................................................................................... Connection Requests.......................................................................................................................... Naming Methods ............................................................................................................................... Local Naming ..............................................................................................................................

iv

2-10 2-12 2-12 2-12 2-12 2-12 2-12 2-13 2-13 2-14 2-14 2-15 2-15 2-15 2-15 2-15 2-15 2-16 2-16 2-16 2-20

4-1 4-1 4-2 4-2 4-2 4-3

Directory Naming ....................................................................................................................... Easy Connect Naming................................................................................................................ External Naming ......................................................................................................................... Tools for Network Configuration .......................................................................................................... Oracle Net Configuration Assistant ................................................................................................ Enterprise Manager............................................................................................................................ Oracle Net Manager........................................................................................................................... Viewing Listener Configuration ............................................................................................................ Starting and Shutting Down the Listener ........................................................................................... Configuring Oracle Networking on Client Machines....................................................................... Networking: Oracle by Example Series ...............................................................................................

5

Managing the Oracle Instance Overview of an Instance and Instance Management ....................................................................... Instance Memory Structure ............................................................................................................. The System Global Area (SGA)................................................................................................. Program Global Area (PGA) ..................................................................................................... Oracle Background Processes........................................................................................................... Accessing the Database ..................................................................................................................... How the Oracle Instance and Database are Started............................................................... Server and Client Processes....................................................................................................... Network Connections................................................................................................................. About Initialization Parameters ....................................................................................................... Shutting Down and Restarting the Instance and Database ............................................................. Starting and Shutting Down the Database Instance on Windows.............................................. Viewing and Modifying Initialization Parameters ........................................................................... Managing Memory Parameters ............................................................................................................. Modifying Memory Parameters....................................................................................................... Instances: Oracle by Example Series ....................................................................................................

6

4-3 4-3 4-3 4-3 4-3 4-3 4-4 4-4 4-5 4-5 4-6

5-1 5-2 5-2 5-3 5-3 5-4 5-4 5-5 5-5 5-6 5-6 5-7 5-7 5-9 5-9 5-9

Managing Database Storage Structures Exploring the Storage Structure of Your Database ............................................................................ Control File.......................................................................................................................................... Redo Log Files .................................................................................................................................... Multiplexing the Redo Log........................................................................................................ Archive Log Files................................................................................................................................ Rollback Segments ............................................................................................................................. Tablespaces ......................................................................................................................................... Tablespaces Page......................................................................................................................... Some Tablespaces in the Database ........................................................................................... Temporary Tablespace Groups................................................................................................. Datafiles ............................................................................................................................................... Other Storage Structures ................................................................................................................... Initialization Parameter File ..................................................................................................... Password File............................................................................................................................... Backup Files .................................................................................................................................

6-1 6-2 6-2 6-3 6-4 6-4 6-4 6-4 6-5 6-6 6-6 6-6 6-6 6-7 6-7

v

Common DBA Tasks for Managing Database Storage ..................................................................... 6-7 Viewing Tablespaces in Your Database.......................................................................................... 6-7 Creating a Tablespace........................................................................................................................ 6-7 Modifying a Tablespace .................................................................................................................... 6-9 Dropping a Tablespace................................................................................................................... 6-10 Reclaiming Wasted Space .............................................................................................................. 6-10 Using the Segment Advisor.................................................................................................... 6-10 Shrinking Database Objects.................................................................................................... 6-11 Managing Undo for Your Database ................................................................................................... 6-12 About Undo ..................................................................................................................................... 6-12 Undo Tablespace Size and Retention Time ................................................................................. 6-12 Automatic Undo Management...................................................................................................... 6-13 Undo Management with Enterprise Manager ............................................................................ 6-13 Using Oracle Recommendations for Managing Undo .............................................................. 6-14 Extending the Undo Tablespace ............................................................................................ 6-14 Using the Undo Advisor ................................................................................................................ 6-14 Setting New Threshold Undo Retention Time .................................................................... 6-15 Making Changes to the Database Storage Structure...................................................................... 6-15 Storage: Oracle by Example Series..................................................................................................... 6-16

7

Administering Users and Security Overview of Users and Security ............................................................................................................ 7-1 Database Administrative Accounts ................................................................................................. 7-3 SYS................................................................................................................................................. 7-3 SYSTEM ........................................................................................................................................ 7-4 Administrative Privileges .......................................................................................................... 7-4 Administering Roles................................................................................................................................ 7-4 Viewing Roles ..................................................................................................................................... 7-5 Creating a New Role.......................................................................................................................... 7-6 Modifying Roles ................................................................................................................................. 7-6 Dropping Roles................................................................................................................................... 7-7 Administering Profiles ............................................................................................................................ 7-7 Administering Database Users .............................................................................................................. 7-7 Creating Users .................................................................................................................................... 7-8 Using a Shortcut to Create Users .................................................................................................. 7-10 Editing Users.................................................................................................................................... 7-10 Unlocking Accounts and Resetting Passwords ................................................................... 7-10 Granting Roles.......................................................................................................................... 7-11 Revoking Roles......................................................................................................................... 7-11 Dropping Users ............................................................................................................................... 7-12 Users: Oracle by Example Series ........................................................................................................ 7-12

8

Managing Schema Objects Overview of Schemas and Common Schema Objects ...................................................................... Exploring Your Database’s Schema Objects................................................................................... Managing Database Objects ............................................................................................................. Managing Tables ......................................................................................................................................

vi

8-1 8-2 8-2 8-3

Viewing Tables ................................................................................................................................... 8-3 Viewing Table Data............................................................................................................................ 8-4 Creating Tables ................................................................................................................................... 8-5 Types of Table.............................................................................................................................. 8-5 Column Attributes ...................................................................................................................... 8-5 Table Level Constraints.............................................................................................................. 8-8 Storage Attributes ....................................................................................................................... 8-9 Other Table Creation Considerations ...................................................................................... 8-9 Estimating the Size of New Tables ........................................................................................ 8-10 Table Creation Example .......................................................................................................... 8-10 Modifying Table Attributes ........................................................................................................... 8-11 Adding a Column .................................................................................................................... 8-12 Dropping a Column................................................................................................................. 8-12 Creating a New Table Constraint .......................................................................................... 8-12 Modifying an Existing Constraint ......................................................................................... 8-13 Dropping a Constraint ............................................................................................................ 8-13 Dropping a Table............................................................................................................................. 8-13 Managing Indexes ................................................................................................................................. 8-14 Viewing Indexes .............................................................................................................................. 8-14 Creating a New Index..................................................................................................................... 8-14 Index Types............................................................................................................................... 8-14 Index Creation Example.......................................................................................................... 8-15 Dropping Indexes............................................................................................................................ 8-16 Managing Views.................................................................................................................................... 8-16 View Creation Example.................................................................................................................. 8-17 Managing Database Resident Program Units.................................................................................. 8-17 Managing Packages ........................................................................................................................ 8-18 Managing Package Bodies ............................................................................................................. 8-19 Managing Standalone Subprograms ............................................................................................ 8-19 Managing Triggers.......................................................................................................................... 8-19 Other Schema Objects .......................................................................................................................... 8-20 Loading Data Into Tables..................................................................................................................... 8-21 Managing Access to Schema Objects ................................................................................................ 8-23 Some Schemas of Interest .................................................................................................................... 8-24 SYS Schema ...................................................................................................................................... 8-24 SYSTEM Schema.............................................................................................................................. 8-24 Sample Schemas .............................................................................................................................. 8-24 Schemas: Oracle by Example Series .................................................................................................. 8-25

9

Performing Backup and Recovery Overview of Oracle Backup and Recovery.......................................................................................... Oracle Backup, Restore and Recovery Concepts........................................................................... Consistent and Inconsistent Backups....................................................................................... Media Recovery........................................................................................................................... The RMAN Repository............................................................................................................... The Flash Recovery Area ........................................................................................................... Configuring Your Database for Basic Backup and Recovery...........................................................

9-1 9-2 9-2 9-3 9-3 9-3 9-4

vii

Planning Space Usage and Location for the Flash Recovery Area ............................................. 9-4 Retention Policy and the Flash Recovery Area....................................................................... 9-4 Sizing the Flash Recovery Area ................................................................................................ 9-5 Credentials for Performing Oracle Enterprise Manager Backup and Recovery....................... 9-6 Configuring the Flash Recovery Area and ARCHIVELOG Mode ............................................. 9-6 Configuring Backup Settings............................................................................................................ 9-7 Understanding Backup Device Settings for Disk ................................................................... 9-7 Configuring Backup Policy Settings......................................................................................... 9-9 Recording Your DBID and DB_UNIQUE_NAME ........................................................................ 9-9 Backing Up Your Database .................................................................................................................. 9-10 Database Backup Concepts............................................................................................................ 9-10 Full Backups of Datafiles ........................................................................................................ 9-10 Incremental Backups of Datafiles .......................................................................................... 9-10 Incrementally Updated Backups: Rolling Forward Image Copies of Datafiles.............. 9-11 Tagging Backups ...................................................................................................................... 9-11 Performing and Scheduling Backups with Enterprise Manager.............................................. 9-11 Performing a Whole Database Backup with Oracle Enterprise Manager ....................... 9-11 Using the Oracle-Suggested Backup Strategy ..................................................................... 9-14 Scheduling Other Backup Tasks ............................................................................................ 9-15 Validating Backups ......................................................................................................................... 9-16 Restore and Recovery Operations ...................................................................................................... 9-16 Recovering a Whole Database from Backup ............................................................................... 9-17 Recovering from a Lost SPFILE or Control File .................................................................. 9-18 Returning a Table to a Past State: Flashback Table .................................................................... 9-18 Enabling Row Movement on a Table .................................................................................... 9-18 Performing Flashback Table................................................................................................... 9-19 Recovering Dropped Tables: Flashback Drop ............................................................................ 9-20 Managing Your Backups ...................................................................................................................... 9-21 Using the Manage Current Backups Page in Enterprise Manager .......................................... 9-22 Crosschecking Backups .................................................................................................................. 9-23 Deleting Expired Backups.............................................................................................................. 9-23 Deleting Obsolete Backups ............................................................................................................ 9-24 Marking Backups Unavailable ...................................................................................................... 9-24 Cataloging Additional Backups .................................................................................................... 9-24 Backup and Recovery: Oracle by Example Series........................................................................... 9-25

10

Monitoring and Tuning the Database Proactive Database Monitoring .......................................................................................................... Alerts ................................................................................................................................................. Performance Self-Diagnostics: Automatic Database Diagnostics Monitor ........................... Monitoring General Database State and Workload ................................................................... Managing Alerts.............................................................................................................................. Viewing Metrics and Thresholds........................................................................................... Setting Metric Thresholds....................................................................................................... Setting up Notification ............................................................................................................ Responding to Alerts............................................................................................................... Clearing Alerts..........................................................................................................................

viii

10-1 10-1 10-2 10-2 10-3 10-3 10-5 10-6 10-7 10-7

Diagnosing Performance Problems ................................................................................................... Viewing Performance Analysis..................................................................................................... Responding to Performance Findings.......................................................................................... Modifying Default ADDM Behavior ........................................................................................... Running ADDM Manually ............................................................................................................ Using Advisors to Optimize Database Performance...................................................................... About Performance Advisors...................................................................................................... Using the SQL Tuning Advisor................................................................................................... Using the SQL Access Advisor.................................................................................................... Using the Memory Advisor ......................................................................................................... Monitoring and Tuning: Oracle by Example Series .....................................................................

10-7 10-8 10-8 10-8 10-9 10-9 10-10 10-11 10-12 10-12 10-13

Index

ix

x

Send Us Your Comments Oracle Database 2 Day DBA, 10g Release 1 (10.1) Part No. B10742-03

Oracle welcomes your comments and suggestions on the quality and usefulness of this publication. Your input is an important part of the information used for revision. ■

Did you find any errors?



Is the information clearly presented?



Do you need more information? If so, where?



Are the examples correct? Do you need more examples?



What features did you like most about this manual?

If you find any errors or have any other suggestions for improvement, please indicate the title and part number of the documentation and the chapter, section, and page number (if available). You can send comments to us in the following ways: ■

Electronic mail: [email protected]



FAX: (650) 506-7227. Attn: Server Technologies Documentation Manager



Postal service: Oracle Corporation Server Technologies Documentation Manager 500 Oracle Parkway, Mailstop 4op11 Redwood Shores, CA 94065 USA

If you would like a reply, please give your name, address, telephone number, and electronic mail address (optional). If you have problems with the software, please contact your local Oracle Support Services.

xi

xii

Preface This preface contains these topics: ■

Audience



Documentation Accessibility



Structure



Related Documentation



Conventions

Audience Oracle Database 2 Day DBA is for anyone who wants to perform common day-to-day administrative tasks with the Oracle Database. Prior knowledge or experience with managing databases is not required. The only requirement is a basic knowledge of computers. In particular this book is targeted toward the following groups of Oracle users: ■

Developers wanting to acquire part-time DBA skills



Anyone managing departmental servers



Database administrators managing an Oracle database for small or medium business (SMB)

This book is equally useful for enterprise DBAs. It provides recommended best practices and describes efficient ways of performing administrative tasks with Oracle Enterprise Manager as the primary interface.

Documentation Accessibility Our goal is to make Oracle products, services, and supporting documentation accessible, with good usability, to the disabled community. To that end, our documentation includes features that make information available to users of assistive technology. This documentation is available in HTML format, and contains markup to facilitate access by the disabled community. Standards will continue to evolve over time, and Oracle is actively engaged with other market-leading technology vendors to address technical obstacles so that our documentation can be accessible to all of our customers. For additional information, visit the Oracle Accessibility Program Web site at http://www.oracle.com/accessibility/

xiii

Accessibility of Code Examples in Documentation JAWS, a Windows screen reader, may not always correctly read the code examples in this document. The conventions for writing code require that closing braces should appear on an otherwise empty line; however, JAWS may not always read a line of text that consists solely of a bracket or brace. Accessibility of Links to External Web Sites in Documentation This documentation may contain links to Web sites of other companies or organizations that Oracle does not own or control. Oracle neither evaluates nor makes any representations regarding the accessibility of these Web sites.

Structure This document contains: Chapter 1, "Introduction" This chapter contains an brief overview of Oracle database administration. Chapter 2, "Installing Oracle and Building the Database" This chapter discusses how to install the Oracle software and database. It also describes how to configure additional databases, and how to upgrade and older version of a database to the current version. Chapter 3, "Getting Started with Oracle Enterprise Manager" This chapter introduces you to the Oracle Enterprise Manager and how to use it. Chapter 4, "Configuring the Network Environment" This chapter discusses how to configure a network so that clients can access your databases. Chapter 5, "Managing the Oracle Instance" This chapter discusses starting and stopping the database instance, and managing initialization parameters. Chapter 6, "Managing Database Storage Structures" This chapter discusses management of the database’s storage structure. Chapter 7, "Administering Users and Security" This chapter discusses how to add and maintain user accounts. It includes information about using system privileges and roles to control user access to the database. Chapter 8, "Managing Schema Objects" This chapter discusses managing tables, indexes, and other schema objects. Chapter 9, "Performing Backup and Recovery" This chapter discusses how to backup and recover your database. Chapter 10, "Monitoring and Tuning the Database" This chapter discusses monitoring database activities and diagnosing performance problems.

xiv

Related Documentation For more information, see these Oracle resources: ■

Oracle Database Administrator's Guide



Oracle Enterprise Manager Advanced Configuration



Oracle Database Concepts



Oracle Enterprise Manager Concepts



Oracle Net Services Administrator's Guide



Oracle Database SQL Reference



Oracle Database Reference



Oracle Database Backup and Recovery Basics



Oracle Database Backup and Recovery Advanced User's Guide



Oracle Database Installation Guide for Windows



Oracle Database 10g Installation Guide, Release 1 (10.1) Beta for UNIX Systems: AIX-Based Systems, HP-UX, HP Tru64 UNIX, Linux, and the Solaris Operating System (SPARC)

Many of the examples in this book use the sample schemas, which are installed by default when you select the Basic Installation option with an Oracle Database installation. Refer to Oracle Database Sample Schemas for information on how these schemas were created and how you can use them yourself. Printed documentation is available for sale in the Oracle Store at http://oraclestore.oracle.com/

To download free release notes, installation documentation, white papers, or other collateral, please visit the Oracle Technology Network (OTN). You must register online before using OTN; registration is free and can be done at http://otn.oracle.com/membership/

If you already have a username and password for OTN, then you can go directly to the documentation section of the OTN Web site at http://otn.oracle.com/documentation/

Conventions This section describes the conventions used in the text and code examples of this documentation set. It describes: ■

Conventions in Text



Conventions in Code Examples



Conventions for Windows Operating Systems

Conventions in Text We use various conventions in text to help you more quickly identify special terms. The following table describes those conventions and provides examples of their use.

xv

Convention

Meaning

Bold

Bold typeface indicates terms that are When you specify this clause, you create an defined in the text or terms that appear in a index-organized table. glossary, or both.

Italics

Italic typeface indicates book titles or emphasis.

Oracle Database Concepts

Uppercase monospace typeface indicates elements supplied by the system. Such elements include parameters, privileges, datatypes, RMAN keywords, SQL keywords, SQL*Plus or utility commands, packages and methods, as well as system-supplied column names, database objects and structures, usernames, and roles.

You can specify this clause only for a NUMBER column.

Lowercase monospace typeface indicates executable programs, filenames, directory names, and sample user-supplied elements. Such elements include computer and database names, net service names and connect identifiers, user-supplied database objects and structures, column names, packages and classes, usernames and roles, program units, and parameter values.

Enter sqlplus to start SQL*Plus.

UPPERCASE monospace (fixed-width) font

lowercase monospace (fixed-width) font

Note: Some programmatic elements use a mixture of UPPERCASE and lowercase. Enter these elements as shown. lowercase italic monospace (fixed-width) font

Example

Ensure that the recovery catalog and target database do not reside on the same disk.

You can back up the database by using the BACKUP command. Query the TABLE_NAME column in the USER_ TABLES data dictionary view. Use the DBMS_STATS.GENERATE_STATS procedure.

The password is specified in the orapwd file. Back up the datafiles and control files in the /disk1/oracle/dbs directory. The department_id, department_name, and location_id columns are in the hr.departments table. Set the QUERY_REWRITE_ENABLED initialization parameter to true. Connect as oe user. The JRepUtil class implements these methods.

Lowercase italic monospace font represents You can specify the parallel_clause. placeholders or variables. Run old_release.SQL where old_release refers to the release you installed prior to upgrading.

Conventions in Code Examples Code examples illustrate SQL, PL/SQL, SQL*Plus, or other command-line statements. They are displayed in a monospace (fixed-width) font and separated from normal text as shown in this example: SELECT username FROM dba_users WHERE username = 'MIGRATE';

The following table describes typographic conventions used in code examples and provides examples of their use. Convention

Meaning

Example

[ ]

Anything enclosed in brackets is optional.

DECIMAL (digits [ , precision ])

{ }

Braces are used for grouping items.

{ENABLE | DISABLE}

|

A vertical bar represents a choice of two options.

{ENABLE | DISABLE} [COMPRESS | NOCOMPRESS]

xvi

Convention

Meaning

Example

...

Ellipsis points mean repetition in syntax descriptions.

CREATE TABLE ... AS subquery;

In addition, ellipsis points can mean an omission in code examples or text.

SELECT col1, col2, ... , coln FROM employees;

Other symbols

You must use symbols other than brackets ([ ]), braces ({ }), vertical bars (|), and ellipsis points (...) exactly as shown.

acctbal NUMBER(11,2); acct CONSTANT NUMBER(4) := 3;

Italics

Italicized text indicates placeholders or variables for which you must supply particular values.

CONNECT SYSTEM/system_password DB_NAME = database_name

UPPERCASE

Uppercase typeface indicates elements supplied by the system. We show these terms in uppercase in order to distinguish them from terms you define. Unless terms appear in brackets, enter them in the order and with the spelling shown. Because these terms are not case sensitive, you can use them in either UPPERCASE or lowercase.

SELECT last_name, employee_id FROM employees; SELECT * FROM USER_TABLES; DROP TABLE hr.employees;

lowercase

Lowercase typeface indicates user-defined programmatic elements, such as names of tables, columns, or files.

SELECT last_name, employee_id FROM employees; sqlplus hr/hr CREATE USER mjones IDENTIFIED BY ty3MU9;

Note: Some programmatic elements use a mixture of UPPERCASE and lowercase. Enter these elements as shown.

Conventions for Windows Operating Systems The following table describes conventions for Windows operating systems and provides examples of their use.

Convention

Meaning

Example

Choose Start > menu item

How to start a program.

To start the Database Configuration Assistant, choose Start > Programs > Oracle - HOME_ NAME > Configuration and Migration Tools > Database Configuration Assistant.

File and directory names

c:\winnt"\"system32 is the same as File and directory names are not case sensitive. The following special characters C:\WINNT\SYSTEM32 are not allowed: left angle bracket (), colon (:), double quotation marks ("), slash (/), pipe (|), and dash (-). The special character backslash (\) is treated as an element separator, even when it appears in quotes. If the filename begins with \\, then Windows assumes it uses the Universal Naming Convention.

C:\>

Represents the Windows command prompt of the current hard disk drive. The escape character in a command prompt is the caret (^). Your prompt reflects the subdirectory in which you are working. Referred to as the command prompt in this manual.

C:\oracle\oradata>

xvii

Convention

Meaning

Special characters

C:\>exp HR/HR TABLES=employees The backslash (\) special character is sometimes required as an escape character QUERY=\"WHERE job_id='SA_REP' and for the double quotation mark (") special salary