Oracle Database Online Documentation 11g Release 2 (11.2)
DBA Essentials
Manage all aspects of your Oracle databases with the Enterprise Manager GUI.
翻译:前言
Oracle Database 2 Day DBA is a database administration quick start guide that teaches you how to perform day-to-day database administrative tasks. The goal of this book is to help you understand the concepts behind Oracle Database. It teaches you how to perform all common administration tasks needed to keep the database operational, including how to perform basic troubleshooting and performance monitoring activities.
翻译:Oracle Database 2天DBA是教会你如何进行每天的数据库管理任务快速入门向导。本手册的目标是帮助你理解Oracle深层次的相关内容。手册教会你如何进行日常的保证数据库正常操作相关的管理任务,包括基本的故障排查和日常监控任务。
Audience
翻译:
面向人员
Oracle Database 2 Day DBA is for anyone who wants to perform basic administrative tasks with Oracle Database. Only minimal basic knowledge of or experience with database management is required, and a basic knowledge of computers.
翻译:
Oracle 2天DBA是面向任何想要执行oracle基础任务管理的人员,仅仅是需要最基础的数据库管理和基本的计算机技能。
In particular, this guide is for the following groups of Oracle users:
翻译:
特别说明下,这个向导是面向一下Oracle用户组的
•Developers who want to acquire basic database administrator (DBA) skills
翻译:掌握基本DBA技能的开发人员
•Anyone managing database servers
翻译:管理数据库服务器的任何人员
•Database administrators managing an Oracle database for a small or medium-sized business
翻译:中小型企业的Oracle管理人员
This book is equally useful for enterprise DBAs. It recommends best practices and describes efficient ways of performing administrative tasks with Oracle Enterprise Manager as the primary interface.
翻译:本手册对于企业DBA是非常有用的,它推荐了最佳实践,并描述了以Oracle Enterprise Manager为主要界面执行管理任务的有效方法。
Documentation Accessibility
翻译:文档可访问性
For information about Oracle’s commitment to accessibility, visit the Oracle Accessibility Program website at http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
翻译:有关Oracle对可访问性的承诺的信息,请访问
http://www.oracle.com/pls/topic/lookup?ctx=acc&id=docacc.
Access to Oracle Support
翻译:访问Oracle支持
Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired.
翻译:有My Oracle Support信息相关的客户,请访问http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs
Related Documentation
翻译:相关文档
For more information, see these Oracle resources:
翻译:更多信息,请查看一下Oracle资源
•Oracle Database Administrator’s Guide
•Oracle Enterprise Manager Advanced Configuration
•Oracle Database Concepts
•Oracle Enterprise Manager Concepts
•Oracle Database Net Services Administrator’s Guide
•Oracle Database SQL Language Reference
•Oracle Database Reference
•Oracle Database Backup and Recovery User’s Guide
•Oracle Real Application Clusters Installation Guide for Linux and UNIX or other operating system
•Oracle Real Application Clusters Administration and Deployment Guide
•Oracle Clusterware Administration and Deployment Guide
•Oracle Automatic Storage Management Administrator’s Guide
•Oracle Database Installation Guide
There are also several other 2 Day + books available for a variety of topics:
•Oracle Database 2 Day + Security Guide
•Oracle Database 2 Day + Data Warehousing Guide
•Oracle Database 2 Day + Data Replication and Integration Guide
•Oracle Database 2 Day + Performance Tuning Guide
•Oracle Database 2 Day + Real Application Clusters Guide
•Oracle Database 2 Day Developer’s Guide
•Oracle Database 2 Day + .NET Developer’s Guide for Microsoft Windows
•Oracle Database 2 Day + PHP Developer’s Guide
•Oracle Database 2 Day + Application Express Developer’s Guide
•Oracle Database 2 Day + Java Developer’s Guide
Many of the examples in this guide use the sample schemas, which are installed by default when you select the Basic Installation option with an Oracle Database installation. See Oracle Database Sample Schemas for information about how these schemas were created and how you can use them.
翻译:在手册中的样例使用的是样例schemas,当你选择最基本的Oracle数据库安装方式是默认安装的,关于如何创建和使用请看Oracle Database Sample Schemas。
To download free release notes, installation documentation, updated Oracle documentation, white papers, or other collateral, visit the Oracle Technology Network (OTN). You must register online before using OTN; registration is free and can be done at
http://www.oracle.com/technetwork/community/join/overview/index.html
If you have a user name and password for OTN, then you can go directly to the documentation section of the OTN Web site at
http://www.oracle.com/technology/documentation/
Conventions
The following text conventions are used in this document:
Convention
Meaning
boldface Boldface type indicates graphical user interface elements associated with an action, or terms defined in text or the glossary.
italic Italic type indicates book titles, emphasis, or placeholder variables for which you supply particular values.
monospace Monospace type indicates commands within a paragraph, URLs, code in examples, text that appears on the screen, or text that you enter.
As a database administrator (DBA), you are responsible for the overall operation of Oracle Database. This introductory chapter is intended to help orient you to many common DBA tasks, to the tools available to you, and to this guide. The chapter contains the following sections:
翻译:作为一个DBA,你是需要对Oracle正常运行负责的。本介绍性章节旨在帮助您了解许多常见的DBA任务、您可用的工具以及本指南。本章包括以下各节
•About This Guide
翻译:关于本向导
•About Oracle Database
翻译:关于Oracle 数据库
•Common Oracle DBA Tasks
翻译:常见的Oracle DBA任务
•Tools for Administering the Database
翻译:数据库管理工具
About This Guide
翻译:关于本向导
Oracle Database 2 Day DBA is a database administration quick start guide that teaches you how to perform day-to-day database administrative tasks. The goal of this guide is to help you understand the concepts behind Oracle Database, and to help you learn how to perform all common administrative tasks needed to keep the database operational. These tasks include configuring the database, managing memory and storage, managing users, managing database objects such as tables, performing basic troubleshooting, creating backups for your database, performance monitoring activities, and more.
翻译:
Oracle数据库2天DBA是一个数据库管理快速入门指南,它教您如何执行日常数据库管理任务。本指南的目标是帮助您了解Oracle数据库背后的概念,并帮助您了解如何执行保持数据库正常运行所需的所有常见管理任务。这些任务包括配置数据库、管理内存和存储、管理用户、管理数据库对象(如表)、执行基本故障排除、为数据库创建备份、性能监视活动等等。
The primary administrative interface used in this guide is Oracle Enterprise Manager Database Control, featuring all the self-management capabilities introduced in Oracle Database.
翻译:
本指南中使用的主要管理界面是Oracle Enterprise Manager数据库控制,它具有Oracle数据库中引入的所有自我管理功能。
What This Guide Is Not
Oracle Database 2 Day DBA is task-oriented. The objective is to describe why and when administrative tasks must be performed. Where appropriate, it describes the concepts necessary to understand and complete a task, assuming the reader has no prior knowledge of the database. This guide is not an exhaustive discussion of all Oracle Database concepts. For this type of information, see Oracle Database Concepts.
翻译:Oracle数据库2天DBA是面向任务的。目标是描述必须执行管理任务的原因和时间。在适当的情况下,它描述了理解和完成任务所必需的概念,前提是读者没有数据库的先验知识。本指南并不是对所有Oracle数据库概念的详尽讨论。有关此类型的信息,请参阅Oracle数据库概念。
Additionally, for a complete discussion of administrative tasks, see Oracle Database Administrator’s Guide.
翻译:此外,有关管理任务的完整讨论,请参阅《Oracle数据库管理员指南》。
How to Use This Guide with Related Material
翻译:如何将本指南与相关资料结合使用
This guide is part of a comprehensive set of learning material for administering Oracle Database, which includes a 2 Day DBA Oracle By Example (OBE) series, available on the Web, and in an Oracle University instructor-led class.
翻译:本指南是一套用于管理Oracle数据库的综合学习材料的一部分,其中包括一个为期2天的DBA Oracle by Example(OBE)系列,可在Web上获得,并在Oracle大学讲师指导的课程中获得。
Every chapter in Oracle Database 2 Day DBA has an associated Oracle By Example lesson. The OBE steps through all tasks in the chapter and includes annotated screenshots. In some cases, the OBE provides additional information to help you complete the task.
翻译:Oracle数据库2天DBA中的每一章都有一个相关的“Oracle by example”课程。OBE将逐步完成本章中的所有任务,并包括带注释的屏幕截图。在某些情况下,OBE提供了其他信息来帮助您完成任务。
At the end of each chapter, you can find the link to its associated OBE lesson. The home page for the 2 Day DBA Oracle By Example series is as follows:
翻译:在每章的末尾,您可以找到与其相关的OBE课程的链接。2天DBA Oracle by Example系列的主页如下:
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/2day_dba/index.html
In addition, Oracle University provides a related instructor-led course called Oracle Database 11g: 2 Day DBA. Contact Oracle University for more information.
翻译:此外,甲骨文大学还提供了一个相关的讲师指导课程,名为“甲骨文数据库11g:2天DBA”。有关更多信息,请联系Oracle大学。
About Oracle Database
翻译:关于Oracle Database
Oracle Database is a relational database with object and Extensible Markup Language (XML) capabilities. In a relational database, all data is stored in two-dimensional tables that are composed of rows and columns. Oracle Database enables you to store data, update it, and efficiently retrieve it, with a high degree of performance, reliability, and scalability.
翻译:
Oracle数据库是一个具有对象和可扩展标记语言(XML)功能的关系数据库。在关系数据库中,所有数据都存储在由行和列组成的二维表中。Oracle数据库使您能够以高性能、可靠性和可扩展性存储数据、更新数据并高效地检索数据。
Oracle Database is composed of the following elements:
Oracle数据库由以下元素组成:
•The Oracle software that you install on your host computer
您在主机上安装的Oracle软件
•The database, which is a collection of physical files on one or more disks
数据库,它是一个或多个磁盘上物理文件的集合。
The database contains user data, metadata, and control structures. Metadata, or data about the data, is the collection of information on disk that permits Oracle software to manage user data. An example of metadata is the data dictionary. Control structures (such as the control file and online redo log files) ensure the integrity, availability, and recoverability of user data.
数据库包含用户数据、元数据和控制结构。元数据,或者数据的相关数据,是磁盘上允许Oracle软件管理用户数据的信息集合。元数据的一个例子是数据字典。控制结构(如控制文件和在线重做日志文件)确保用户数据的完整性、可用性和可恢复性。
•The Oracle instance, which is composed of the following:
Oracle实例,由以下部分组成:
◦The background processes, which are the operating system processes or threads that perform the work of accessing, storing, monitoring, and recovering user data, metadata, and control files associated with the database
后台进程,是执行访问、存储、监视和恢复与数据库相关联的用户数据、元数据和控制文件工作的操作系统进程或线程。
◦The shared memory areas used by the background processes
后台进程使用的共享内存区域
•Server processes that perform work on behalf of connected users and applications, and the memory and temporary storage used by these processes
代表已连接的用户和应用程序执行工作的服务器进程,以及这些进程使用的内存和临时存储
Server processes parse and execute SQL statements, and retrieve and return results to the user or application.
服务器进程分析和执行SQL语句,并检索结果并将结果返回给用户或应用程序。
•Oracle Net, which is a software layer that enables client applications and Oracle Database to communicate over a network, and the Oracle Net listener, which is a process that listens for connection requests from the network.
Oracle NET是一个软件层,它允许客户机应用程序和Oracle数据库通过网络进行通信;Oracle NET Listener是一个过程,它侦听来自网络的连接请求。
See Also:
•Chapter 4, “Configuring the Network Environment”
•Chapter 5, “Managing the Oracle Instance”
•Chapter 6, “Managing Database Storage Structures”
•Oracle Database Concepts for more information about background processes
•Oracle Database Reference for more information about background processes
Common Oracle DBA Tasks
As an Oracle DBA, you can expect to be involved in the following tasks:
•Installing Oracle software
•Creating Oracle databases
•Performing upgrades of the database and software to new release levels
•Starting and shutting down the database instance
•Managing the storage structures of the database
•Managing users and security
•Managing database objects, such as tables, indexes, and views
•Backing up the database and performing recovery operations when necessary
•Monitoring the state of the database and taking preventive or corrective action as required
•Monitoring and tuning database performance
•Diagnosing and reporting critical errors to Oracle Support Services
In a small to medium-sized database environment, you might be the sole person performing these tasks. In large, enterprise environments, the job is often divided among several DBAs, each of whom has a specialty, such as database security or database tuning.
See Also:
•Oracle Database Concepts for more information about the duties of database administrators
Tools for Administering the Database
管理数据库的工具
The goal of this guide is to enable you to quickly and efficiently create an Oracle database, and to provide guidance in basic database administration.
本指南的目标是使您能够快速高效地创建Oracle数据库,并在基本数据库管理中提供指导。
The following are some products, tools, and utilities you can use to achieve your goals as a database administrator:
以下是一些产品、工具和实用程序,您可以使用它们作为数据库管理员来实现您的目标:
•Oracle Universal Installer
Oracle Universal Installer (OUI) is a utility that installs your Oracle software and options. It can automatically start Oracle Database Configuration Assistant to install a database.
Oracle Universal Installer(OUI)是一个安装Oracle软件和选项的实用程序。它可以自动启动Oracle数据库配置助手来安装数据库。
•Oracle Database Configuration Assistant
数据库配置助手
Oracle Database Configuration Assistant (DBCA) is a utility that creates a database from templates that are supplied by Oracle, or you can create your own. It enables you to copy a preconfigured seed database, thus saving the time and effort of generating and customizing a new database.
Oracle数据库配置助手(DBCA)是一个实用程序,它可以使用Oracle提供的模板创建数据库,也可以创建自己的数据库。它使您能够复制预先配置的种子数据库,从而节省生成和定制新数据库的时间和精力。
•Database Upgrade Assistant
数据库升级助手
The Database Upgrade Assistant is a tool that guides you through the upgrade of your existing database to a new Oracle Database release.
数据库升级助手是一个工具,它指导您将现有数据库升级到新的Oracle数据库版本。
•Net Configuration Assistant
网络配置助手
Net Configuration Assistant (NETCA) is a utility that enables you to configure listeners and naming methods, which are critical components of the Oracle Database network.
NET配置助手(netca)是一个实用程序,它使您能够配置侦听器和命名方法,这是Oracle数据库网络的关键组件。
•Oracle Enterprise Manager Database Control
Oracle Enterprise Manager数据库控制
The primary product for managing your database is Oracle Enterprise Manager Database Control (Database Control), a Web-based interface. After you have installed the Oracle Database software, created or upgraded a database, and configured the network, you can use Database Control to manage your database. Database Control also provides an interface for performance advisors and for Oracle utilities such as SQLLoader and Recovery Manager (RMAN).
管理数据库的主要产品是Oracle Enterprise Manager数据库控制(数据库控制),这是一个基于Web的界面。安装Oracle数据库软件、创建或升级数据库以及配置网络后,可以使用数据库控制来管理数据库。数据库控制还为性能顾问和Oracle实用程序(如SQL加载器和恢复管理器(RMAN))提供了接口。
Oracle also offers separately licensed Oracle Enterprise Manager management packs, management plug-ins, and other products you can purchase to enhance the capabilities of Oracle Enterprise Manager in specific environments.
Oracle还提供单独许可的Oracle Enterprise Manager管理包、管理插件和您可以购买的其他产品,以增强Oracle Enterprise Manager在特定环境中的功能。
See Also:
◦Oracle Database Licensing Information
This chapter describes how to install Oracle Database software and create a database.
本章介绍如何安装Oracle数据库软件和创建数据库。
If you are using an earlier release of Oracle Database and want to install a later release of the Oracle Database software, then you can upgrade your existing Oracle Database and use it with the new release of the database software. See “Upgrading a Database”.
如果您使用的是较早版本的Oracle数据库,并且希望安装较新版本的Oracle数据库软件,则可以升级现有的Oracle数据库,并将其与新版本的数据库软件一起使用。请参见“升级数据库”。
This chapter contains the following sections:
•Overview of Installing Oracle Database Software and Creating a Database
•Installing Oracle Database Software
•Creating and Managing a Database with DBCA
•Installation: Oracle By Example Series
Overview of Installing Oracle Database Software and Creating a Database
安装Oracle数据库软件和创建数据库概述
To install your Oracle Database software, use Oracle Universal Installer (OUI). OUI is a graphical user interface utility that enables you to install new Oracle Database software. Online Help is available to guide you through the installation process.
要安装Oracle数据库软件,请使用Oracle Universal Installer(OUI)。oui是一个图形用户界面实用程序,允许您安装新的Oracle数据库软件。在线帮助可指导您完成安装过程。
During the installation process, you are given the opportunity to create a database. If you choose to do so, then OUI automatically starts Oracle Database Configuration Assistant (DBCA) to guide you through the process of creating and configuring a database.
在安装过程中,您有机会创建数据库。如果您选择这样做,那么OUI会自动启动Oracle数据库配置助手(DBCA),以指导您完成创建和配置数据库的过程。
Before you start the installation process, see the following sections for information about prerequisites and installation choices:
在开始安装过程之前,请参阅以下部分,以了解有关先决条件和安装选项的信息:
•Checking Prerequisites
检查先决条件
•Deciding on Installation Choices
决定安装选择
If you do not create a database during installation, then you must run DBCA at some point after installation to create a database.
如果在安装期间不创建数据库,则必须在安装之后的某个时间点运行dbca以创建数据库。
Note:
After you create a database, either during installation or as a standalone operation, you do not have to create another. Each Oracle instance works with a single database only. Rather than requiring that you create multiple databases to accommodate different applications, Oracle Database uses a single database, and accommodates multiple applications by enabling you to separate data into different schemas within the single database. See “About User Accounts” for more information about schemas.
无论是在安装过程中还是作为独立操作创建数据库之后,都不必再创建其他数据库。每个Oracle实例只与一个数据库一起工作。Oracle数据库不需要创建多个数据库来容纳不同的应用程序,而是使用一个数据库,并通过允许您将数据分离到单个数据库中的不同模式来容纳多个应用程序。有关模式的详细信息,请参阅“关于用户帐户”。
Checking Prerequisites
Before installing the software, OUI performs several automated checks to ensure that your computer fulfills the basic hardware and software requirements for an Oracle Database installation. If your computer does not meet a requirement, then an error message is displayed. The requirements may vary depending upon the type of computer and operating system you are using, but some prerequisites include:
在安装软件之前,OUI会执行一些自动检查,以确保您的计算机满足Oracle数据库安装的基本硬件和软件要求。如果您的计算机不符合要求,则会显示一条错误消息。这些要求可能因所使用的计算机和操作系统的类型而异,但某些先决条件包括:
•There is a minimum of 1 GB of physical memory.
至少有1 GB的物理内存。
•Sufficient paging space is available.
有足够的分页空间。
•The appropriate service packs or patches for your operating system are installed.
已为您的操作系统安装适当的Service Pack或修补程序。
•An appropriate file system format is being used.
正在使用适当的文件系统格式。
See Also:
•Oracle Database Installation Guide for your platform for more information about exact requirements
数据库安装指南为您的平台提供更多关于准确要求的信息
Deciding on Installation Choices
决定安装选择
Oracle Universal Installer guides you through an interview phase where you specify your choices for installation and database creation. The exact sequence of steps depends on your operating system. As you progress through the installation, you are presented with choices on how to configure the database.
OracleUniversalInstaller将指导您完成一个面谈阶段,在该阶段您可以指定安装和数据库创建的选择。步骤的确切顺序取决于您的操作系统。在安装过程中,您将看到如何配置数据库的选项。
•Install Options
•Installation Method
•Installation Type
•Software Installation Directories
•Database File Location
•Database Identifiers
•About Advanced Installation
Install Options
You can choose to create and configure a database, or to only install the database software.
您可以选择创建和配置数据库,或者只安装数据库软件。
You can create a preconfigured database or a custom-configured database during installation. If you choose not to create a database during installation, then you must run DBCA after installation to create a database.
您可以在安装过程中创建预配置的数据库或自定义配置的数据库。如果选择在安装过程中不创建数据库,则必须在安装后运行dbca以创建数据库。
Preconfigured databases are based on templates that Oracle provides or that you create. Each Oracle-provided template is optimized for a particular workload type. See Table 2-2, “Oracle-Provided DBCA Templates and Their Corresponding Workloads” for information about the types of preconfigured databases.
预配置的数据库基于Oracle提供的或您创建的模板。每个Oracle提供的模板都针对特定的工作负载类型进行了优化。有关预配置数据库类型的信息,请参见表2-2“Oracle提供的DBCA模板及其相应的工作负载”。
If you choose to use the Desktop Class installation method, then the general purpose database template is used. To create a custom database in which you configure your own database structure, see “About Advanced Installation”.
如果选择使用桌面类安装方法,则使用通用数据库模板。要创建自定义数据库,在其中配置自己的数据库结构,请参阅“关于高级安装”。
Note:
If you must create a new database, then Oracle recommends that you install a preconfigured database, which is faster and easier. You can customize the database after it has been created.
如果您必须创建一个新的数据库,那么Oracle建议您安装一个预配置的数据库,它更快、更容易。您可以在创建数据库之后自定义它。
Installation Method
The installation methods are divided into Desktop Class and Server Class:
安装方法分为桌面类和服务器类:
•Desktop Class—This installation class is most appropriate for laptop or desktop computers. It includes a starter database and requires minimal configuration.
桌面类此安装类最适合笔记本或台式计算机。它包括一个启动数据库,需要最少的配置。
•Server Class—This installation class is for servers, such as you would find in a data center, or used to support enterprise-level applications. Choose this installation class if you need access to advanced configuration options.
服务器类此安装类用于服务器,如数据中心中的服务器,或用于支持企业级应用程序。如果需要访问高级配置选项,请选择此安装类。
During a Desktop Class installation, you make only basic choices. For a Server Class installation, you choose either typical installation (where you make only basic choices) or advanced installation.
在桌面类安装过程中,您只做基本的选择。对于服务器类安装,可以选择典型安装(仅在其中进行基本选择)或高级安装。
During a Desktop Class or a typical installation, Oracle Database automatically installs the sample schemas.
在桌面类或典型安装过程中,Oracle数据库会自动安装示例架构。
Installation Type
When you install Oracle Database during basic and advanced installations, you need answers for the questions listed in this section. OUI provides default values for every choice.
在基本和高级安装过程中安装Oracle数据库时,需要回答本节中列出的问题。oui为每个选项提供默认值。
•What type of database edition installation do you want to perform?
要执行哪种类型的数据库版本安装?
Your choices are:
◦Enterprise Edition—This installation type is the full-featured Oracle Database product that provides data management for enterprise-level applications. It is intended for mission-critical, high-security online transaction processing (OLTP) and data warehousing environments.
Enterprise Edition此安装类型是为企业级应用程序提供数据管理的全功能Oracle数据库产品。它适用于关键任务、高安全性的在线事务处理(OLTP)和数据仓库环境。
◦Standard Edition—This installation type is suitable for workgroup or department-level applications, and for small to medium-sized enterprises. It provides core relational database management services and options and includes an integrated set of management tools, replication, Web features, and facilities for building business-critical applications.
标准版此安装类型适用于工作组或部门级应用程序,也适用于中小型企业。它提供核心的关系数据库管理服务和选项,并包括一组集成的管理工具、复制、Web功能和用于构建业务关键型应用程序的设施。
◦Standard One Edition—This installation type is suitable for workgroup, department, or web applications. It provides core relational database management services for single-server environments or highly distributed branch environments. Oracle Standard Edition One includes all the facilities necessary to build business-critical applications.
标准版此安装类型适用于工作组、部门或Web应用程序。它为单服务器环境或高度分布式的分支环境提供核心关系数据库管理服务。Oracle Standard Edition One包括构建业务关键型应用程序所需的所有设施。
◦Personal Edition (Microsoft Windows operating systems only)—This installation type installs the same software as the Enterprise Edition, but supports only a single-user, development and deployment environment.
个人版(仅限Microsoft Windows操作系统)-此安装类型安装的软件与企业版相同,但仅支持单个用户、开发和部署环境。
•What are your database configuration options?
您的数据库配置选项是什么?
Software Installation Directories
软件安装目录
You must specify the directory in which the Oracle Database software is installed, or the location where the product binary files are copied from the installation media. You must choose a location that has enough disk space to contain the software and is accessible by the operating system user performing the installation.
必须指定安装Oracle数据库软件的目录,或从安装介质复制产品二进制文件的位置。您必须选择一个具有足够的磁盘空间来包含软件并可由执行安装的操作系统用户访问的位置。
You also specify the location of the Oracle base directory, which is used by all Oracle software products installed on the server. The first time you install Oracle Database software on a server, you are prompted to specify the location of the inventory directory, called oraInventory. This directory provides a centralized inventory of all Oracle software products installed on the server. You should use the same value for the Oracle inventory directory each time you perform an Oracle software installation on the server.
还可以指定Oracle基本目录的位置,该目录由安装在服务器上的所有Oracle软件产品使用。第一次在服务器上安装Oracle数据库软件时,系统会提示您指定清单目录(称为orainventory)的位置。此目录提供安装在服务器上的所有Oracle软件产品的集中清单。每次在服务器上执行Oracle软件安装时,都应该对Oracle清单目录使用相同的值。
Database File Location
数据库文件位置
A database includes several files that store the user data, database metadata, and information required to recover from failures. As an administrator, you decide what kind of storage subsystem to use for these files. You can select from the following options:
数据库包含多个文件,这些文件存储用户数据、数据库元数据以及从故障中恢复所需的信息。作为管理员,您可以决定对这些文件使用哪种存储子系统。您可以从以下选项中进行选择:
•File System—This default option creates database files that are managed by the file system of your operating system. You can specify the directory path where database files are to be stored. Oracle Database can create and manage the actual files.
文件系统此默认选项创建由操作系统的文件系统管理的数据库文件。可以指定存储数据库文件的目录路径。Oracle数据库可以创建和管理实际文件。
If you are not certain about which option to use, then select File System (the default).
如果不确定要使用哪个选项,请选择文件系统(默认)。
•Automatic Storage Management—This option enables you to place your data files in Oracle Automatic Storage Management (Oracle ASM) disk groups. If you choose Oracle ASM, then Oracle Database automatically manages database file placement and naming. For environments with a large number of disks, this option simplifies database administration and maximizes performance. Oracle ASM performs software striping and mirroring at the file level for maximum storage flexibility, performance, and availability.
自动存储管理此选项允许您将数据文件放在Oracle自动存储管理(Oracle ASM)磁盘组中。如果选择Oracle ASM,则Oracle数据库将自动管理数据库文件的放置和命名。对于具有大量磁盘的环境,此选项简化了数据库管理并最大限度地提高了性能。Oracle ASM在文件级别执行软件条带化和镜像,以实现最大的存储灵活性、性能和可用性。
Oracle ASM uses an Oracle ASM instance, which is distinct from the database instance, to configure and manage disk groups. A single Oracle ASM instance can provide storage for multiple databases on the same server.
Oracle ASM使用与数据库实例不同的Oracle ASM实例来配置和管理磁盘组。单个Oracle ASM实例可以为同一服务器上的多个数据库提供存储。
For more information, see “About Oracle Automatic Storage Management” and Oracle Automatic Storage Management Administrator’s Guide.
有关详细信息,请参阅“关于Oracle自动存储管理”和《Oracle自动存储管理管理员指南》。
Note:
In past releases, Oracle ASM was installed as part of the Oracle Database installation. With Oracle Database 11g release 2 (11.2), Oracle ASM is part of an Oracle grid infrastructure installation.
To use Oracle ASM for storing database files, you must have installed Oracle ASM and created one or more disk groups before performing the Oracle Database installation.
在过去的版本中,Oracle ASM是作为Oracle数据库安装的一部分安装的。使用Oracle Database 11g Release 2(11.2),Oracle ASM是Oracle网格基础结构安装的一部分。
要使用Oracle ASM存储数据库文件,必须先安装Oracle ASM并创建一个或多个磁盘组,然后才能执行Oracle数据库安装。
Database Identifiers
These options include your global database name and system identifier (SID). The SID is a unique identifier that is used to distinguish this instance from other Oracle Database instances that you may create later and run concurrently on your system.
这些选项包括全局数据库名称和系统标识符(SID)。SID是一个唯一的标识符,用于将此实例与以后可能创建并在系统上并发运行的其他Oracle数据库实例区分开来。
The global database name is the full name of the database that uniquely distinguishes it from any other database. The global database name is in the form database_name.database_domain, for example sales.example.com. The database name portion sales is a simple name you call your database. The database domain portion example.com specifies the database domain in which the database is located. Together, the database name and domain form the global database name.
全局数据库名称是唯一区别于任何其他数据库的数据库的全名。全局数据库名称的格式为database_name.database_domain,例如sales.example.com。数据库名称部分销售是一个称为数据库的简单名称。database domain部分example.com指定数据库所在的数据库域。数据库名称和域一起构成全局数据库名称。
About Advanced Installation
During advanced installations using the Server Class method you are prompted to make the additional choices listed in this section, and the choices for a typical installation. The installation process provides default values for every choice.
在使用服务器类方法进行高级安装时,系统将提示您进行本节中列出的其他选择以及典型安装的选择。安装过程为每个选项提供默认值。
This guide describes, but does not document, these additional advanced installation choices. For more information, see Oracle Database Installation Guide for your platform.
本指南介绍但不记录这些附加的高级安装选项。有关详细信息,请参阅适用于您的平台的《Oracle数据库安装指南》。
•Product Languages
You choose which language the software should use after it is installed. You can select multiple languages. The default value is English. If you choose a value other than English, it does not change the language used by the installation.
您可以选择软件安装后应使用的语言。您可以选择多种语言。默认值为英语。如果选择的值不是英语,则不会更改安装使用的语言。
•Database Configuration Type
You select a template to use when configuring the database. You can choose either either General Purpose/Transaction Processing or Data Warehousing.
选择配置数据库时要使用的模板。您可以选择通用/事务处理或数据仓库。
•Database Configuration Options
You can choose how to configure the database created by the installer. You can select the memory size and management options, the character sets used to store data, the security options for database access, and whether the sample schemas should be installed.
您可以选择如何配置安装程序创建的数据库。您可以选择内存大小和管理选项、用于存储数据的字符集、用于数据库访问的安全选项以及是否应安装示例架构。
To complete the exercises in this guide and related course material, you must install the sample schemas. This data is also used in most examples throughout Oracle Database documentation. Oracle recommends that you install the sample schemas.
要完成本指南和相关课程材料中的练习,必须安装示例模式。在整个Oracle数据库文档中的大多数示例中也使用了此数据。Oracle建议您安装示例架构。
This choice is a configuration option only during advanced installation. Sample schemas are installed by default during typical or Desktop class installations.
此选项仅在高级安装期间为配置选项。在典型或桌面类安装期间,默认情况下安装示例架构。
•Database Management Options
You specify whether to manage your database centrally or locally using Oracle Enterprise Manager. Central management enables you to manage multiple targets, such as databases and application servers, using a single interface. Using local management you can manage only a single database instance at a time.
您可以使用Oracle Enterprise Manager指定是集中管理还是本地管理数据库。中央管理使您能够使用单个界面管理多个目标,如数据库和应用程序服务器。使用本地管理,一次只能管理一个数据库实例。
To use central management, you must have an Oracle Enterprise Management agent on each host, or computer that has Oracle Database software installed on it. These agents are responsible for monitoring all components on that host. If an agent is not found on the local host, then this option is disabled during installation.
要使用中央管理,您必须在每台主机上或安装了Oracle数据库软件的计算机上安装Oracle企业管理代理。这些代理负责监视该主机上的所有组件。如果在本地主机上找不到代理,则在安装过程中禁用此选项。
If you are setting up a single database for the first time, then it is recommended that you configure local management with Oracle Enterprise Manager, which is the default. You can later install additional databases and configure central management using Enterprise Manager.
如果您是第一次设置单个数据库,建议您使用Oracle Enterprise Manager(默认设置)配置本地管理。以后可以安装其他数据库,并使用Enterprise Manager配置中央管理。
•Recovery Options
You specify whether automated backups should be configured for the database. If you choose this option, you must specify whether the recovery area should be stored on the local file system or in an Oracle ASM disk group. You must also specify the operating system credentials the backup job uses when performing backups.
指定是否应为数据库配置自动备份。如果选择此选项,则必须指定恢复区域应存储在本地文件系统上还是存储在Oracle ASM磁盘组中。还必须指定备份作业在执行备份时使用的操作系统凭据。
Note:
To use Oracle ASM for recovery area storage, you must have installed Oracle ASM as part of an Oracle grid infrastructure installation and created one or more disk groups before performing the Oracle Database installation.
要将Oracle ASM用于恢复区域存储,必须在执行Oracle数据库安装之前,将Oracle ASM安装为Oracle网格基础结构安装的一部分,并创建一个或多个磁盘组。
•Schema Passwords
When you create a database, certain administrative user accounts are created automatically. You are prompted to enter the passwords for the SYS, SYSTEM, SYSMAN, and DBSNMP accounts, which enable you to manage and administer the database. You can use the same password for each account, or specify passwords for each account individually. If you do not enter a secure password, you will receive a warning message during installation.
创建数据库时,将自动创建某些管理用户帐户。系统将提示您输入sys、system、sysman和dbsnmp帐户的密码,这些帐户使您能够管理和管理数据库。您可以对每个帐户使用相同的密码,或者分别为每个帐户指定密码。如果不输入安全密码,安装过程中将收到警告消息。
•Operating System Groups
Administrative access to the database is granted by membership in certain operating system groups. You can choose the operating system group to be used for SYSDBA access (typically dba) and SYSOPER access (typically oper).
某些操作系统组的成员资格授予对数据库的管理访问权限。您可以选择用于sysdba访问(通常为dba)和sysoper访问(通常为oper)的操作系统组。
The SYSDBA group identifies operating system user accounts that have database administrative privileges and can log in with SYSDBA access. The SYSOPER group is an optional group for users that should have limited database administrative privileges. See “SYSDBA and SYSOPER System Privileges” for more information about these groups and privileges.
sysdba组标识具有数据库管理权限并可以使用sysdba访问权限登录的操作系统用户帐户。对于应该具有有限数据库管理权限的用户,sysoper组是一个可选组。有关这些组和权限的详细信息,请参阅“sysdba和sysoperar系统权限”。
Installing Oracle Database Software
This section briefly describes the steps for a desktop-class installation. Most steps are common to all platforms and involve running the Oracle Universal Installer. Platform-specific steps are noted. For further assistance, consult the online Help or the Oracle Database Installation Guide for your platform.
本节简要介绍桌面类安装的步骤。大多数步骤对于所有平台都是通用的,并且涉及到运行OracleUniversalInstaller。注意平台的具体步骤。有关进一步的帮助,请参阅您平台的联机帮助或Oracle数据库安装指南。
Note:
The following steps describe the Oracle Universal Installer workflow for a host computer that has no previous Oracle software installed. If your host computer has Oracle software installed, then you may see a different workflow.
To perform a basic installation:
1.Log on to your computer as a member of the administrative group that is authorized to install Oracle Database software and to create and run the database.
Refer to your operating system-specific documentation or contact your system administrator to determine whether you have the necessary privileges and permissions to install new software.
2.Do one of the following:
◦If you are installing from distribution media, then insert the distribution media for the database into your computer.
如果从分发媒体安装,请将数据库的分发媒体插入计算机。
The Autorun feature opens the Select a Product to Install window automatically.
自动运行功能会自动打开“选择要安装的产品”窗口。
◦If you downloaded the installation software from the Oracle Web site, then follow the instructions on the site to run the Oracle Universal Installer. Or, see the Oracle Database Installation Guide for your platform.
如果从Oracle网站下载了安装软件,请按照该网站上的说明运行Oracle Universal安装程序。或者,请参阅您的平台的《Oracle数据库安装指南》。
3.The first window that appears is the Configure Security Updates window. To receive notifications about security issues via e-mail, enter your e-mail address in the Email text field. To receive security updates from My Oracle Support, enter the e-mail address registered with My Oracle Support, select the I wish to receive security updates… option, and enter your My Oracle Support password.
出现的第一个窗口是“配置安全更新”窗口。要通过电子邮件接收有关安全问题的通知,请在电子邮件文本字段中输入您的电子邮件地址。要从我的Oracle支持接收安全更新,请输入在我的Oracle支持中注册的电子邮件地址,选择我希望接收安全更新…选项,然后输入“我的Oracle支持”密码。
Click Next to continue.
The Select Installation Option window appears.
4.Choose the Create and configure a database option. Or, you also have the option of choosing to only install the database software, but then you must create a database in an additional step after the software is installed. If you are currently using a previous version of Oracle Database, choose Upgrade an existing database. After you have chosen an option, click Next.
选择创建和配置数据库选项。或者,您也可以选择只安装数据库软件,但必须在安装软件后的其他步骤中创建数据库。如果当前使用的是早期版本的Oracle数据库,请选择“升级现有数据库”。选择选项后,单击“下一步”。
The System Class window appears.
5.Choose Desktop Class.
You can choose the Server Class option to customize your installation. For example, you use this method to configure Oracle Automatic Storage Management for your database, install the Sample Schemas, or configure automated backups. Selecting this option guides you through a series of installation steps that are not documented in this guide. For more information about the advanced choices, see “About Advanced Installation”. Also see Oracle Database Installation Guide for your platform.
您可以选择服务器类选项来自定义安装。例如,您可以使用此方法为数据库配置Oracle自动存储管理、安装示例架构或配置自动备份。选择此选项将指导您完成本指南中未介绍的一系列安装步骤。有关高级选项的详细信息,请参阅“关于高级安装”。另请参阅您的平台的《Oracle数据库安装指南》。
Click Next.
The Typical Install Configuration window appears.
Description of install_basic.gif follows
Description of the illustration install_basic.gif
出现“Typical Install Configuration(典型安装配置)”窗口。
6.Provide the following configuration details for the database:
◦Oracle Base Location— The Oracle base directory helps to facilitate the organization of multiple Oracle software installations. See the Oracle Database Installation Guide for your platform for more information about ORACLE_BASE.
Oracle基本位置—Oracle基本目录有助于组织多个Oracle软件安装。有关Oracle_Base的更多信息,请参阅您平台的《Oracle数据库安装指南》。
If you did not set the ORACLE_BASE environment variable before starting OUI, then the Oracle base directory is created in an app/username/directory on the first existing and writable directory from /u01 through /u09 for UNIX and Linux systems, or on the disk drive with the most available space for Windows systems. If /u01 through /u09 does not exist on the UNIX or Linux system, then the default location is user_home_directory/app/username.
如果在启动oui之前没有设置oracle_base环境变量,那么将在app/username/目录中的第一个现有可写目录(从/u01到/u09,对于UNIX和Linux系统)上创建oracle base目录,或者在具有最多可用空间的磁盘驱动器上创建Windows系统。如果unix或linux系统上不存在/u01到/u09,则默认位置为user_home_directory/app/username。
You can click Browse to find the directory you want to act as the Oracle base directory.
可以单击“浏览”以查找要用作Oracle基本目录的目录。
◦Software Location—The software location is the Oracle home for your database. You must specify a new Oracle home directory for each new installation of Oracle Database software. By default, the Oracle home directory is a subdirectory of the Oracle base directory.
软件位置软件位置是数据库的Oracle主页。必须为每个新安装的Oracle数据库软件指定一个新的Oracle主目录。默认情况下,Oracle主目录是Oracle基本目录的子目录。
You can click Browse to find the directory where you want to install the Oracle Database software.
您可以单击“浏览”找到要在其中安装Oracle数据库软件的目录。
◦Database File Location—The database file location is the location where Oracle Database files are stored. By default, this location is Oracle_base/oradata. You can click Browse to select a different location.
数据库文件位置数据库文件位置是存储Oracle数据库文件的位置。默认情况下,此位置是Oracle_Base/OracleData。可以单击“浏览”选择其他位置。
◦Database Edition—Select either Enterprise Edition, Standard Edition, Standard Edition One, or Personal Edition (Microsoft Windows platforms only). See “Installation Type”.
数据库版本选择企业版、标准版、标准版1或个人版(仅限Microsoft Windows平台)。见“安装类型”。
◦Character Set—Choose the character set to use to store the data within the database. You can choose between the Default, which is based on the operating system language settings, or Unicode.
字符集选择用于在数据库中存储数据的字符集。您可以选择基于操作系统语言设置的默认值或Unicode。
◦OSDBA Group (Linux and UNIX platforms only)—Specify the operating system DBA group. Host computer users in this group have administrative privileges on the database. This group is typically named dba. Refer to Oracle Database Installation Guide for Linux or for your UNIX platform for more details.
OSDBA组(仅限Linux和Unix平台)-指定操作系统DBA组。此组中的主机用户对数据库具有管理权限。该组通常命名为DBA。有关详细信息,请参阅适用于Linux或UNIX平台的Oracle数据库安装指南。
◦Global Database Name—Enter the fully qualified global database name. See “Installation Type” for more on global database name.
全局数据库名称输入完全限定的全局数据库名称。有关全局数据库名称的详细信息,请参阅“安装类型”。
◦Administrative Password—Specify the initial password for the SYS, SYSTEM, SYSMAN, and DBSNMP administrator accounts. If the password you choose is not a secure password, a warning message will be displayed.
管理密码指定sys、system、sysman和dbsnmp管理员帐户的初始密码。如果您选择的密码不是安全密码,将显示警告消息。
After you enter the required information, click Next.
输入所需信息后,单击“下一步”。
If Oracle software has not previously been installed on this server, then the Create Inventory window appears. If this is not the first installation attempt on this server, then the Perform Prerequisite Checks window appears.
如果以前没有在此服务器上安装Oracle软件,则会出现“创建清单”窗口。如果这不是此服务器上的第一次安装尝试,则会出现“执行先决条件检查”窗口。
7.For first time installations on Linux and UNIX operating systems only, specify a directory for installation files and the name of an operating system group that has write permissions for that directory.
对于仅在Linux和Unix操作系统上首次安装,请指定安装文件的目录以及对该目录具有写权限的操作系统组的名称。
If this is the first time you are installing any Oracle software on this computer, then the Create Inventory Directory window appears. You must specify a local directory for the inventory, which OUI uses to keep track of all Oracle software installed on the computer. This information is used while applying patches or upgrading an existing installation, and while deinstalling Oracle software. Note that this directory is different from the Oracle home directory. The recommended value for the inventory directory is Oracle_base/…/oraInventory, or one level above the Oracle base directory, in the oraInventory subdirectory. If your Oracle base directory is /u01/app/oracle, then the Oracle inventory directory defaults to /u01/app/oraInventory.
如果这是您第一次在此计算机上安装任何Oracle软件,则会出现“创建库存目录”窗口。您必须为清单指定本地目录,OUI使用该目录跟踪计算机上安装的所有Oracle软件。此信息在应用补丁或升级现有安装以及卸载Oracle软件时使用。请注意,此目录与Oracle主目录不同。库存目录的建议值是Oracle_base/…/orainventory,或在orainventory子目录中高于Oracle base目录的一个级别。如果您的Oracle基本目录是/u01/app/oracle,则Oracle库存目录默认为/u01/app/orainventory。
In this window you can also specify the operating system group that has write permissions on the inventory directory. This prevents other users from writing over the Oracle product installation files. Typically the oinstall group is selected.
在此窗口中,还可以指定对清单目录具有写权限的操作系统组。这会阻止其他用户写入Oracle产品安装文件。通常会选择OnInstall组。
After you enter a directory path and optionally specify an operating system group, click Next to continue.
输入目录路径并选择指定操作系统组后,单击“下一步”继续。
The Perform Prerequisite Checks window appears.
8.If any checks failed, then take corrective actions.
OUI performs several environment checks and indicates whether the check was a success, or resulted in a warning or failure. Details of the checks are provided in the displayed window. The installation can proceed only when all checks have a status of either Succeeded or Warning. If any of the environment checks failed, then they must be resolved manually. See “Checking Prerequisites” for more information.
oui执行几个环境检查,并指示检查是否成功,或导致警告或失败。在显示的窗口中提供检查的详细信息。只有当所有检查的状态为“成功”或“警告”时,安装才能继续。如果任何环境检查失败,则必须手动解决这些问题。有关详细信息,请参阅“检查先决条件”。
If all the prerequisite checks passed, or after you click Next, the Summary window appears,
如果所有先决条件检查都通过,或者单击“下一步”后,将出现“摘要”窗口,
9.Review the installation summary, then click Finish to start the installation.
查看安装摘要,然后单击“完成”开始安装。
The Install window appears, showing the installation progress. After the installation phase, the Configuration Assistants window appears. This window lists the configuration assistants that are started automatically. If you chose to create a starter database, then Database Configuration Assistant starts automatically in a separate window.
出现“Install(安装)”窗口,显示安装进度。在安装阶段之后,将显示“配置助手”窗口。此窗口列出自动启动的配置助手。如果您选择创建一个启动数据库,那么数据库配置助手将在单独的窗口中自动启动。
After database creation, a window is displayed that summarizes the database creation.
创建数据库后,将显示一个窗口,总结数据库创建。
10.(Optional) Click Password Management to unlock user accounts to make the accounts accessible to users.
单击“密码管理”以解锁用户帐户,使用户可以访问这些帐户。
The SYS and SYSTEM accounts are unlocked by default.
系统和系统帐户在默认情况下处于解锁状态。
11.Click OK to continue the installation.
12.For Linux and UNIX operating systems only, run the specified scripts, then click OK.
In the Execute Configuration Scripts window, you are prompted to open a new terminal window, and to run scripts as the root user. After you run the scripts, return to this window and click OK.
在“执行配置脚本”窗口中,系统将提示您打开一个新的终端窗口,并以根用户身份运行脚本。运行脚本后,返回此窗口并单击“确定”。
13.Make note of the information in the Finish window, then click Close to exit OUI.
Your installation and database creation is now complete. The Finish window displays one or more important URLs, including one for the Oracle Enterprise Manager Database Control console. (The console is the user interface—the Web application—portion of Oracle Enterprise Manager Database Control.)
安装和数据库创建现已完成。“完成”窗口显示一个或多个重要的URL,包括一个用于Oracle Enterprise Manager数据库控制台的URL。(控制台是Oracle Enterprise Manager数据库控件的Web应用程序部分的用户界面。)
You use Oracle Enterprise Manager Database Control to perform common database administration tasks. The URL and port information for Database Control can be found after installation in the Oracle_home/install/portlist.ini file.
您可以使用Oracle Enterprise Manager数据库控件执行常见的数据库管理任务。数据库控件的URL和端口信息可以在安装后在oracle_home/install/portlist.ini文件中找到。
You can access this URL with your browser and log in as the SYS user with the associated password, and connect as SYSDBA. See Chapter 3, “Getting Started with Database Administration” for more information about using Database Control.
您可以使用浏览器访问此URL,并以具有关联密码的sys用户身份登录,并以sysdba身份连接。有关使用数据库控制的更多信息,请参阅第3章“数据库管理入门”。
Creating and Managing a Database with DBCA
Unless you specified that only the Oracle Database software should be installed, Oracle Universal Installer automatically runs Database Configuration Assistant (DBCA) after software installation is complete. DBCA then creates a database using the information you provided. If you do not create a starter database and later want to create one, or to create additional databases, use DBCA.
除非指定只安装Oracle数据库软件,否则Oracle Universal Installer会在软件安装完成后自动运行数据库配置助手(DBCA)。然后,DBCA使用您提供的信息创建数据库。如果不创建Starter数据库,以后要创建一个,或要创建其他数据库,请使用DBCA。
Note:
With Oracle Database, you typically have a single database that hosts multiple applications. You do not need multiple databases to run different applications. Instead, you separate the objects that support each different application into different schemas in the same database. However, there may be situations in which you want to create multiple Oracle databases on the same host computer. When you do this with DBCA, the new databases typically use the same Oracle home directory as the first database, but store database data files separately from those of the first database.
DBCA also enables you to modify a database configuration, delete a database, and more. This section describes the following DBCA tasks:
对于Oracle数据库,通常只有一个数据库承载多个应用程序。运行不同的应用程序不需要多个数据库。相反,您将支持每个不同应用程序的对象分为同一数据库中的不同模式。但是,在某些情况下,您可能希望在同一台主机上创建多个Oracle数据库。使用DBCA执行此操作时,新数据库通常使用与第一个数据库相同的Oracle主目录,但将数据库数据文件与第一个数据库的数据文件分开存储。
DBCA还允许您修改数据库配置、删除数据库等。本节介绍以下DBCA任务:
•Starting DBCA
启动DBCA
•Creating a Database Using DBCA
使用DBCA创建数据库
•Changing the Configuration of a Database Using DBCA
使用DBCA更改数据库的配置
•Deleting a Database Using DBCA
使用DBCA删除数据库
•Managing Templates with DBCA
使用DBCA管理模板
Online Help is available by clicking Help. It provides information that guides you in selecting configuration options.
单击“帮助”可获得联机帮助。它提供指导您选择配置选项的信息。
Starting DBCA
启动DBCA
Follow the steps in this section to start DBCA.
按照本节中的步骤启动DBCA。
Note:
If you choose to create a starter database while installing the Oracle Database software, then OUI automatically starts DBCA.
To start DBCA:
如果在安装Oracle数据库软件时选择创建一个启动数据库,那么oui会自动启动dbca。
启动DBCA:
1.Log on to your computer as a member of the administrative group that is authorized to install Oracle Database software and to create and run the database.
以有权安装Oracle数据库软件和创建和运行数据库的管理组成员身份登录计算机。
2.Do one of the following:
◦To start DBCA on a Microsoft Windows operating system, click Start, select Programs (or All Programs), then Oracle - HOME_NAME, then Configuration and Migration Tools, and then Database Configuration Assistant.
要在Microsoft Windows操作系统上启动DBCA,请单击“开始”,选择“程序”(或“所有程序”),然后选择“Oracle-主页名称”,然后选择“配置和迁移工具”,然后选择“数据库配置助手”。
◦To start DBCA on UNIX or Linux, or at the command-line prompt on the Windows operating system, enter the following command:
dbca
要在UNIX或Linux上启动DBCA,或在Windows操作系统的命令行提示下,输入以下命令:
数据库
The dbca utility is typically located in the ORACLE_HOME/bin directory.
dbca实用程序通常位于Oracle_home/bin目录中。
3.Click Next to bypass the Welcome window.
Creating a Database Using DBCA
使用DBCA创建数据库
DBCA enables you to create an Oracle database by following a step-by-step guided workflow.
DBCA使您能够通过遵循逐步引导的工作流来创建Oracle数据库。
To create a database using DBCA:
要使用DBCA创建数据库,请执行以下操作:
1.Start DBCA as described in “Starting DBCA”.
启动DBCA,如“启动DBCA”中所述。
2.In the Operations window, select Create a Database and click Next to start the guided workflow for creating a database. The workflow requests your input in the following windows:
在“操作”窗口中,选择“创建数据库”,然后单击“下一步”启动用于创建数据库的引导工作流。工作流请求您在以下窗口中输入:
•Step 2 - Database Templates
•Step 3 - Database Identification
•Step 4 - Management Options
•Step 5 - Database Credentials
•Step 6 - Database File Locations
•Step 7 - Recovery Configuration
•Step 8 - Database Content
•Step 9 - Initialization Parameters
•Step 10 - Database Storage
•Step 11 - Creation Options
The following sections provide details on each window. Most windows provide default settings.
以下部分提供了每个窗口的详细信息。大多数窗口都提供默认设置。
Step 2 - Database Templates
This window enables you to select the type of database to create. You can use DBCA to create a database from templates supplied by Oracle or from templates that you create. The templates contain settings optimized for a particular type of workload.
此窗口允许您选择要创建的数据库类型。您可以使用DBCA从Oracle提供的模板或从您创建的模板创建数据库。模板包含针对特定类型工作负荷优化的设置。
Oracle ships templates for the following two workload types:
•General purpose or transaction processing
•Data warehouse
Click Show Details to see the configuration for each type of database. Select the template suited to the type of workload your database will support. If you are not sure which to choose, then select the default General Purpose or Transaction Processing template.
单击“显示详细信息”查看每种类型数据库的配置。选择适合您的数据库将支持的工作负载类型的模板。如果不确定要选择哪个,请选择默认的通用用途或事务处理模板。
For more complex environments, you can select the Custom Database option. This option does not use templates and results in a more extensive interview, which means that it takes longer to create your database.
对于更复杂的环境,可以选择自定义数据库选项。此选项不使用模板和结果进行更广泛的面谈,这意味着创建数据库需要更长的时间。
For more information about using database templates, see “Managing Templates with DBCA”.
Step 3 - Database Identification
In the Global Database Name field, enter the database name in the form database_name.domain_name.
在“全局数据库名称”字段中,以“数据库名称”的形式输入数据库名称。
In the SID field, enter the system identifier. The SID defaults to the database name and uniquely identifies the instance that runs the database.
在sid字段中,输入系统标识符。SID默认为数据库名称,并唯一标识运行数据库的实例。
Step 4 - Management Options
Use this window to set up your database so it can be managed with Oracle Enterprise Manager. Oracle Enterprise Manager provides Web-based management tools for individual databases, and central management tools for managing your entire Oracle environment.
使用此窗口设置数据库,以便可以使用Oracle Enterprise Manager对其进行管理。Oracle Enterprise Manager为单个数据库提供了基于Web的管理工具,以及用于管理整个Oracle环境的中央管理工具。
Select Configure Enterprise Manager to use Enterprise Manager. Then, select one option:
•If the Oracle Management Agent is installed on your host computer, then you can choose central management by selecting Register with Grid Control for centralized management and then selecting the Management Service.
如果主机上安装了Oracle Management Agent,则可以通过选择“注册到网格控制”进行集中管理,然后选择管理服务来选择中央管理。
•To manage your database locally, select Configure Database Control for local management. You can then optionally configure e-mail notification of database alerts or a daily backup of the database.
要在本地管理数据库,请选择配置本地管理的数据库控件。然后,您可以选择配置数据库警报的电子邮件通知或数据库的每日备份。
Step 5 - Database Credentials
In this window, specify the passwords for the administrative accounts such as SYS and SYSTEM.
在此窗口中,指定系统和系统等管理帐户的密码。
Step 6 - Database File Locations
In this window, specify the type of storage you would like your database to use. For more information, see “About Advanced Installation”.
在此窗口中,指定希望数据库使用的存储类型。有关详细信息,请参阅“关于高级安装”。
Then specify the locations for the Oracle database files. Select one of the following options:
•Use Database File Locations from Template—This option instructs DBCA to use the directory information as specified in the template. Later, you can make modifications to database file names and locations.
使用模板中的数据库文件位置此选项指示DBCA使用模板中指定的目录信息。稍后,您可以修改数据库文件名和位置。
•Use Common Location for All Database Files—This option requires you to specify a new directory for the Oracle home. All the database files are created in this location. Later, you can make modifications to database file names and locations.
对所有数据库文件使用公用位置此选项要求您为Oracle主目录指定一个新目录。所有数据库文件都在此位置创建。稍后,您可以修改数据库文件名和位置。
•Use Oracle Managed Files—This option instructs Oracle Database to directly manage operating system files comprising an Oracle database. You specify the default location, called a database area, for all your files. Oracle Database thereafter automatically creates and deletes files in this location, as required. You can also create multiple copies of your redo and online log files by selecting Multiplex Redo Logs and Control Files. To learn more about online redo log files and control files, see Chapter 9, “Performing Backup and Recovery”.
使用Oracle托管文件此选项指示Oracle数据库直接管理包含Oracle数据库的操作系统文件。为所有文件指定默认位置(称为数据库区域)。此后,Oracle数据库会根据需要自动在此位置创建和删除文件。还可以通过选择多重重做日志和控制文件来创建重做和联机日志文件的多个副本。要了解有关联机重做日志文件和控制文件的更多信息,请参阅第9章“执行备份和恢复”。
Selecting this option enables you to delegate the complete management of database files to the database. You no longer have to specify the file names, their location, or their sizes.
选择此选项可以将数据库文件的完整管理委托给数据库。您不再需要指定文件名、位置或大小。
Step 7 - Recovery Configuration
When you create a new database, it is important to configure the database so you can recover your data if a system failure occurs. Online redo log files contain a record of changes that were made to data files. Online redo log files are stored in online redo log groups. You must have at least two online redo log groups for your database. After the online redo log files in a group have filled up, the log writer process (LGWR) switches the writing of redo records to a new online redo log group. Oracle Database can automatically save the inactive group of online redo log files to one or more offline destinations, known collectively as the archived redo log (also called the archive log). The process of turning online redo log files into archived redo log files is called archiving.
创建新数据库时,必须配置数据库,以便在系统发生故障时恢复数据。联机重做日志文件包含对数据文件所做更改的记录。联机重做日志文件存储在联机重做日志组中。数据库必须至少有两个联机重做日志组。当一个组中的联机重做日志文件填满后,日志编写器进程(LGWR)将重做记录的写入切换到一个新的联机重做日志组。Oracle数据库可以自动将非活动的联机重做日志文件组保存到一个或多个脱机目标,统称为归档重做日志(也称为归档日志)。将联机重做日志文件转换为存档重做日志文件的过程称为存档。
Archiving can be performed only if the database is running in ARCHIVELOG mode. A group of online redo log files cannot be reused by the log writer (LGWR) process until the group is archived. If the database is running in NOARCHIVELOG mode, then when a group becomes inactive after the LGWR process switches to a new group, the inactive group is available for immediate reuse by the LGWR process.
只有在数据库以archivelog模式运行时,才能执行存档。日志编写器(lgwr)进程无法重用一组联机重做日志文件,除非将该组存档。如果数据库在noarchivelog模式下运行,那么当一个组在lgwr进程切换到新组后变为非活动组时,该非活动组可供lgwr进程立即重用。
The NOARCHIVELOG mode protects a database from instance failure but not from media failure. Only the most recent changes made to the database, which are stored in the online redo log files, are available for instance recovery. To restore a database operating in NOARCHIVELOG mode, you can use only entire database backups taken while the database is closed. Therefore, if you operate a database in NOARCHIVELOG mode, then back up the entire database at regular, frequent intervals.
noarchivelog模式保护数据库不受实例故障的影响,但不受媒体故障的影响。只有存储在联机重做日志文件中的对数据库所做的最新更改才可用于实例恢复。要恢复在noarchivelog模式下运行的数据库,您只能使用关闭数据库时进行的整个数据库备份。因此,如果您在noarchivelog模式下操作一个数据库,那么就定期、频繁地备份整个数据库。
The archiving of online redo log files has the following advantages:
•A database backup, with online and archived redo log files, guarantees that you can recover all committed transactions if the operating system or hardware fails.
数据库备份(带有联机和存档的重做日志文件)确保在操作系统或硬件出现故障时可以恢复所有提交的事务。
•You can recover the database using a backup that was taken while the database was open and being used, if you have a copy of the archived log files that were written while the database was being backed up.
如果您有备份数据库时写入的存档日志文件的副本,则可以使用在数据库打开和使用时进行的备份来恢复数据库。
•You can perform online tablespace backups, and use these backups to restore a tablespace following media failure.
您可以执行联机表空间备份,并在介质故障后使用这些备份恢复表空间。
•You can keep a standby database current with its original database by continuously applying the original archived redo log files to the standby database.
通过将原始存档的重做日志文件连续应用于备用数据库,可以使备用数据库与其原始数据库保持最新状态。
Before you can archive the online redo log files, you must determine the destination to which you want to archive. Oracle recommends that the archive log be stored in a fast recovery area because it can simplify backup and recovery operations for your database. A fast recovery area is a location in which Oracle Database can store and manage files related to backup and recovery. It is distinct from the database area, which is a location for the current database files (data files, control files, and online redo log files).
在存档联机重做日志文件之前,必须确定要存档到的目标。Oracle建议将存档日志存储在快速恢复区域,因为它可以简化数据库的备份和恢复操作。快速恢复区域是Oracle数据库可以存储和管理与备份和恢复相关的文件的位置。它与数据库区域不同,后者是当前数据库文件(数据文件、控制文件和联机重做日志文件)的位置。
When creating your database, you can select the following options:
•Specify Fast Recovery Area—Select this option to specify a backup and recovery area and its directory location and size. You can use variables to identify standard locations.
指定快速恢复区域选择此选项可指定备份和恢复区域及其目录位置和大小。您可以使用变量来标识标准位置。
•Enable Archiving—Select this option to enable the archiving of database online redo log files, which can be used to recover a database. Selecting this option is the same as enabling Archive Log Mode in Oracle Enterprise Manager Database Control or running the database in ARCHIVELOG mode.
启用存档选择此选项可启用数据库联机重做日志文件的存档,该日志文件可用于恢复数据库。选择此选项与在Oracle Enterprise Manager数据库控制中启用存档日志模式或在存档日志模式下运行数据库相同。
Oracle recommends you select Enable Archiving. Selecting this option provides better protection for your database for software or hardware failure. If you do not select this option now, then you can enable ARCHIVELOG mode later. See “Configuring Your Database for Basic Backup and Recovery”.
Oracle建议您选择“启用存档”。选择此选项可以为数据库提供更好的软件或硬件故障保护。如果现在不选择此选项,则可以稍后启用archivelog模式。请参见“为基本备份和恢复配置数据库”
Step 8 - Database Content
When you create your database, you can load it with data using either of the following methods:
创建数据库时,可以使用以下方法之一加载数据:
•Sample Schemas—Select Sample Schemas to include the Sample Schemas (EXAMPLE) tablespace in your database. Oracle guides and educational materials contain examples based upon the Sample Schemas. Oracle recommends that you include them in your database.
示例模式选择示例模式以在数据库中包含示例模式(示例)表空间。Oracle指南和教育材料包含基于示例模式的示例。Oracle建议您在数据库中包含它们。
•Custom Scripts—In the Custom Scripts subpage, optionally specify one or more SQL scripts to run after your database is created. Scripts are useful for performing postinstallation tasks, such as loading custom schemas. Note that if you choose to run scripts after installation, then your scripts must include a connection string that identifies the database. Click Help for more information.
自定义脚本在“自定义脚本”子页中,可以选择指定一个或多个要在创建数据库后运行的SQL脚本。脚本对于执行安装后任务(如加载自定义模式)非常有用。请注意,如果选择在安装后运行脚本,则脚本必须包含标识数据库的连接字符串。有关详细信息,请单击“帮助”。
Step 9 - Initialization Parameters
The links in this window provide access to additional windows that enable you to change the default initialization parameter settings. These parameters fall into the following categories:
此窗口中的链接提供对其他窗口的访问,这些窗口使您能够更改默认的初始化参数设置。这些参数分为以下类别:
•Memory
•Sizing
•Character Sets
•Connection Mode
You can also click the All Initialization Parameters button at the bottom of the window to display a list of all the database initialization parameters and their current settings.
Memory
Use this window to set the initialization parameters that control how the database manages its memory. You can choose from the following methods for memory management:
使用此窗口设置控制数据库如何管理其内存的初始化参数。您可以从以下内存管理方法中进行选择:
•Typical—This method requires little configuration, and allocates memory as a percentage of total overall physical system memory. Select Typical and enter a percentage value. Click Show Memory Distribution to see how much memory DBCA assigns to the System Global Area (SGA) and the aggregate Program Global Area (PGA). With this setting, the system automatically tunes many of the memory components of the SGA, and allocates memory to individual PGAs as needed. The system can also dynamically decrease or increase the total amount of memory allocated to the SGA or aggregate PGA, depending on processing demands. The total memory used for the database instance never exceeds the amount you specify. This automatic memory tuning for the instance is known as automatic memory management. To learn more about PGA and SGA, see “About Instance Memory Structure”.
通常,这种方法只需要很少的配置,并将内存分配为总物理系统内存的百分比。选择“典型”并输入百分比值。单击“显示内存分布”查看dbca分配给系统全局区域(sga)和聚合程序全局区域(pga)的内存量。使用此设置,系统自动调谐SGA的许多内存组件,并根据需要将内存分配给各个PGA。系统还可以根据处理需求动态减少或增加分配给SGA或聚合PGA的内存总量。数据库实例使用的总内存永远不会超过您指定的数量。此实例的自动内存调整称为自动内存管理。要了解有关PGA和SGA的更多信息,请参阅“关于实例内存结构”。
•Custom—This method requires more configuration than the Typical option, but gives you more control over how the database instance uses system memory. This option is meant for more experienced database administrators. You can directly specify memory sizes for the SGA and aggregate PGA and their substructures, such as the shared pool and buffer cache.
自定义此方法比典型的选项需要更多的配置,但可以让您更好地控制数据库实例如何使用系统内存。此选项适用于经验更丰富的数据库管理员。可以直接为SGA和聚合PGA及其子结构(如共享池和缓冲区缓存)指定内存大小。
Select one of the following options for customized memory management:
◦Automatic Shared Memory Management to allocate specific amounts of memory to the SGA and aggregate PGA. With this setting, automatic shared memory management is enabled for the SGA, and memory is allocated to the individual PGAs as needed.
自动共享内存管理,将特定数量的内存分配给SGA和聚合PGA。使用此设置,将为SGA启用自动共享内存管理,并根据需要将内存分配给各个PGA。
◦Manual Shared Memory Management to enter specific values for each SGA component and the aggregate PGA. This disables automatic shared memory management and enables you to determine how the SGA memory is distributed among the SGA memory components.
手动共享内存管理,为每个SGA组件和聚合PGA输入特定值。这将禁用自动共享内存管理,并使您能够确定SGA内存如何分布在SGA内存组件中。
See Also:
•Chapter 5, “Managing the Oracle Instance” for more information about memory management options
Sizing
In this tab, you specify the smallest block size and the maximum number of operating system user processes that can simultaneously connect to the database.
在该选项卡中,指定可以同时连接到数据库的最小块大小和最大操作系统用户进程数。
•Block Size—Use this list to select the block size, or accept the default. Oracle Database data is stored in data blocks of the size specified. One data block corresponds to a specific number of bytes of physical space on disk. Selecting a block size other than the default 8 kilobytes (KB) value requires advanced knowledge and should be done only when absolutely required.
块大小使用此列表选择块大小,或接受默认值。Oracle数据库数据存储在指定大小的数据块中。一个数据块对应于磁盘上物理空间的特定字节数。选择除默认8千字节(kb)值以外的块大小需要高级知识,并且只应在绝对需要时进行。
While using predefined templates, this list is not enabled because the database will be created with the default block size of 8 KB. While using the custom option, you can change the block size.
使用预定义模板时,此列表未启用,因为将创建默认块大小为8KB的数据库。使用自定义选项时,可以更改块大小。
•Processes—In this field, specify the maximum number of processes that can simultaneously connect to the database. Enter a number or accept the default value of 150. The default value for this parameter is appropriate for many environments. The value you select should allow for all background processes, user processes, and parallel execution processes.
在此字段中,指定可以同时连接到数据库的最大进程数。输入一个数字或接受默认值150。此参数的默认值适用于许多环境。您选择的值应允许所有后台进程、用户进程和并行执行进程。
Character Sets
Use this tab to define the character sets used by your database. Character sets are the encoding schemes used to display characters on your computer screen. The character set determines what languages can be represented in the database.
使用此选项卡可以定义数据库使用的字符集。字符集是用于在计算机屏幕上显示字符的编码方案。字符集决定了数据库中可以表示哪些语言。
Oracle recommends using Unicode (AL32UTF8) as the database character set. AL32UTF8 is Oracle’s name for the UTF-8 encoding of the Unicode standard. The Unicode standard is the universal character set that supports most of the currently spoken languages of the world. The use of the Unicode standard is indispensable for any multilingual technology, including database processing.After a database is created and accumulates production data, changing the database character set is a time consuming and complex project. Therefore, it is very important to select the right character set at installation time. Even if the database does not currently store multilingual data but is expected to store multilingual data within a few years, the choice of AL32UTF8 for the database character set is usually the only good decision.Even so, the default character set used by Oracle Universal Installer (OUI) and Database Configuration Assistant (DBCA) for the UNIX, Linux, and Microsoft Windows platforms is not AL32UTF8, but a Microsoft Windows character set known as an ANSI code page. The particular character set is selected based on the current language (locale) of the operating system session that started OUI or DBCA. If the language is American English or a Western European language, then the default character set is WE8MSWIN1252. Each Microsoft Windows ANSI Code Page can store data from only one language or a limited group of languages, such as only Western European, or only Eastern European, or only Japanese.A Microsoft Windows character set is the default even for databases created on UNIX and Linux platforms because Microsoft Windows is the prevalent platform for client workstations. Oracle Client libraries automatically perform the necessary character set conversion between the database character set and the character sets used by non-Windows client applications.You may also choose to use any other character set from the presented list of character sets. You can use this option to select a particular character set required by an application vendor, or choose a particular character set that is the common character set used by all clients connecting to this database.
Oracle建议使用unicode(al32utf8)作为数据库字符集。al32utf8是Oracle对Unicode标准的utf-8编码的名称。Unicode标准是一种通用字符集,支持世界上大多数当前使用的语言。使用Unicode标准对于任何多语言技术都是必不可少的,包括数据库处理。在创建数据库并积累生产数据之后,更改数据库字符集是一个耗时且复杂的项目。因此,在安装时选择正确的字符集非常重要。即使数据库目前不存储多语言数据,但预计在几年内存储多语言数据,为数据库字符集选择AL32UTF8通常是唯一好的决定。即使如此,Oracle Universal Installer(OUI)和数据使用的默认字符集Unix、Linux和Microsoft Windows平台的基本配置助手(DBCA)不是al32utf8,而是一个称为ansi代码页的Microsoft Windows字符集。特定字符集是根据启动OUI或DBCA的操作系统会话的当前语言(区域设置)选择的。如果语言为美式英语或西欧语言,则默认字符集为we8mswin1252。每个Microsoft Windows ANSI代码页只能存储一种语言或一组有限语言的数据,例如仅西欧、东欧或仅日语。即使对于在Unix和Linux平台上创建的数据库,Microsoft Windows字符集也是默认的,因为MICROSOFT Windows是客户端工作站的通用平台。Oracle客户端库自动在数据库字符集和非Windows客户端应用程序使用的字符集之间执行必要的字符集转换。您也可以选择使用显示的字符集列表中的任何其他字符集。您可以使用此选项选择应用程序供应商所需的特定字符集,或者选择一个特定字符集,该字符集是连接到此数据库的所有客户端使用的通用字符集。
Because AL32UTF8 is a multibyte character set, database operations on character data may be slightly slower when compared to single-byte database character sets, such as WE8MSWIN1252. Storage space requirements for text in most languages that use characters outside of the ASCII repertoire are higher in AL32UTF8 compared to legacy character sets supporting the language. Note that the increase in storage space concerns only character data and only data that is not in English. The universality and flexibility of Unicode usually outweighs these additional costs.
因为al32utf8是多字节字符集,所以与单字节数据库字符集(如we8mswin1252)相比,对字符数据的数据库操作可能稍慢一些。与支持该语言的传统字符集相比,大多数语言中使用ASCII指令库以外字符的文本的存储空间要求在AL32UTF8中更高。注意,存储空间的增加只涉及字符数据,而只涉及非英语数据。Unicode的通用性和灵活性通常超过了这些额外的成本。
•Database Character Set—In this section, select one of the following options:
◦Use the Default—Select this option to select only the language currently used by the operating system for all your database users and database applications.
使用默认选择此选项仅选择操作系统当前用于所有数据库用户和数据库应用程序的语言。
◦Use Unicode (AL32UTF8)—Select this option to support multiple languages for your database users and database applications.
使用unicode(al32utf8)-选择此选项可为数据库用户和数据库应用程序支持多种语言。
◦Choose from the list of character sets—Select this option if you want Oracle Database to use a character set other than the default character set used by the operating system.
从字符集列表中选择如果希望Oracle数据库使用操作系统使用的默认字符集以外的字符集,请选择此选项。
Note:
AL32UTF8 is a variable-width multibyte character set. Applications connecting to a database that uses AL32UTF8 for character data processing must be correctly programmed to work with such character sets. Always verify the character set requirements of the applications that use the database. Contact the application vendor and ask for a Unicode-capable version, if your current application version does not support the Unicode standard.
AL32UTF8是一个可变宽度多字节字符集。连接到使用al32utf8进行字符数据处理的数据库的应用程序必须正确编程,以使用此类字符集。始终验证使用数据库的应用程序的字符集要求。如果当前应用程序版本不支持Unicode标准,请与应用程序供应商联系并要求提供支持Unicode的版本。
•National Character Set—In this list, select a character set or accept the default. The national character set, also called NCHAR character set, is the character set used to store and process data of data types NVARCHAR2, NCHAR, and NCLOB. These data types allow storing of Unicode characters in a database that does not have a Unicode database character set. Unless installation requirements of any of your applications specify otherwise, accept the default value of AL16UTF16 as the national character set.
在此列表中,选择一个字符集或接受默认值。国家字符集,也称为NChar字符集,是用于存储和处理数据类型nvarchar2、NChar和NClob的数据的字符集。这些数据类型允许在没有Unicode数据库字符集的数据库中存储Unicode字符。除非任何应用程序的安装要求另有规定,否则接受默认值AL16UTF16作为国家字符集。
Note:
Although this character set is called “national,” after the SQL standard (ISO/IEC 9075), it is not better suited to support globalized applications than the database character set. Because working with national character set data requires additional API calls in client applications, and because national character set data is not supported by some database components, such as Oracle Text, Oracle recommends that multilingual applications use VARCHAR2, CHAR, and CLOB data types and an Oracle database with the database character set AL32UTF8.
尽管这个字符集在SQL标准(ISO/IEC 9075)之后被称为“国家”,但它并不比数据库字符集更适合支持全球化的应用程序。由于使用国家字符集数据需要在客户端应用程序中进行额外的API调用,并且由于某些数据库组件(如Oracle文本)不支持国家字符集数据,Oracle建议多语言应用程序使用varchar2、char和clob数据类型。以及数据库字符集为al32utf8的Oracle数据库。
•Default Language—In this list, select a default database language or accept the default. The default language determines how the database supports locale-sensitive information such as day and month abbreviations, default sorting sequence for character data, and reading direction (left to right or right to left).
此列表中的默认语言,请选择默认数据库语言或接受默认值。默认语言确定数据库如何支持区域设置敏感信息,如日期和月份缩写、字符数据的默认排序顺序和读取方向(从左到右或从右到左)。
•Default Territory—In this list, select the name of the territory whose conventions are to be followed for day and week numbering or accept the default. The default territory also establishes the default date format, the default decimal character and group separator, and the default International Standardization Organization (ISO) and local currency symbols. For example, in the United Kingdom, the default date format is DD-MON-YYYY, where DD is the day of the month (1-31), MON is the abbreviated name of the month, and YYYY is the 4-digit year.
默认区域在此列表中,选择要遵循其约定进行日和周编号的区域的名称或接受默认值。默认区域还建立默认的日期格式、默认的十进制字符和组分隔符,以及默认的国际标准化组织(ISO)和本地货币符号。例如,在英国,默认的日期格式是dd-mon-yyyy,其中dd是月份的日期(1-31),mon是月份的缩写名称,yyyy是4位数的年份。
Connection Mode
Use this window to select the database mode. You can run the database in either of the following modes:
使用此窗口选择数据库模式。可以在以下任一模式下运行数据库:
•Dedicated Server Mode—This mode allows a dedicated server process for each user process. Select this option when the number of total clients is expected to be small, for example, 50 or fewer. You might also choose this option when database clients typically make persistent, long-running requests to the database. By default, the database is configured for dedicated server processes.
专用服务器模式此模式允许每个用户进程使用专用服务器进程。当总客户机数预计很小(例如50个或更少)时,选择此选项。当数据库客户端通常向数据库发出持久的、长时间运行的请求时,您也可以选择此选项。默认情况下,数据库是为专用服务器进程配置的。
•Shared Server Mode—This mode allows several client connections to share a database-allocated pool of resources. Use this mode in configurations in which client load is expected to cause a strain on memory and other system resources. If you choose shared server mode, then you must indicate the number of server processes you want to create when a database instance is started. For more information about setting this parameter, click Help.
共享服务器模式此模式允许多个客户端连接共享数据库分配的资源池。在预期客户端负载会导致内存和其他系统资源紧张的配置中使用此模式。如果选择共享服务器模式,则必须指示启动数据库实例时要创建的服务器进程数。有关设置此参数的详细信息,请单击“帮助”。
Step 10 - Database Storage
In this window, a navigation tree displays the storage structure of your database (control files, data files, online redo log groups, and so forth). If you are not satisfied with the storage structure or parameters, then you can make changes.
在此窗口中,导航树显示数据库的存储结构(控制文件、数据文件、联机重做日志组等)。如果您对存储结构或参数不满意,则可以进行更改。
Note that if you selected a preconfigured template for a database, then you cannot add or remove control files, data files, or undo segments.
请注意,如果为数据库选择了预配置的模板,则无法添加或删除控制文件、数据文件或撤消段。
Step 11 - Creation Options
In this window, select any of the following options for creating the database:
在此窗口中,选择以下任一选项以创建数据库:
•Create Database—Select this option to create your database now.
翻译:创建数据库-选择这个选项用来创建一个您的数据库
•Save as a Database Template—Select this option to save the database definition as a template to use at a later time.
翻译:保存数据库模版-选择这个选项用来保存数据库定义作为一个模版方便以后使用
•Generate Database Creation Scripts—Select this option to generate a SQL database creation script that you can run at a later time.
翻译:普通数据库创建脚本-选择这个选项生成数据库SQL创建脚本,方便你之后运行
After you make your choice, click Finish. A confirmation window appears after a short period. Review the Create Database Summary information, then click OK to proceed.
翻译:在你做出了选择以后,点击完成。在段时间内会出现一个配置窗口,查看创建数据库的摘要信息,然后点击OK继续下一步。
Changing the Configuration of a Database Using DBCA
翻译:使用DBCA更改数据库配置
You can use DBCA to change the configuration of an existing database. For example, you can:
翻译:您可以使用DBCA更改一个已经存在的数据库的配置,例如,你可以
•Register the database with Grid Control
翻译:使用Grid Control注册数据库
•Configure Database Control alert notification via e-mail
翻译:通过电子邮件配置数据库控制警报通知
•Enable daily disk backups to the recovery area
翻译:做每日硬盘备份到recovery area
•Change default security settings
翻译:更改默认安全设置
•Change server mode from dedicated to shared, or the reverse
翻译:将服务器模式从专用更改为共享,或相反
•Add database options that were not previously configured (for example, Oracle Label Security or Oracle OLAP)
翻译:添加以前未配置的数据库选项(例如,Oracle Label Security或Oracle OLAP)
To change the configuration of a database using DBCA:
翻译:下面就通过DBCA来更改数据库配置
1.Start DBCA as described in “Starting DBCA”.
翻译:按照在Starting DBCA部分描述的开启DBCA
2.In the Operations window, select Configure Database Options and click Next.
翻译:在操作窗口,选择配置数据库选项和点击下一步
3.Follow the instructions in the DBCA guided workflow.
翻译:按照DBCA引导的工作流中的说明进行操作。
Deleting a Database Using DBCA
翻译:使用DBCA删除数据库
You can also use DBCA to delete a database. When DBCA deletes a database, it shuts down the database instance and then deletes all database files. On the Windows platform, it also deletes associated Windows services.
翻译:你也可以使用DBCA删除一个数据库,当DBCA删除一个数据库的时候,他会关闭数据库实例然后删除所有的数据库文件,在windows平台,他通常还会删除windows服务相关的。
To delete a database using DBCA:
翻译:下面是用DBCA 删除一个数据库步骤
1.Start DBCA as described in “Starting DBCA”.
翻译:像开启DBCA部分描述启动DBCA
2.In the Operations window, select Delete a Database and click Next.
翻译:在操作窗口或,选择删除数据库,点击下一步。
3.Select the database to delete and click Finish.
翻译:选择了删除数据库然后点完成
Managing Templates with DBCA
翻译:用DBCA管理数据库模版
DBCA templates are XML files that contain information required to create a database. Templates are used in DBCA to create new databases and duplicate existing databases. The information in templates includes database options, initialization parameters, and storage attributes (for data files, tablespaces, control files, and online redo log files).
翻译:DBCA模版是一个包含了创建数据库相关请求的XML文件。在DBCA中被用到的模版可以用来创建一个数据库和管理一个已经存在的数据库副本。在模版中包含数据库选项,初始化参数和存储参数等信息
Templates can be used just like scripts, but they are more powerful than scripts because you have the option of duplicating a database. Duplication saves time because you copy the files of an existing database, referred to as a seed database, to the correct locations.
翻译:模版可以像一个脚本一样被使用,但是他们比脚本的作用更大,因为你有选项访问副本。复制可以节省时间,因为您可以将现有数据库(称为种子数据库)的文件复制到正确的位置。
Templates are stored in the following directory:
ORACLE_HOME/assistants/dbca/templates
翻译:模版保存在以下目录:
ORACLE_HOME/assistants/dbca/templates
Advantages of Using Templates
翻译:使用模版的优点
Using templates has the following advantages:
翻译:使用模版有一下优点:
•Time saving. If you use a template, then you do not have to define the database.
翻译:时间是节省的,加入你用了模版,然后你就不用再定义数据库了
•Easy duplication. By creating a template containing your database settings, you can easily create a duplicate database without specifying parameters twice.
翻译:容易复制,被创建的模版包含了你数据设置信息,你可以更加容易的创建一个数据库,不再需要通过二次指定数据库参数
•Easy editing. You can quickly change database options from the template settings.
翻译:更加容易编辑,你可以更快的通过模版设置改变一个数据库选项
•Easy sharing. Templates can be copied from one computer to another.
翻译:更容易共享,模版可以从一个机器拷贝到另外一台机器
Types of Templates
翻译:模版的类型
Templates are divided into the following types:
翻译:模板分为以下类型
•Seed templates
翻译:种子模版
•Nonseed templates
翻译:非种子模版
The characteristics of each are shown in Table 2-1.
翻译:各特征见表2-1
Table 2-1 DBCA Template Types
翻译:Table 2-1 DBCA模版类型
Type
翻译:类型
File Extension
翻译:文件扩展
Includes Data Files
包含数据文件
Database Structure
数据库结构
Seed
.dbc
Yes
This type of template contains both the structure and the physical data files of an existing database, referred to as the seed database. Your new database starts as a copy of the seed database, and requires only the following changes:
翻译:这种类型的模版既包含一个已经存在数据库的结构也包含物理文件,你新的数据库是作为种子数据库的一种拷贝形式存在的,仅仅是存在以下变化:
•Name of the database
数据库的名称
•Destination of the data files
数据文件的位置
•Number of control files
控制文件的个数
•Number of online redo log groups
在线redo日志组的个数
•Initialization parameters
初始化参数
Other changes can be made after database creation using custom scripts that can be invoked by DBCA, command-line SQL statements, or Oracle Enterprise Manager Database Control.
其他的一些更改可以在数据库创建以后使用DBCA自定义脚本、SQL语句命令行和EM修改
The data files for the seed database are stored in compressed RMAN backup format in a file with a .dfb extension. The seed database control file is stored in a file with .ctl extension. (This file is needed only when storing data files in Oracle Automatic Storage Management (Oracle ASM) disk groups or as Oracle Managed Files.) The .dbc file contains the location of the seed database data files and contains the source database name used to mount the control file.
种子数据库的数据文件保存在rman备份的以dfb结尾的文件,这个种子数据库控制文件存储在以ctl结尾的的文件中,dbc文件包含本地种子数据库数据文件和包含源端数据库名称
Nonseed
.dbt
No
This type of template is used to create a new database. It contains the characteristics of the database to be created. Nonseed templates are more flexible than their seed counterparts because all data files and online redo log files are created to your specification, and names, sizes, and other attributes can be changed as required.
这个类型的模版是用在创建一个新的数据库,数据被创建以后包含一些特征。非种子模版比种子库更加的灵活,因为所有的数据文件和在线redo日志文件都是按照你的规范、名称、大小和其他特征要求被创建的。
DBCA Templates Provided by Oracle
被ORACLE支持的DBCA模版
Oracle provides the templates shown in Table 2-2.
Oracle支持的模版显示在2-2表格
Table 2-2 Oracle-Provided DBCA Templates and Their Corresponding Workloads
Template
Workload
Data warehouse
数据仓库
Users perform numerous, complex queries that process large volumes of data. Response time, accuracy, and availability are key issues.
用户执行许多复杂的查询,处理大量数据。响应时间、准确性和可用性是关键问题。
These queries (SELECT statements) range from a fetch of a few records to queries that sort thousands of records from many different tables.
这些查询(select语句)的范围从获取一些记录到对来自许多不同表的数千条记录进行排序的查询。
General Purpose or Transaction processing
一般用途和事务处理
Many concurrent users perform numerous transactions that require rapid access to data. Availability, speed, concurrency, and recoverability are key issues.
许多并发用户执行许多需要快速访问数据的事务。可用性、速度、并发性和可恢复性是关键问题。
Transactions consist of reading (SELECT statements), writing (INSERT and UPDATE statements), and deleting (DELETE statements) data in database tables.
事务包括读取(select语句)、写入(insert和update语句)和删除(delete语句)数据库表中的数据。
Custom database
自定义数据库
This template allows you maximum flexibility in defining a database because you can change any of the settings for the database being created.
这个模版允许你最大化的灵活的定义数据库,因为你能够在创建数据的时候更改一些设置。
Creating Templates Using DBCA
利用DBCA创建模版
Follow the instructions in this section to create your own templates.
To create templates:
1.Start DBCA as described in “Starting DBCA”.
按照Starting DBCA部分启动DBCA
2.In the Operations window, select Manage Templates and click Next.
在操作窗口,选择管理模版然后点击下一步
3.In the Template Management window, select Create a database template and one of the following options, and click Next.
在模版管理窗口,选择创建一个数据库模版,然后点击下一步
◦From an existing template
来自一个已经存在的模版
Using an existing template, you can create a new template based on the predefined template settings. You can add or change any template settings such as initialization parameters, storage parameters, or whether to use custom scripts.
利用一个存在的模版,你可以基于提前预定设置创建一个新的模版,你可以增加或者修改模版设置,例如初始化参数,存储参数或者使用自定义脚本
◦From an existing database (structure only)
来自一个已经存在的数据库
You can create a new template that contains structural information from an existing database, including database options, tablespaces, data files, and initialization parameters. User-defined schemas and their data will not be part of the created template. The source database can be either local or remote. Select this option when you want the new database to be structurally similar to the source database, but not contain the same data.
你能够创建一个新的模版,包含一个已经存在数据库的结构信息、数据库选项、表空间、数据库文件和初始化参数。源数据既可以是本地的也可以使远程的,当你想要创建一个新的数据库而只是要源库最小化的结构请选择这个选项。
◦From an existing database (structure as well as data)
来源于一个已经存在的数据库
You can create a new template that has both the structural information and physical data files of an existing database. Databases created using such a template are identical to the source database. User-defined schemas and their data will be part of the created template. The source database must be local. Select this option when you want a template from which you can create an exact replica of the source database.
你可以创建一个已经存在数据库的既包含结构也包含物理文件的新的模版文件,使用这个模版创建的数据库是和源库相同的,用户自定义的schemas和他们的数据是被创建模版的一部分,源端数据库必须是本地的,当你想要创建一个源端库扩展的可复制的数据库就选择这个选项。
When creating templates from existing databases, you can translate file paths into Optimal Flexible Architecture (OFA) or maintain existing file paths. OFA is a set of file naming and placement guidelines for Oracle software and databases. Using OFA is recommended if the target computer on which you plan to create a database using the template has a different directory structure than computer on which the template was defined. Standard file paths can be used if the target computer has a directory structure that is similar to the directory structure on the source computer.
当创建一个已经存在数据库的模版的时候,你可以在OFA调整文件路径,OFA是一个文件名称和文件位置指导文件集,假如你要创建数据库的目标电脑和模版中定义的源端电脑的文件不一致强烈建议使用OFA
4.Follow the instructions in the DBCA guided workflow to create your template.
在DBCA工作流中创建一个你的模版只要是包含以下结构
Deleting Templates
删除模版
When you delete a template, it is no longer available to create a new database or a new template.
删除模板时,它将不再可用于创建新数据库或新模板
To delete a template:
删除一个模版:
1.Start DBCA as described in “Starting DBCA”.
按照Starting DBCA描述开启一个DBCA
2.In the Operations window, select Manage Templates and click Next.
在操作窗口,选择管理模版然后点击下一步
3.In the Template Management window, select Delete a database template and click Next.
在模版管理窗口,选择删除一个数据库模版点击下一步
4.Select the template to delete and click Finish.
选择删除模版点击完成
Installation: Oracle By Example Series
Oracle By Example (OBE) has a series on the Oracle Database 2 Day DBA guide. This OBE steps you through the tasks in this chapter and includes annotated screenshots.
To view the Installation OBE, in your browser, enter the following URL:
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/2day_dba/install/install.htm
This chapter provides a brief roadmap for administering your database. It introduces you to Oracle Enterprise Manager Database Control (Database Control), the Web-based interface for managing an Oracle database.
本章提供了管理数据库的简要路线图。它向您介绍了Oracle Enterprise Manager数据库控制(数据库控制),这是用于管理Oracle数据库的基于Web的界面。
This chapter contains the following sections:
•Managing Your Database: A Roadmap
管理你的数据库库:路线图
•Introduction to Oracle Enterprise Manager Database Control
介绍Oracle Enterprise Manager Database Control
•Starting and Stopping the Database Control Console Process
开启和关闭 Database Control Console进程
•Accessing the Database Home Page
访问数据库家目录
•Granting Access to Database Control for Nonadministrative Users
数据非管理员用户访问Database Control
•Creating Database Control Administrative Users
创建一个数据库控制管理员用户
•Setting Database Control Preferences
设置数据库控制偏好
•Administering the Database with SQL-Based Management Tools
利用基于sql管理方式的工具管理数据库
•Getting Started with Oracle Enterprise Manager: Oracle By Example Series
开启一个数据库
Managing Your Database: A Roadmap
管理你的数据库路线图
This section provides an overview of the tasks involved in managing an Oracle database instance. Each chapter in this guide describes a different task in detail.
这一章节提供一个管理数据库任务的预览,每一个部分详细的描述了不同的任务
To manage your Oracle database:
管理数据库
1.Start the database instance.
开启数据库实例
After the installation, your instance is started and your database is open. In the future, there will be times, perhaps for doing database maintenance or because of a power or media failure, that you shut down your database instance and later restart it.
在安装之后,你的实例是启动的并且你的数据也是打开状态,将来,可能由于数据库维护或电源或媒体故障,有时会关闭数据库实例,然后重新启动它。
See “Shutting Down and Starting Up the Oracle Instance”.
请看管理和启动Oracle Instance部分内容
2.Optionally, configure the network environment to enable clients to connect to your database.
配置网络环境以使客户端能够连接到数据库。
See Chapter 4, “Configuring the Network Environment”.
请看第四章节,配置网络环境
3.Review your database storage structures: tablespaces and data files, online redo log files, and control files. Create or modify storage structures as needed.
回顾你的数据库存储结构(表空间、数据文件、在线redo日志文件和控制文件和创建修改存储结构)经常是被需要的
See Chapter 6, “Managing Database Storage Structures”.
查看第六章节,管理数据库存储结构
4.Review memory allocation and adjust as needed.
回顾可用内存和调整内存也是被需要的
See “Managing Memory”.
查看内存管理部分
5.Review, unlock, and reset passwords for predefined database users as needed. Create new users, and assign privileges and roles to them.
回顾解锁的和重置密码的数据库用户,创建新用户和授予权限和角色给他们
See Chapter 7, “Administering User Accounts and Security”.
查看第七章节,管理用户访问和安全
6.Create the necessary schema objects, including tables, views, and indexes. Populate the tables with data.
创建schema objects,包含表、视图、和索引,用数据填充表
See Chapter 8, “Managing Schema Objects”.
查看第八章节,管理Managing Schema Objects
7.Create or review the backup strategy for the database and back up the database.
创建和回顾数据库备份策略和备份数据库
See Chapter 9, “Performing Backup and Recovery”.
查看第九章节,“备份和恢复”
8.Enable archiving of online redo log files, if not already done.
设置在线redo日志文件为归档模式
See “Configuring Recovery Settings”.
查看“配置恢复设置”
9.Monitor database performance, diagnose performance problems, and tune the database as necessary.
监控数据库性能,诊断性能问题和优化数据库
See Chapter 10, “Monitoring and Tuning the Database”.
查看第十章节,“监控和优化数据库”
10.Investigate, gather diagnostic data for, and report to Oracle Support Services any critical database errors.
调查、收集诊断数据,并向Oracle支持服务部门报告任何严重的数据库错误。
See Chapter 11, “Investigating, Reporting, and Resolving Problems”.
查看第十一章节,“诊断、报告和定位问题”
11.Keep Oracle Database software up-to-date with the latest releases.
保持数据库软件到一个最新版本
See Chapter 12, “Managing Oracle Database Software”.
查看第十二章,“管理oracle数据库软件”
Introduction to Oracle Enterprise Manager Database Control
介绍Oracle Enterprise Manager Database Control
Oracle Enterprise Manager Database Control (Database Control) is the primary tool for managing your Oracle database. It is installed with the database.
Database Control是一个最基本的管理数据库的工具,他是随数据库一起安装的
Using Database Control, you can perform administrative tasks such as creating schema objects (tables, views, indexes, and so on), managing user security, managing database memory and storage, backing up and recovering your database, and importing and exporting data. You can also view performance and status information about your database.
使用Database Control,你能够执行一些创建对象、管理用户安全、管理数据库内存和存储、备份和恢复数据、导入导出的任务,也可以查看系统性能和状态
Database Home Page
数据库主页
The main page for database administration is the Database Home page. This is the page that loads when you log in to Database Control. See “Accessing the Database Home Page”.
数据库主页是数据库管理的主要页面,这个页面是在你登录数据库控制端的时候加载的,查看访问数据库主页
Online Help
在线帮助
You can access context-sensitive online help by clicking the Help link displayed at the top of every page. On any help page, click Contents for links to all help topics. A search facility enables you to search the contents of online help.
Navigation
导航栏
Navigational features of Database Control include the following:
•Subpage links at the top of the page. These links take you to the various Database Control subpages that organize management tasks into distinct categories. For example, you click Availability to perform tasks associated with backing up and recovering your data.
Description of hp-propertypages.gif follows
Description of the illustration hp-propertypages.gif
•Drill-down links that provide increasing levels of detail.
Description of drilldownlink.gif follows
Description of the illustration drilldownlink.gif
For example, clicking the link next to the label Host provides additional details about the computer on which the database runs.
•Suggested related links for more information.
Description of hp_relatedlinks.gif follows
Description of the illustration hp_relatedlinks.gif
Configuring the Operating System Environment Variables
配置操作系统环境变量
Before using certain tools that access the Oracle database, such as SQLPlus, you must configure environment variables for your operating system. These environment variables are used by Oracle Database to determine the database instance to which the tool should connect.
在使用某些工具(例如SQLPlus)访问数据库之前,你必须要配置操作系统环境变量,这些变量是一些工具连接oracle必须要使用到的
To configure operating system environment variables for your database instance on Linux and UNIX systems:
在Linux和unix操作系统上配置系统环境变量
1.Open an operating system command window.
打开一个操作系统命令窗口
2.Ensure that the environment variables ORACLE_HOME and ORACLE_SID are set properly. The commands to use to set these environment variables depend on the shell you use to interface with the operating system. For example:
确保环境变量ORACLE_HOME and ORACLE_SID是被设置的。设置环境变量的命令依赖于你使用的操作系统的的shell,例如
◦(bash or ksh) export ORACLE_SID=orcl
◦(csh or tcsh) setenv ORACLE_SID=orcl
You can set these with the scripts coraenv (for the C shell) and oraenv (for other shells). These scripts are typically located in the /usr/local/bin directory.
3.Ensure that the $ORACLE_HOME/bin directory is in your PATH environment variable.
确保 $ORACLE_HOME/bin目录在你的path环境变量内
4.You can also edit the profile file for your default shell in the home directory of the software owner, for example /home/oracle, so that these environment variables are set every time you log in as that user.
To configure operating system environment variables for your database instance on Windows systems:
1.Open an operating system command window.
2.Use either regedit or the Oracle Administration Assistant for Windows to make sure the ORACLE_HOME and ORACLE_SID parameters are set to the correct values in the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_HOME_NAME registry subkey.
3.Ensure that the %ORACLE_HOME%\bin directory is in your PATH environment variable. At a command prompt, use a command similar to the following:
set PATH=%ORACLE_HOME%\bin;%PATH%
See Also:
•Oracle Database Administrator’s Reference for Linux and UNIX-Based Operating Systems for more information about setting environment variables
•Oracle Database Platform Guide for Microsoft Windows for details on modifying the registry entries
Starting and Stopping the Database Control Console Process
启停Database Control Console进程
To access Oracle Enterprise Manager Database Control (Database Control) from a browser, the Database Control console process dbconsole must be running on the database host computer. The dbconsole process is automatically started after installation. However, if the system must be restarted, you can start the dbconsole process manually at the command line or start it as a service in Windows. You can also run commands to stop the dbconsole process or view its status. If the dbconsole process is stopped, then it must be manually restarted before you use Database Control.
要想通过浏览器访问Database Control,那dbconsole必须在数据库主机是运行的。dbconsole 进程是数据库安装以后自动启动的,然而,假如系统必须重启,你可以手动在命令行启动dbconsole,你通常可以使用命令关闭dbconsole 进程和查看他的状态,如果dbconsole 是关闭的,那你必须手动的重启
To start or stop, or to view the status of the dbconsole process from the command line:
通过以下命令启停和查看dbconsole进程状态
1.Configure the operating system environment variables, as described in “Configuring the Operating System Environment Variables”.
配置操作系统环境变量
2.Do one of the following:
做一下操作
◦To start the dbconsole process, run the following command:
./emctl start dbconsole
使用命令./emctl start dbconsole 启动dbconsole 进程
◦To stop the dbconsole process, run the following command:
./emctl stop dbconsole
使用./emctl stop dbconsole停止dbconsole
◦To view the status of the dbconsole process, run the following command:
./emctl status dbconsole
使用以下命令./emctl status dbconsole查看dbconsole 进程状态
Note:
If you are prompted to set the ORACLE_UNQNAME environment variable, then set this variable and run the emctl command again. Set the variable to the database unique name (the value of the DB_UNIQUE_NAME database parameter). A typical value for DB_UNIQUE_NAME is orcl.
To start or stop dbconsole as a service on Microsoft Windows:
1.Do one of the following:
◦On Windows XP and Windows Server 2003, click Start, and then select Control Panel.
◦On Windows 2000 Server, click Start, select Settings, and then select Control Panel.
The Control Panel window opens.
2.Double-click the Administrative Tools icon, and then double-click the Services icon.
The Services window opens.
Oracle Database services begin with Oracle. The dbconsole service is listed as OracleDBConsoleOracle_sid, where Oracle_sid is the system identifier (SID) for your database instance. The status of this process (either started or stopped) is listed in the Status column.
3.Double-click the OracleDBConsoleOracle_sid service.
The service properties window opens.
4.In the Startup Type list, ensure that either Manual or Automatic is selected.
5.Do one of the following:
◦To start dbconsole, click Start, and then click OK.
◦To stop dbconsole, click Stop, and then click OK.
Accessing the Database Home Page
The Database Home page is the main database management page in Oracle Enterprise Manager Database Control (Database Control).
To access the Database Home page:
1.Ensure that the dbconsole process is running on the database host computer.
See “Starting and Stopping the Database Control Console Process”.
2.In your Web browser, enter the following URL:
https://hostname:portnumber/em
For example, if you installed the database on a host computer named comp42.example.com, and the installer indicated that your Enterprise Manager Console HTTP port number is 1158, then enter the following URL:
https://comp42.example.com:1158/em
If you have recently installed Oracle Database, you can determine the port number for Database Control on Linux and UNIX systems by viewing the $ORACLE_HOME/install/portlist.ini file. Otherwise, you can determine the port number for Database Control by searching for REPOSITORY_URL in the O R A C L E H O M E / O r a c l e s i d / s y s m a n / c o n f i g / e m d . p r o p e r t i e s f i l e , w h e r e O r a c l e s i d i s t h e s y s t e m i d e n t i f i e r ( S I D ) f o r y o u r d a t a b a s e i n s t a n c e . 假 如 你 已 经 安 装 了 o r a c l e 数 据 库 , 你 可 以 通 过 以 下 方 式 确 定 p o r t n u m b e r f o r D a t a b a s e C o n t r o l 的 端 口 , ORACLE_HOME/Oracle_sid/sysman/config/emd.properties file, where Oracle_sid is the system identifier (SID) for your database instance. 假如你已经安装了oracle数据库,你可以通过以下方式确定port number for Database Control的端口, ORACLEHOME/Oraclesid/sysman/config/emd.propertiesfile,whereOraclesidisthesystemidentifier(SID)foryourdatabaseinstance.假如你已经安装了oracle数据库,你可以通过以下方式确定portnumberforDatabaseControl的端口,ORACLE_HOME/install/portlist.ini文件或者$ORACLE_HOME/Oracle_sid/sysman/config/emd.properties文件
If the database instance is running, then the Login page appears when you access Database Control. If the database is down and must be restarted, Database Control displays the Startup/Shutdown and Perform Recovery page.
You must do the following to start the database:
a.Click Startup/Shutdown, enter the host login user name and password, and then enter the database login user name and password.
For the database user name and password, enter SYS and the password that you specified during installation.
b.Click OK to start the database instance, and then in the Confirmation page, click Yes to start the database in open mode.
3.Log in to the database with a user account that is authorized to access Database Control.
This user initially could be SYS or SYSTEM, with the password that you specified during database installation.
Although the SYSTEM account can be used to perform day-to-day administrative tasks, Oracle strongly recommends creating a named user account for administering the Oracle database to enable monitoring of database activity. To back up, recover, or upgrade the database, you must log in as a SYSDBA user.
Database Control displays the Database Home page.
Description of homepage_small.gif follows
Description of the illustration homepage_small.gif
The subpage links across the top of the page enable you to access performance, availability, and other administration pages to manage your database. The features provided by these pages are discussed in other sections of this documentation.
The various sections of the Database Home page provide information about the environment and status of the database. For example, the Alerts and Diagnostic Summary sections warn you of errors and performance problems that are impacting the operation of your database. You can click the provided links to see more detail about the problem areas, and, in some cases, to obtain recommendations for resolving the problems. These topics are discussed in Chapter 10, “Monitoring and Tuning the Database”.
See Also:
•“Starting and Stopping the Database Control Console Process”
•Oracle Database 2 Day + Security Guide
Granting Access to Database Control for Nonadministrative Users
As a database administrator, you can log in to Oracle Enterprise Manager Database Control (Database Control) with the SYS or SYSTEM user account to perform administrative and other tasks. Nonadministrative users may also want to log in to Database Control. For example, application developers may want to take advantage of the Database Control interface to create or modify tables, indexes, views, and so on. You must grant access to Database Control to these users before they can log in.
For nonadministrative users to have access to Database Control, they must be granted the SELECT_CATALOG_ROLE role. See “Example: Granting Privileges and Roles to a User Account”.
非管理员用户想要访问em,他们必须被授予SELECT_CATALOG_ROLE角色
See Also:
Creating Database Control Administrative Users
When you log in to Oracle Enterprise Manager Database Control (Database Control) using the SYS, SYSTEM, or SYSMAN user accounts, you are logging in as the Database Control super user. These are the only accounts that are automatically granted the roles and privileges required to administer Database Control itself. Examples of Database Control administration tasks include the following:
当你用SYS, SYSTEM, or SYSMAN登录EM的时候默认是用超级管理员方式登录的,
•Creating other Database Control administrators
配置其他Database Control管理员
•Configuring e-mail and other notification methods
配置e-mail 和其他通知方式
See “Setting Up Direct Alert Notification”.
查看“设置直接警报通知”
•Setting alert thresholds for database metrics, such as tablespace space usage percentage exceeded or SQL response time exceeded
设置数据库度量的警报阈值,例如表空间使用率和sql执行时间效应
See “Managing Alerts”.
查看管理告警
•Selecting database policies to apply, so that Database Control can show alerts if a policy is violated. (An example policy is “A nonsystem user cannot use the SYSTEM or SYSAUX tablespace as its default tablespace.”)
选择要应用的数据库策略,以便数据库控件在违反策略时显示警报。(例如,策略是“非系统用户不能将系统或Sysaux表空间用作其默认表空间。”)
•Defining blackouts, which are time periods in which database monitoring is suspended so that maintenance operations do not skew monitoring data or generate needless alerts.
See “Defining Blackout Periods”.
You can create Database Control administrative users who have enough privileges to administer Database Control itself, but lack the high-level database administration privileges of the SYS and SYSTEM users. This practice enables you to assign the minimum privileges required for other Database Control administrators to do their jobs, which is a best practice for database security. You can also create a Database Control administrative account for yourself, thus avoiding logging in as SYS or SYSTEM until you must perform database administration tasks.
您可以创建数据库控制管理用户,这些用户有足够的权限管理数据库控制本身,但缺少sys和系统用户的高级数据库管理权限。此实践允许您为其他数据库控制管理员分配完成其工作所需的最低权限,这是数据库安全的最佳实践。您还可以为自己创建一个数据库控制管理帐户,从而避免在必须执行数据库管理任务之前以sys或system身份登录。
Using the following procedure, you can assign Database Control administrative privileges to an existing database user or create a new Database Control administrative user. When you create a new Database Control administrative user, a user account is created for that user for the database. You must then decide which system privileges, object privileges, or roles to grant the user, if any, to perform database administration tasks.
使用以下过程,可以将数据库控制管理权限分配给现有数据库用户或创建新的数据库控制管理用户。创建新的数据库控件管理用户时,将为该用户创建数据库的用户帐户。然后,您必须决定授予用户哪些系统特权、对象特权或角色(如果有的话)来执行数据库管理任务
To create a Database Control administrative user:
1.On any Database Control page, at the top of the page, click Setup.
The Enterprise Manager Configuration page appears, showing the Overview of Setup page.
出现“Enterprise Manager配置”页面,显示“设置概述”页面
2.In the left navigation bar, click Administrators.
The Administrators page appears.
Description of em_admin_create.gif follows
Description of the illustration em_admin_create.gif
3.Click Create.
The Create Administrator: Properties page appears.
Description of em_admin_create_properties.gif follows
Description of the illustration em_admin_create_properties.gif
4.In the Name field, enter the name of an existing database user, or click the flashlight icon next to the field and select an existing database user.
5.Enter one or more e-mail addresses for this administrator only if you plan to set up e-mail notifications for the database.
See “Setting Up Direct Alert Notification” for more information.
6.Click Review to view a page that summarizes the information that you entered.
单击“审阅”可查看总结您输入的信息的页面。
7.Click Finish to configure the database user as a Database Control administrative user.
单击“完成”将数据库用户配置为数据库控件管理用户
The Administrators page appears, showing the new administrator in the list.
出现“管理员”页面,在列表中显示新的管理员。
Setting Database Control Preferences
设置数据库控件首选项
This section discusses setting user preferences for Oracle Enterprise Manager Database Control (Database Control). It contains the following topics:
本节讨论为Oracle Enterprise Manager数据库控件(数据库控件)设置用户首选项。它包含以下主题:
•About Database Control Preferences
关于数据库控件首选项
•Defining Blackout Periods
定义停电时段
•Setting Preferred Credentials
设置首选凭据
About Database Control Preferences
关于数据库控件首选项
Database Control enables you to set user preferences in the following areas:
数据库控件使您能够在以下区域设置用户首选项
Notification
These settings enable Database Control to e-mail you alerts. Alerts are notifications that the database is in an undesirable state and needs your attention. By default, the Database Home page lists all alerts. However, setup is required for e-mail notification. For more information about alerts and setting up notifications, see “Setting Up Direct Alert Notification”.
这些设置允许数据库控件通过电子邮件向您发送警报。警报是数据库处于不需要的状态并需要您注意的通知。默认情况下,数据库主页列出所有警报。但是,电子邮件通知需要设置。有关警报和设置通知的详细信息,请参阅“设置直接警报通知”
Blackout Administration
停电管理
Blackouts suspend the collection of database monitoring data and the sending of alerts by Database Control. Blackouts enable you to perform scheduled maintenance on the database without receiving needless alerts and without skewing the monitoring data.
停电暂停数据库监控数据的采集和数据库控件发送警报。停电使您能够在不接收不必要的警报和不扭曲监控数据的情况下对数据库执行计划维护。
For example, you can stop data collections during a database backup or a hardware upgrade. If you continue monitoring during these periods, then the collected data shows trends and other monitoring information that is not the result of typical day-to-day operations. To get a more accurate, long-term picture of database performance, you can use blackouts to exclude these special-case situations from data analysis. See “Defining Blackout Periods” for more information.
例如,可以在数据库备份或硬件升级期间停止数据收集。如果您在这些期间继续监控,那么收集的数据将显示趋势和其他监控信息,而这些信息不是典型的日常操作的结果。为了更准确、更长期地了解数据库性能,可以使用中断从数据分析中排除这些特殊情况。有关更多信息,请参阅“定义停电时段”。
Preferred Credentials
首选身份证明
Database Control can automatically execute many routine administrative tasks, such as backups. You can use a job scheduling system that is built into Database Control for these routine tasks. To keep your environment secure, setting up tasks for automatic execution in Enterprise Manager requires you to provide login information for the host computer and database. To avoid entering this information every time you create or run a job or task, Database Control enables you to save this information as preferred credentials. Preferred credentials are stored in the database in encrypted mode to protect them from unauthorized use. See “Setting Preferred Credentials”.
数据库控件可以自动执行许多日常管理任务,如备份。对于这些例行任务,可以使用内置于数据库控件中的作业调度系统。为了保证您的环境安全,在Enterprise Manager中设置自动执行的任务需要您为主机和数据库提供登录信息。为了避免每次创建或运行作业或任务时都输入此信息,数据库控件使您能够将此信息保存为首选凭据。首选凭据以加密模式存储在数据库中,以防止未经授权使用。请参阅“设置首选凭据”。
Defining Blackout Periods
定义停电时段
You can define one or more one-time or repeating blackout periods during which collection of database monitoring information and the sending of alerts are suspended.
您可以定义一个或多个一次或重复的中断期,在此期间暂停收集数据库监视信息和发送警报。
To define a blackout period:
定义停电时段
1.On any Database Control page, at the top of the page, click Setup.
在任一一个数据库控制端页面,在页面的顶部点击安装
The Enterprise Manager Configuration page appears, showing the Overview of Setup page.
企业管理配置页面出现,显示安装页面预览
2.In the left-hand pane, click Blackouts.
在左手边的面板,点击停电
The Blackouts page appears.
停电页面出现
3.Click Create to start the Create Blackout wizard.
点击创建开启一个创建停电向导
The Create Blackout: Properties page appears.
创建停电属性页面出现
Description of em_blackout_properties.gif follows
Description of the illustration em_blackout_properties.gif
4.(Optional) Replace the default blackout name with one of your choosing.
用你选择的项目替换默认的停电名称
5.(Optional) In the Comments field, enter text that describes the purpose of the blackout.
在命令框内,输入一个文本描述断电目的
6.In the Reason list, select the blackout reason that is most appropriate.
在结果列表选择断电原因
7.In the Available Targets section, in the Type list, select Database Instance.
在可用的标签章节,进入到类型列表,选择数据库实例
The fully qualified name for your database instance appears in the Available Targets list.
你的数据库实例完整名称出现在可用的目标列表中
8.In the Available Targets list, select your instance, and then click the Move icon.
在可用的目标列表,选择你的数据实例,然后点击移动按钮图标
Note:备注
You can also double-click the instance name.
你可以双击实例名称
The instance name is moved from the Available Targets list to the Selected Targets list.
实例名称从高可用标签列表移除
9.Click Next.
点击下一步
The Create Blackout Schedule page appears.
Description of em_blackout_schedule.gif follows
Description of the illustration em_blackout_schedule.gif
10.On the Create Blackout Schedule page, do the following:
a.In the Start section, schedule the blackout either immediately or for a later date and time.
b.In the Duration section, indicate the duration of the blackout.
c.To repeat the blackout periodically, in the Repeating section, select a repeat frequency from the Repeat list. Otherwise, use the default value of Do Not Repeat.
11.Click Next.
The review page appears.
Review what you have entered. You can click Back to change a setting.
12.Click Finish.
The Confirmation heading appears on the Blackouts page, and the new blackout period is shown in the list.
See Also:
•“About Alerts”
Setting Preferred Credentials
When you set preferred credentials, Database Control automatically fills in host computer and database login credentials for you at times when it usually prompts for these credentials. Database Control also fills in these credentials when it is about to run a job that requires credentials.
To set preferred credentials for the database:
1.From any Database Control page, at the top of the page, click Preferences.
The Preferences page appears.
2.Click Preferred Credentials in the left-hand pane.
The Preferred Credentials page appears, showing a table of targets.
Description of em_pref_credentials.gif follows
Description of the illustration em_pref_credentials.gif
3.In the table row for the Database Instance, click the icon under Set Credentials.
The Database Preferred Credentials page appears.
4.Enter the following credentials:
◦Database credentials for Username/Password and SYSDBA Username/SYSDBA Password
◦Host credentials for Host Username/Host Password
For example, you might typically connect as the user SYSTEM, use the SYS account for SYSDBA access, and use oracle for the host user name.
Note:
The host user may require certain host privileges to run background jobs such as database backups. For example, on UNIX and Linux, the host user must belong to the OSDBA group (typically dba). On Windows, the host user must be a member of the Administrators group and must be granted the Log on as batch job logon right. See your platform documentation for more information.
5.Click Test to test your credentials.
A confirmation message is displayed if your credentials can be verified.
6.Click Apply to apply the changes.
Administering the Database with SQL-Based Management Tools
In addition to using the graphical user interface (GUI) pages presented in Database Control, you can use other Oracle tools such as SQL Developer and SQL*Plus to administer your database. These tools enable you to perform database management operations, and to query, insert, update, or delete data directly in the database.
The following sections provide details:
•About SQL
•About SQL*Plus
•Starting SQL*Plus and Connecting to the Database
•About SQL Developer
See Also:
•Oracle Database 2 Day Developer’s Guide
•Oracle Database SQL Language Reference
About SQL
To perform many of its operations, Oracle Enterprise Manager Database Control (Database Control) submits structured query language (SQL) statements to the database. SQL (pronounced like sequel) is an industry-standard English-like computer programming language for querying and updating databases.
The following is an example of a SQL query that lists information about countries in a countries table, which is owned by user hr:
SELECT COUNTRY_ID, COUNTRY_NAME FROM HR.COUNTRIES;
SQL is a powerful language that can also be used to perform a variety of database administration tasks. The following SQL statement creates the database user nick and assigns him a password of your choosing, represented by password:
CREATE USER nick IDENTIFIED BY password;
When performing an administrative task in Database Control, you can click Show SQL to see the SQL statements that Database Control generates and submits.
About SQL*Plus
SQLPlus is a command-line program that you use to submit SQL and PL/SQL statements to an Oracle database. You can submit statements interactively or as SQLPlus scripts. SQL*Plus is installed with the database and is located in your ORACLE_HOME/bin directory.
You can start SQL*Plus from the command line, or on Microsoft Windows, from the Start menu.
When SQL*Plus loads, it issues the SQL prompt, which looks like this:
SQL>
At the SQL prompt, you can enter statements that perform administrative tasks such as shutting down the database or creating a new user, or you can query, insert, update, and delete data.
You can enter a single SQL statement on multiple lines. You must end each statement with a semicolon (?. For most statements, you can rerun a statement by entering a slash (/) on a line by itself.
See Also:
•SQL*Plus User’s Guide and Reference
•Oracle Database Concepts
Starting SQL*Plus and Connecting to the Database
The section describes how to start SQL*Plus and connect to the database from both the command line and the Windows start menu.
For a new installation, you connect to the database using either the SYS or SYSTEM database accounts. When you enter SYS or a slash (/) as the user name and provide the AS SYSDBA clause, your access is authenticated using operating system authentication. Operating system authentication uses your Windows, UNIX, or Linux host user account to authenticate you to Oracle Database. You must have logged in to the host computer with a user account that is a member of a special host user group. On UNIX and Linux, this user group is typically dba. This type of authentication enables you to connect to an Oracle database that is not yet started, so that you can start it up. See Oracle Database Administrator’s Guide for more information.
The following procedures show how to log in to the database as user SYS using the SYSDBA privilege.
To start SQL*Plus and connect to the database from the command line:
1.Open a command window.
2.Configure the operating system environment variables, as described in “Configuring the Operating System Environment Variables”.
3.Start SQL*plus using a command in the following format:
sqlplus {username | /} [as sysdba]
An example of this command is the following:
$ sqlplus / AS SYSDBA
Enter password: password
For username, you can use the SYS or SYSTEM administrative users. At the prompt, enter the password that you set up during installation. If you use the SYS user, you must include AS SYSDBA after the username.
SQL*Plus connects you to the default database instance (Microsoft Windows) or the database instance specified by environment variables (Linux and UNIX).
To start SQL*Plus and connect to the database from the Windows Start menu:
1.Configure the operating system environment variables, as described in “Configuring the Operating System Environment Variables”.
2.Click Start, select Programs (or All Programs), then Oracle - HOME_NAME, then Application Development, and then SQL*Plus.
3.When prompted, enter the user name and password for the account to use to connect to the database.
For the user name, you can use the SYS or SYSTEM administrative accounts, and you can use the password that you set up during installation.
If you use SYS or / as the user name, follow them with a space and then the clause AS SYSDBA, as shown in the following examples:
Enter user-name: SYS AS SYSDBA
Enter password: password
or
Enter user-name: / AS SYSDBA
See Also:
•“Connecting to an Oracle Database from a Client Computer”
•“About Administrative Accounts and Privileges”
•Oracle Database Administrator’s Guide
•SQL*Plus User’s Guide and Reference
•Oracle Database SQL Language Reference
About SQL Developer
SQL Developer provides another GUI for accessing your Oracle database. SQL Developer supports development in both the SQL and PL/SQL languages. It is available in the default installation of Oracle Database.
With SQL Developer, you can browse database objects, run SQL statements and SQL scripts, and edit and debug PL/SQL statements. You can also run any number of provided reports, also create and save your own.
You can download SQL Developer from the Oracle Technology Network (OTN) Web site.
See Also:
•Oracle Database 2 Day Developer’s Guide for instructions for starting SQL Developer
•Oracle Database Concepts
Getting Started with Oracle Enterprise Manager: Oracle By Example Series
Oracle By Example (OBE) has a series on the Oracle Database 2 Day DBA guide. This OBE steps you through the tasks in this chapter and includes annotated screenshots.
To view the Getting Started with Oracle Enterprise Manager OBE, in your browser, enter the following URL:
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/2day_dba/gettingstarted/gettingstarted.htm
After installing Oracle Database, you have a fully functional database with a client/server network environment that has been minimally configured.
在安装Oracle数据库之后,您就拥有了一个功能齐全的数据库,其中客户机/服务器网络环境的配置最少。
This chapter contains the following sections to help you completely configure your client/server network:
本章包含以下部分,以帮助您完全配置客户机/服务器网络:
•Understanding Network Configuration
了解网络配置
•Viewing Listener Configuration
查看侦听器配置
•Starting and Stopping the Listener
启动和停止侦听器
•Connecting to an Oracle Database from a Client Computer
从客户机连接到Oracle数据库
•Networking: Oracle By Example Series
网络:Oracle by Example系列
Understanding Network Configuration
了解网络配置
A client is any application that connects to Oracle Database to send or retrieve data. An Oracle Database client application can reside on any computer that has Oracle Database client software installed.
客户机是连接到Oracle数据库以发送或检索数据的任何应用程序。Oracle数据库客户端应用程序可以驻留在安装了Oracle数据库客户端软件的任何计算机上。
Oracle Net is a software layer that resides on the client computer and on the Oracle Database host computer. It establishes and maintains the connection between the client application and the database over a network, and exchanges messages between them using industry standard protocols.
Oracle NET是驻留在客户机和Oracle数据库主机上的软件层。它通过网络建立和维护客户机应用程序和数据库之间的连接,并使用行业标准协议在它们之间交换消息。
For a client application and a database to communicate, the client application must be able to identify the database it wants to connect to, and the database must provide an identification. You can use a service name to connect to a database. A service name is a logical representation of a database, which is the way a database is presented to clients. A single database can be presented as multiple services.
为了让客户机应用程序和数据库进行通信,客户机应用程序必须能够标识要连接到的数据库,并且数据库必须提供标识。可以使用服务名称连接到数据库。服务名是数据库的逻辑表示,它是向客户机显示数据库的方式。单个数据库可以表示为多个服务。
Service names can provide location transparency so that the client application does not have to know the server’s location. If the database is moved to another location, then you must reconfigure only Oracle Net. No changes are necessary to client applications.
服务名可以提供位置透明性,这样客户端应用程序就不必知道服务器的位置。如果将数据库移动到另一个位置,则只能重新配置Oracle NET。客户端应用程序不需要更改。
This section contains these topics:
本节包含以下主题:
•Oracle Net Listener Configuration
Oracle网络侦听器配置
•Client Connections
客户端连接
•Tools for Network Configuration
网络配置工具
Oracle Net Listener Configuration
Oracle网络侦听器配置
On the database host, the Oracle Net listener (the listener), is a process that listens for client connection requests. It receives incoming client connection requests and manages the traffic of these requests to the database server.
在数据库主机上,Oracle NET侦听器(侦听器)是一个侦听客户机连接请求的进程。它接收传入的客户机连接请求,并管理这些请求到数据库服务器的流量。
The default listener configuration file is called listener.ora, and it is located in the network/admin subdirectory of the Oracle home directory. For example, if your Oracle home directory is /u01/app/oracle/product/11.2.0/dbhome_1, then the listener.ora file is created by default in the /u01/app/oracle/product/11.2.0/dbhome_1/network/admin directory.
默认的侦听器配置文件称为listener.ora,它位于Oracle主目录的network/admin子目录中。例如,如果您的Oracle主目录是/u01/app/oracle/product/11.2.0/dbhome_1,则默认情况下会在/u01/app/oracle/product/11.2.0/dbhome_1/network/admin目录中创建listener.ora文件。
The file contains a protocol address that identifies the database. This address defines the protocol the listener is listening on and any other protocol-specific information. For example, the listener could be configured to listen at the following protocol address:
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=dbhost.example.com) (PORT=1521)))
文件包含一个协议地址,用于标识数据库。此地址定义侦听器正在侦听的协议和任何其他协议特定信息。例如,可以将侦听器配置为侦听以下协议地址:
(DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=dbhost.example.com) (PORT=1521)))
This example shows a TCP/IP protocol address that specifies the host computer of the listener and a port number. The listener can listen for connection requests on network interfaces with either IP version 4 (IPv4) or IP version 6 (IPv6) addresses.
此示例显示指定侦听器主机和端口号的TCP/IP协议地址。侦听器可以在IP版本4(IPv4)或IP版本6(IPv6)地址的网络接口上侦听连接请求。
The listener.ora file is automatically configured during installation, but you can reconfigure it with Oracle Enterprise Manager Database Control.
安装期间会自动配置listener.ora文件,但您可以使用Oracle Enterprise Manager数据库控件重新配置该文件。
Because the configuration parameters have default values, you can start and use a listener without configuring it. This default listener is named LISTENER, supports no service names on startup, and listens on the following TCP/IP protocol address:
(ADDRESS=(PROTOCOL=tcp)(HOST=host_name)(PORT=1521))
由于配置参数具有默认值,因此可以启动和使用侦听器而不进行配置。此默认侦听器名为listener,启动时不支持服务名称,并侦听以下TCP/IP协议地址:
(地址=(协议=TCP)(主机=主机名)(端口=1521))
An Oracle database registers with the listener within a minute or so of starting up. The service names, or the databases that they represent, to which the listener forwards client requests, can be configured in the listener.ora file. This information can also be dynamically registered with the listener. Dynamic registration of services and databases with the listener is called service registration.
Oracle数据库在启动后一分钟左右向侦听器注册。可以在listener.ora文件中配置侦听器将客户端请求转发到的服务名或它们所代表的数据库。这些信息也可以动态注册到侦听器中。向侦听器动态注册服务和数据库称为服务注册。
Service registration is performed by the process monitor (PMON) process—an instance background process—of each database instance. Dynamic service registration does not require modification of the listener.ora file.
服务注册由进程监视器(PMON)处理每个数据库实例的实例后台进程来执行。动态服务注册不需要修改listener.ora文件。
See Also:
•Oracle Database Concepts for more information about listeners and service names
•Oracle Database Net Services Administrator’s Guide for more information about configuring listeners
•“Viewing Listener Configuration”
•“Starting and Stopping the Listener”
•“About Background Processes” for more information about database processes
Client Connections
The following sections describe the elements involved in client connections to the database:
•Connect Descriptors
•Connection Requests
•Naming Methods
Connect Descriptors
The client uses a connect descriptor to specify the database to which it wants to connect. This connect descriptor contains a protocol and a database service name. A database can have multiple service names defined, so a specific service name must be specified for the connect descriptor. In a preconfigured database, there is only one service name, which defaults to the global database name.
客户端使用连接描述符指定要连接到的数据库。这个连接描述符包含一个协议和一个数据库服务名。数据库可以定义多个服务名,因此必须为连接描述符指定特定的服务名。在预配置的数据库中,只有一个服务名,默认为全局数据库名。
The following example shows a connect descriptor that enables clients to connect to a database with service name mydb.us.example.com:
DESCRIPTION=
(ADDRESS=(PROTOCOL=tcp)(HOST=my-server) PORT=1521))
(CONNECT_DATA=
(SERVICE_NAME=mydb.us.example.com))
Connection Requests
Users initiate a connection request by providing a connect string. A connect string includes a user name and password, and a connect identifier. This connect identifier can be the connect descriptor itself, or a name that resolves to the connect descriptor using mapping information stored in one or more repositories accessed with the naming methods described in “Naming Methods”. This name is referred to as a net service name.
用户通过提供连接字符串来启动连接请求。连接字符串包括用户名和密码以及连接标识符。此连接标识符可以是连接描述符本身,也可以是使用存储在一个或多个存储库中的映射信息解析为连接描述符的名称,这些存储库使用“命名方法”中描述的命名方法进行访问。此名称称为网络服务名称
Naming Methods
A naming method is a resolution method used by a client application to resolve a connect identifier to a connect descriptor when attempting to connect to a database service.
命名方法是客户端应用程序在尝试连接到数据库服务时用于将连接标识符解析为连接描述符的解析方法。
Oracle Net provides support for the following naming methods:
•Easy Connect Naming
The easy connect naming method enables clients to connect to an Oracle database by using only a TCP/IP connect string consisting of a host name and service name. The easy connect naming method requires no configuration. See “Connecting to an Oracle Database from a Client Computer” for an example of easy connect naming.
Easy Connect命名方法允许客户端仅使用由主机名和服务名组成的TCP/IP连接字符串连接到Oracle数据库。轻松连接命名方法不需要配置。请参见“从客户机连接到Oracle数据库”,以获取轻松连接命名的示例。
•Local Naming
The local naming method stores connect descriptors, identified by their net service names, in a client configuration file named tnsnames.ora. This file is located in the ORACLE_HOME/network/admin directory. When you create a database using Oracle Database Configuration Assistant (DBCA), local naming is configured automatically. You must then use the Net Configuration Assistant to create connect descriptors and their corresponding net service names.
本地命名方法在名为tnsnames.ora的客户机配置文件中存储由网络服务名称标识的连接描述符。此文件位于Oracle_home/network/admin目录中。使用Oracle数据库配置助手(DBCA)创建数据库时,将自动配置本地命名。然后,必须使用网络配置助手创建连接描述符及其相应的网络服务名称。
•Directory Naming
Directory naming resolves a database service, net service name, or net service alias to a connect descriptor stored in an LDAP-compliant directory server.
目录命名将数据库服务、网络服务名称或网络服务别名解析为存储在符合LDAP的目录服务器中的连接描述符。
See Also:
•Oracle Database Net Services Administrator’s Guide
•Oracle Database Administrator’s Guide for more information about database services
Tools for Network Configuration
Oracle Database enables you to manage your network configuration with the following tools:
Oracle数据库使您能够使用以下工具管理网络配置:
•Net Configuration Assistant
网络配置助手
•Oracle Enterprise Manager
Oracle 企业管理器
•Oracle Net Manager
Oracle 网络管理器
Net Configuration Assistant
网络管理助手
During a typical database installation, Net Configuration Assistant (NETCA) automatically configures a listener called LISTENER that has a TCP/IP listening protocol address for the database. If you do a custom installation, then NETCA prompts you to configure a listener name and protocol address of your choice.
在典型的数据库安装过程中,NET配置助手(netca)会自动配置一个名为listener的侦听器,该侦听器具有数据库的TCP/IP侦听协议地址。如果您进行自定义安装,则netca会提示您配置所选的侦听器名称和协议地址。
Use NETCA for initial network configuration after database installation. Thereafter, you can use Oracle Enterprise Manager and Oracle Net Manager to configure and administer your networks.
在数据库安装以后你可以通过NETCA初始化一个网络配置,在这个之后你也可以用Oracle Enterprise Manager and Oracle Net Manager配置和管理你的网络
Oracle Enterprise Manager
Oracle Enterprise Manager enables you to manage your server-side network configuration with a Listener page. The Listener page displays information such as the current status, the Oracle home directory in which the listener configuration files are located, and the host name.
Oracle Enterprise Manager允许你管理你的服务器端的网络配置,在监听器配置页面展示了当前状态,oracle监听器配置文件主目录和主机名称
Oracle Net Manager
Oracle Net Manager provides the same features as Oracle Enterprise Manager with the addition of configuring profiles.
See Also:
•“Viewing Listener Configuration”
•Oracle Database Net Services Administrator’s Guide
Viewing Listener Configuration
The Oracle Net listener (the listener) runs on your database host and handles incoming client requests. With Oracle Enterprise Manager Database Control (Database Control), you can view the status of the listener, which is set to start automatically whenever your host is restarted. You can also view the listener status at the command line.
Oracle Net listener运行在你的服务器上管理着客户端的请求,用EM可以查看监听器的状态,你可以在命令行查看监听器的状态。
To view information about the listener with Database Control:
使用Database Control查看监听器信息
•On the Database Home page, under the heading General, click the Listener link.
在On the Database Home page,在标题头之下,点击监听器链接
The Listener page appears, displaying the following information about the listener:
这个监听器页面显示一下信息
◦Current status
当前状态
◦Availability over the last 24 hours
◦Alias
别名
◦Version
版本
◦Oracle home for the listener
oracle监听器目录
◦Net address
net地址
◦Configuration file (listener.ora) location
配置文件路径
◦Start time
开启时间
◦Host
主机
◦(Optional) Status of Oracle Restart
oracle重启的状态
To view information about the listener at the command line:
在命令行模式下查看监听器信息
1.Open a command window.
打听命令窗口
2.Follow the steps listed in “Configuring the Operating System Environment Variables”.
接下来的步骤在“配置操作系统环境变量”章节有列举
3.Enter the following command:然后输入一下命令
lsnrctl status
Starting and Stopping the Listener
开启和关闭监听器
The Oracle listener is set to start automatically whenever the host is restarted. However, when your system encounters unforeseen circumstances, or when you have manually stopped the listener, you can restart it with Database Control or at the command line.
oracle监听器被设置成主机重启以后自动启动,然后当你的操作系统 被强制断电了或者当你认为的停止了监听器,你可以用数据库控制器重启监听器
To stop the listener with Database Control:
使用数据库控制端停止监听器
1.On the Database Home page, under General, click the Listener link.
在数据库主页,下拉通用菜单,点击监听器链接
The Listener page appears.
监听器页面出现
2.Click Stop.点击停止
3.Enter the host credentials, if you did not configure Preferred Credentials, then click Login.
进入主机认证
4.On the Start/Stop Listener page, click OK to perform the specified action or Cancel to quit.
在启停监听器页面,点击ok启动或者取消退出
To start the listener with Database Control:
使用数据库控制端启动监听器
1.On the Database Home page, under the heading General, click the Listener link.
在数据库主页,下拉标题行通用菜单,点击监听器链接
The Listener page appears.
监听器页面出现
2.Click Start.
点击开始
3.On the Start/Stop Listener page, click OK.
在开始停止监听器页面,点击开始
After a couple of minutes, a confirmation message appears, indicating that the listener has been started.
几分钟以后,一个确认窗口出现,证明监听器已经启动成功
Note:
If you have just stopped the listener and are still at the Database Control Listener page, then you will not see a Start button. You must go to the Database Home page, wait a minute or two, and then return to the Listener page.
To start or stop the listener at the command line:
备注:加入你刚刚停止了监听器并且还停留在数据库控制端页面,然后你将看到一个开始按钮,你必须进入到数据库主页,等一到两分钟之后再返回到监听器页面,去启动中监听器
1.Open a command window.
打开命令行窗口
2.Follow the steps listed in “Configuring the Operating System Environment Variables”.
接下来的步骤在“配置操作系统环境变量”详细列举了
3.Enter either of the following commands, depending on whether you want to start or stop the listener:
或者输入一下任一命令,依赖于你想要开启还是停止监听器
lsnrctl start
lsnrctl stop
Connecting to an Oracle Database from a Client Computer
从一个客户端电脑连接到oracle数据库
This section describes how to use SQLPlus and the easy connect naming method to connect to an Oracle database from a client computer. SQLPlus is typically installed when you install Oracle Database client software. The easy connect naming method provides TCP/IP connectivity to databases without requiring you to configure Oracle Net Services.
You can use the instructions in this section to test your network configuration.
To connect to an Oracle database from a client computer using easy connect naming:
1.Complete the steps in “Configuring the Operating System Environment Variables”.
2.Do one of the following to start SQL*Plus:
◦(UNIX, Linux, or Windows systems) Open a command window and enter the following command:
sqlplus
◦(Windows systems only) Click Start, select Programs (or All Programs), then Oracle - HOME_NAME, then Application Development, and then SQL*Plus.
3.When prompted, enter the user name followed by an at sign (@) and a connect identifier, where the connect identifier has the following format:
“host[:port][/service_name][:server][/instance_name]”
The place holders used in the connect identifier format represent:
◦host — the name or IP address of the Oracle database host computer.
Both IPv4 and IPv6 addresses are supported. IPv6 addresses must be enclosed in square brackets. See Oracle Database Net Services Administrator’s Guide for information about IPv6 addressing.
◦port (optional) — the TCP port number on which the Oracle Net listener listens for connections.
If port is excluded, then the standard port number 1521 is assumed.
◦service_name — a database service name.
If no database service names are defined, then you can use the name of the default service that is created for the database. This service name consists of the global database name, which is made up of the DB_NAME and DB_DOMAIN initialization parameters as follows:
DB_NAME.DB_DOMAIN
If DB_DOMAIN is null, then the standard service name is just DB_NAME.
◦server — the type of service handler. Acceptable values are dedicated, shared, and pooled. If omitted, then the default type of server is chosen by the listener: shared server if configured, otherwise dedicated server.
◦instance_name — the instance to which to connect. When you specify only instance name, you connect to the default database service. If there is no default service configured in the listener.ora file, then an error is generated.You can obtain the instance name from the INSTANCE_NAME initialization parameter.
For example, to connect as user NICK to the database service orcl.example.com on the host dbhost.example.com, enter the following at the user name prompt:
nick@“dbhost.example.com/orcl.example.com”
The following examples substitute IPv4 and IPv6 addresses for the host name:
nick@“192.0.2.1/orcl.example.com”
nick@"[2001:0DB8:0:0::200C:417A]/orcl.example.com"
4.When prompted, enter the user password.
See Also:
•Oracle Database Administrator’s Guide for more examples of connecting with SQL*Plus and for a discussion of environment variables
•Oracle Database Net Services Administrator’s Guide for information about easy connect, connect identifiers, and other naming methods
•Oracle Database Net Services Reference for information about how to define the default service in listener.ora
•SQL*Plus User’s Guide and Reference
Networking: Oracle By Example Series
Oracle By Example (OBE) has a series on the Oracle Database 2 Day DBA guide. This OBE steps you through the tasks in this chapter and includes annotated screenshots.
To view the Networking OBE, enter the following URL in your browser:
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/2day_dba/network/network.htm
This chapter provides background information about the Oracle instance and instructions for managing the instance.
本章提供有关Oracle实例的背景信息和管理实例的说明
This chapter contains the following sections:
•Overview of the Oracle Instance and Instance Management
Oracle实例和实例管理概述
•Shutting Down and Starting Up the Oracle Instance
关闭并启动Oracle实例
•Viewing and Modifying Initialization Parameters
查看和修改初始化参数
•Managing Memory
管理内存
•Instances: Oracle By Example Series
Overview of the Oracle Instance and Instance Management
Oracle实例和实例管理概述
An Oracle database system consists of an Oracle database and an Oracle instance.
Oracle数据库系统由Oracle数据库和Oracle实例组成。
A database consists of a set of disk files that store user data and metadata. Metadata, or “data about the data,” consists of structural, configuration, and control information about the database.
数据库由一组存储用户数据和元数据的磁盘文件组成。元数据或“关于数据的数据”由关于数据库的结构、配置和控制信息组成。
An Oracle instance (also known as a database instance) contains the set of Oracle Database background processes that operate on the stored data and the shared allocated memory that those processes use to do their work.
Oracle实例(也称为数据库实例)包含一组Oracle数据库后台进程,这些后台进程对存储的数据进行操作,以及这些进程用于完成其工作的共享分配内存。
Each instance has an instance ID, also known as a system ID (SID). Because there can be multiple Oracle databases on a host computer, each with its own set of data files, you must identify the instance to which you want to connect. For a local connection, you identify the instance by setting operating system environment variables ORACLE_SID and ORACLE_HOME. For a remote connection, you identify the instance by specifying a network address and a database service name.
每个实例都有一个实例ID,也称为系统ID(SID)。因为主机上可以有多个Oracle数据库,每个数据库都有自己的数据文件集,所以必须标识要连接到的实例。对于本地连接,您可以通过设置操作系统环境变量oracle_sid和oracle_home来标识实例。对于远程连接,可以通过指定网络地址和数据库服务名称来标识实例。
An Oracle instance must be started to read and write information to the database. The Oracle instance creates the database upon receipt of instructions from the Oracle Database Configuration Assistant (DBCA) utility or the CREATE DATABASE SQL statement.
必须启动Oracle实例才能向数据库读写信息。Oracle实例在收到来自Oracle数据库配置助手(DBCA)实用程序或create database sql语句的指令后创建数据库。
When the Oracle instance is not available, your data is safe in the database, but it cannot be accessed by any user or application.
当Oracle实例不可用时,您的数据在数据库中是安全的,但任何用户或应用程序都无法访问它。
The properties of an Oracle instance are specified using instance initialization parameters. When the instance is started, an initialization parameter file is read, and the instance is configured accordingly.
使用实例初始化参数指定Oracle实例的属性。启动实例时,读取初始化参数文件,并相应配置实例。
This section presents some concepts of an Oracle instance and its management. It contains the following topics:
•About Initialization Parameters
关于初始化参数
•About Background Processes
关于后台进程
•About Server and Client Processes
关于服务器和客户端进程
•About Instance Memory Structure
关于实例内存结构
•About Instance Startup and Shutdown
关于实例启动和停止
See Also:
•Oracle Database Concepts for an overview of the Oracle database instance
About Initialization Parameters
关于初始化参数
Managing an Oracle instance includes configuring parameters that affect the basic operation of the Oracle instance. These parameters are called initialization parameters. The Oracle instance reads initialization parameters from a file at startup.
管理数据包括配置数据基本操作参数,这些参数被称作初始化参数,oracle在启动的时候从文件中读取初始化参数。
During installation, when you select a preconfigured database workload available in DBCA, the initialization parameters are optimized for typical use in the environment that you specified. As the number of database users increases and the workload increases, you might have to alter some initialization parameters. You can make these changes using the Initialization Parameter page in Database Control, or by using an advisor provided by Oracle Database, such as the Memory Advisor. See “Optimizing Memory Usage with the Memory Advisors” for more information.
在安装过程中,当您选择在DBCA中可用的预配置数据库工作负载时,初始化参数会针对您指定的环境中的典型使用进行优化。随着数据库用户数量的增加和工作负载的增加,您可能需要更改一些初始化参数。您可以使用数据库控件中的初始化参数页,或使用Oracle数据库提供的顾问(如内存顾问)进行这些更改。有关详细信息,请参阅“使用内存顾问优化内存使用”。
After being read from a file, initialization parameters are retained in memory, where the values for many of them can be changed dynamically. There are two types of parameter files. The type of file used to start the instance determines if dynamic initialization parameter changes persist across database shutdown and startup. The parameter file types are:
在从文件读取的时候,初始化参数是被保留在内存中,这样子一起值就可以动态的被修改。这个参数文件有两个类型,用于启动实例的文件类型确定动态初始化参数更改是否在数据库关闭和启动期间持续存在。
•Server parameter file
服务器参数文件
The server parameter file is the preferred form of initialization parameter file, and is a binary file that can be written to and read by the database. It must not be edited manually. It is stored on the host computer on which Oracle Database is running. Changes are made when you use Database Control to modify one or more initialization parameters, or when Oracle Database itself makes changes for self-tuning purposes. Any changes to it persist across database shutdown and startup operations.
服务器参数文件是首选的参数文件,他是一个二进制的文件只能被数据库读写,而不能被人为的编辑,他保存在oracle运行的主机上,当您使用数据库控件修改一个或多个初始化参数时,或者当Oracle数据库本身出于自我调优的目的进行更改时,就会进行更改。在数据库关闭和启动操作期间,对它所做的任何更改都将持续存在
Note:
When changing an initialization parameter in the server parameter file, you can also specify that the in-memory value be changed, so that your change is reflected immediately in the current instance. If you do not change the in-memory value, then the change does not take effect until you shut down and restart the database.
•Text initialization parameter file
A text initialization parameter file is a text file that can be read by the Oracle instance, but it is not written to by the instance. You can change a text initialization parameter file with a text editor, but changes do not take effect until you restart the Oracle instance. When you start the instance with this type of file, you can still change many initialization parameters dynamically with Database Control, but only for the current instance. Unless you also edit the text initialization parameter file and make the same change, the change is lost when you restart the database instance.
You can use SQL statements to create the following:
•A server parameter file from a text initialization file
•A server parameter file from the current (in-memory) values of all initialization parameters
•A text initialization parameter file from a server parameter file
When you create the database with DBCA, a server parameter file is created. This file is then used each time the database is started.
See Also:
•“Viewing and Modifying Initialization Parameters”
•Oracle Database Administrator’s Guide for information about the default name and location of the server parameter file, and for commands to create a server parameter file or text initialization parameter file
•Oracle Database Concepts for an overview of parameter files
About Background Processes
关于 后台进程
The background processes of the Oracle instance manage memory structures, asynchronously perform I/O to write data to a file on a disk, and perform general maintenance tasks. The background processes consolidate functions that would otherwise be handled by multiple Oracle Database programs running for each user process. They monitor other Oracle Database processes to provide increased parallelism for better performance and reliability.
Oracle实例的后台进程管理内存结构,异步执行I/O以将数据写入磁盘上的文件,并执行一般维护任务。后台进程合并了一些功能,否则将由为每个用户进程运行的多个Oracle数据库程序处理。它们监视其他Oracle数据库进程,以提高并行性,从而提高性能和可靠性。
The background processes that are present depend on the features that are being used in the database. Some fundamental background processes are described in Table 5-1.
Table 5-1 Oracle Database Background Processes
Background Process
Description
Database writer (DBWn)
The database writer writes modified blocks from the database buffer cache to the files on a disk. Oracle Database allows a maximum of 36 database writer processes.
数据库编写器将修改后的块从数据库缓冲区缓存写入磁盘上的文件。Oracle数据库最多允许36个数据库编写器进程。
Log writer (LGWR)
The log writer process writes redo log entries to disk. Redo log entries are generated in the redo log buffer of the System Global Area (SGA) and the log writer process writes the redo log entries sequentially into an online redo log file.
日志编写器进程将重做日志项写入磁盘。重做日志条目在系统全局区域(SGA)的重做日志缓冲区中生成,日志编写器进程将重做日志条目按顺序写入联机重做日志文件。
Checkpoint (CKPT)
At specific times, all modified database buffers in the SGA are written to the data files by a database writer process (DBWn). This event is called a checkpoint. The checkpoint process signals DBWn, updates the data files and control files of the database, and records the time of this update.
在特定的时间,SGA中所有修改过的数据库缓冲区都由数据库编写器进程(DBWN)写入数据文件。此事件称为检查点。检查点进程向dbwn发出信号,更新数据库的数据文件和控制文件,并记录此更新的时间。
System monitor (SMON)
The system monitor performs instance recovery when a failed instance is restarted.
系统监视器在重新启动失败的实例时执行实例恢复。
Process monitor (PMON)
The process monitor performs a recovery when a user process fails. It cleans up the cache and frees resources that the failed process was using.
当用户进程失败时,进程监视器执行恢复。它清理缓存并释放失败进程正在使用的资源。
Archiver (ARCn)
Archiver processes copy the online redo log files to archival storage when the log files are full or a log switch occurs. The database must be in archive log mode to run archive processes. For more information, see Chapter 9, “Performing Backup and Recovery”.
当日志文件已满或发生日志切换时,存档程序会将联机重做日志文件复制到存档存储中。数据库必须处于存档日志模式才能运行存档进程。有关更多信息,请参阅第9章“执行备份和恢复”。
Manageability monitor (MMON)
This process performs various management-related background tasks, for example:
•Issuing alerts whenever a given metric violates its threshold value
•Taking snapshots by spawning additional processes
•Capturing statistical values for SQL objects that have been recently modified
Job Queue Processes (CJQ0 and Jnnn)
Job queue processes run user jobs, often in batch mode. A job is a user-defined task scheduled to run one or more times.
See Also:
•Oracle Database Reference for a complete list of Oracle Database background processes
•Oracle Database Concepts for an overview of background processes
About Server and Client Processes
In addition to background processes, Oracle Database creates server processes that handle the connection requests of user or client processes. A user connection is composed of the following distinct pieces:
除了后台进程之外,Oracle数据库还创建服务器进程来处理用户进程或客户端进程的连接请求。用户连接由以下不同部分组成:
•A client program acting on behalf of the user, such as Oracle Enterprise Manager (Enterprise Manager), SQLPlus, or an application
代表用户的客户端程序,如Oracle Enterprise Manager(Enterprise Manager)、SQLPlus或应用程序
•A server process that handles the connection to the database on behalf of the client program, and that performs much of the work for the client program, such as parsing and running SQL statements, and retrieving and returning results to the client program
一种服务器进程,它代表客户机程序处理与数据库的连接,并为客户机程序执行许多工作,例如分析和运行SQL语句,以及检索和返回客户机程序的结果。
Server processes can be either dedicated or shared. When server processes are dedicated, Oracle Database is running in dedicated server mode. When server processes are shared, Oracle Database is running in shared server mode. In dedicated server mode, each client process has its own server process. Although a dedicated server process is good for long-running queries and administrative tasks, an idle process or too many dedicated processes can result in an inefficient use of resources.
服务器进程可以是专用的,也可以是共享的。当服务器进程专用时,Oracle数据库将以专用服务器模式运行。当共享服务器进程时,Oracle数据库将以共享服务器模式运行。在专用服务器模式下,每个客户机进程都有自己的服务器进程。尽管专用服务器进程适合长时间运行的查询和管理任务,但空闲进程或太多专用进程可能导致资源使用效率低下
Using shared server mode eliminates the need for a dedicated server process for each user connection, requires less memory for each user connection, and enables more users to access the database. Shared server mode is more efficient at supporting multiple client programs making frequent short-running queries.
使用共享服务器模式,无需为每个用户连接提供专用的服务器进程,每个用户连接所需的内存更少,并且允许更多用户访问数据库。共享服务器模式在支持多个客户端程序进行频繁的短时间运行查询方面更有效。
About Instance Memory Structure
关于实例内存结构
The sizes of the instance memory structures affect database performance and are controlled by initialization parameters.
实例内存结构的大小影响数据库性能,并由初始化参数控制。
Upon installation, you can let the database manage memory for you automatically, or you can choose to manually configure the instance memory structures. If you choose manual memory management, then Oracle Database provides advisors to help you determine appropriate values for memory parameters. For both manual and automatic memory management, Oracle Database sends alerts that identify memory sizing problems that require your attention.
安装后,您可以让数据库自动为您管理内存,也可以选择手动配置实例内存结构。如果您选择手动内存管理,那么Oracle数据库提供顾问来帮助您确定内存参数的适当值。对于手动和自动内存管理,Oracle数据库都会发送警报,以确定需要注意的内存大小问题。
The following sections describe the two important memory areas that you can monitor and size:
•System Global Area
•Program Global Area
See Also:
•“Managing Memory”
•Oracle Database Concepts for more information about Oracle Database memory architecture
System Global Area
系统全局区
The System Global Area (SGA) is a shared memory area that contains data and control information for the instance. Multiple users can share data within this memory area and avoid repeated, time-consuming access from a physical disk.
系统全局区域(SGA)是一个共享内存区域,其中包含实例的数据和控制信息。多个用户可以在此内存区域内共享数据,并避免从物理磁盘进行重复、耗时的访问
Table 5-2 lists the components of the SGA.
Table 5-2 SGA Components
Component
Description
Database buffer cache
Before data stored in the database can be queried or modified, it must be read from a disk and stored in the buffer cache. All user processes connected to the database share access to the buffer cache. For optimal performance, the buffer cache should be large enough to avoid frequent disk I/O operations.
在查询或修改数据库中存储的数据之前,必须从磁盘读取数据并将其存储在缓冲区缓存中。所有连接到数据库的用户进程共享对缓冲区缓存的访问权限。为了获得最佳性能,缓冲区缓存应该足够大,以避免频繁的磁盘I/O操作。
Shared pool
共享池
The shared pool caches information that is shared among users:
共享池缓存用户之间共享的信息
•SQL statements that can be reused
可以重用的SQL语句
•Information from the data dictionary such as user account data, table and index descriptions, and privileges
来自数据字典的信息,如用户帐户数据、表和索引描述以及权限
•Stored procedures, which are executable code that is stored in the database
存储过程,是存储在数据库中的可执行代码
Redo log buffer
This buffer improves performance by caching redo information until it can be written to the physical online redo log files stored on disk. Redo information and online redo log files are discussed in “About Online Redo Log Files”.
这个缓冲区通过缓存重做信息来提高性能,直到它可以写入存储在磁盘上的物理联机重做日志文件。“关于联机重做日志文件”中讨论了重做信息和联机重做日志文件。
Large pool
大池
This optional area is used to buffer large I/O requests for various server processes.
这块区域是用于大型的IO操作
Java pool
java池
The Java pool is an area of memory that is used for all session-specific Java code and data within the Java Virtual Machine (JVM).
Streams pool
The Streams pool is an area of memory that is used by the Oracle Streams feature. For more information about Oracle Streams, see Oracle Streams Concepts and Administration.
Result cache
The result cache buffers query results. If a query is run for which the results are stored in the result cache, then the database returns the query results from the result cache instead of rerunning the query. This SGA component speeds the execution of frequently run queries.
Program Global Area
A Program Global Area (PGA) is a memory area used by a single Oracle Database server process. When you connect to an Oracle database instance, you create a session that uses a server process for communication between the client and database instance. Each server process has its own PGA.
The PGA is used to process SQL statements and to hold logon and other session information. A large part of the PGA is dedicated to SQL work areas, which are working memory areas for sorts and other SQL operations.
The amount of PGA memory used and the contents of the PGA depend on whether the instance is running in dedicated server or shared server mode.
The total memory used by all individual PGAs is known as the total instance PGA memory, and the collection of individual PGAs is referred to as the total instance PGA, or just instance PGA. With Database Control, you set the size of the instance PGA, not individual PGAs.
About Instance Startup and Shutdown
After installation, the Oracle instance is started, and the database is open for access by users with database accounts. At some point, you may want to shut down and restart the instance. This section describes the startup and shutdown processes.
The phrases “starting up and shutting down the Oracle instance” are often used interchangeably with “starting up and shutting down the database.”
This section contains the following topics:
•About Administration Privileges for Startup and Shutdown
•About Instance Startup
•About Instance Shutdown
See Also:
•“Shutting Down and Starting Up the Oracle Instance”
•Oracle Database Concepts
About Administration Privileges for Startup and Shutdown
To start or shut down the Oracle instance, you must connect to the instance with a special connection privilege. There are two of these privileges: SYSDBA for fully empowered database administrators and SYSOPER for users who start and shut down the database, but have no privileges to access user objects.
When you create an Oracle database, there are two primary administrative user accounts that are automatically created: SYS and SYSTEM. Both of these users have full database administration privileges, but initially, only user SYS or SYSTEM can connect with the SYSOPER privilege. Therefore, until you grant the SYSOPER privilege to other users, you must connect to the Oracle instance as user SYS or SYSTEM to start and shut down the instance. When connecting (logging in) as user SYS, you must always specify that you are connecting AS SYSDBA.
See Also:
•“About Administrative Accounts and Privileges” for more information about the SYS and SYSTEM users, and the SYSDBA privilege
About Instance Startup
When you start the Oracle instance, you typically start it such that the state of the database is OPEN and ready for user connections. However, there are situations in which you may want to start the instance with the database in the MOUNTED state, but not open. An instance can also be started without the database either mounted or open. Thus, there are three stages to starting an instance:
1.You start the instance using one of the following methods:
◦Using Oracle Enterprise Manager. See “Shutting Down and Starting Up the Oracle Instance”.
◦Using the SQL*Plus STARTUP command. See Oracle Database Administrator’s Guide.
◦On Microsoft Windows, using the Services program in Control Panel to start the Oracle Database services. See “Shutting Down and Starting Up Using the Windows Services Program”.
The instance reads the initialization parameter file, allocates SGA memory, and starts the background processes.
2.If you mount the database, then the Oracle instance opens the control file for the database, but does not open the data files. The database is now considered to be in the MOUNT state. This state enables you to perform certain administrative functions that cannot be performed when other users are accessing the database. An example of such a function is enabling or disabling the archiving of online redo log files. See “About Archived Redo Log Files” for information about online redo log file archiving.
3.If you open the database, then, after reading the parameter file and control file, the online redo log files and data files for the database are also opened. The state of the database is now OPEN and user access to the data is available.
The default startup mode for the database (OPEN) completes the three stages in sequence. Unless you explicitly specify otherwise, the instance is started, the database is mounted, and then the database is opened.
About Instance Shutdown
关于实例关闭
Instance shutdown is the reverse of instance startup. When you shut down the Oracle instance, the default mode is a NORMAL shutdown, which means users are not allowed to create new connections to the database, but the shutdown process waits for all currently connected users to exit their sessions. After all the users have disconnected, then the committed transactions are written to disk, the database files are closed, and the instance is stopped. However, there are situations in which you may not want to wait for users to disconnect on their own (IMMEDIATE mode), or you want to let the current transactions for each user complete before they are disconnected (TRANSACTIONAL mode). In emergency situations you can even shut down the database without waiting for the committed transactions to be written to disk (ABORT mode).
实例关闭与实例启动相反。关闭Oracle实例时,默认模式为正常关闭,这意味着不允许用户创建到数据库的新连接,但关闭过程等待所有当前连接的用户退出其会话。断开所有用户的连接后,提交的事务将写入磁盘,数据库文件将关闭,实例将停止。但是,在某些情况下,您可能不希望等待用户自行断开连接(立即模式),或者希望让每个用户的当前事务在断开连接之前完成(事务模式)。在紧急情况下,您甚至可以在不等待提交的事务写入磁盘的情况下关闭数据库(中止模式)
Shutting down an instance goes through the following stages:
1.After all the users have exited from their sessions, or been disconnected, Oracle Database writes data in the SGA to the data files and online redo log files. A checkpoint is performed on the data files and their headers are marked current as of the time of the instance shutdown. The data files and online redo log files are then closed and the state of the database is changed to CLOSED. The control file remains open to the instance.
在所有用户退出会话或断开连接后,Oracle数据库将SGA中的数据写入数据文件和联机重做日志文件。对数据文件执行检查点,并在实例关闭时将其头标记为当前。然后关闭数据文件和联机重做日志文件,并将数据库状态更改为关闭。控制文件对实例保持打开状态
2.The Oracle instance dismounts the database and updates relevant entries in the control file to record a clean shutdown. The control file is closed. The database is now closed and dismounted. The instance is in the NOMOUNT state.
Oracle实例卸除数据库并更新控制文件中的相关条目以记录干净的关闭。控制文件已关闭。数据库现在已关闭并卸载。实例处于nomount状态
3.The Oracle instance stops the background processes and deallocates the shared memory used by the SGA.
If a SHUTDOWN ABORT or abnormal termination occurs, then the instance of an open database closes and shuts down the database instantaneously. Oracle Database does not write data in the buffers of the SGA to the data files and redo log files. The subsequent reopening of the database requires instance recovery, which Oracle Database performs automatically.
如果出现关闭中止或异常终止,则打开的数据库实例将立即关闭并关闭数据库。Oracle数据库不会将SGA缓冲区中的数据写入数据文件和重做日志文件。随后重新打开数据库需要实例恢复,Oracle数据库将自动执行该恢复。
Shutting Down and Starting Up the Oracle Instance
关闭和启动数据库实例
This section provides instructions about two methods you can use to start or shut down the Oracle instance:
•Shutting Down and Starting Up Using Oracle Enterprise Manager Database Control
•Shutting Down and Starting Up Using the Windows Services Program
See Also:
•“About Instance Startup and Shutdown”
Shutting Down and Starting Up Using Oracle Enterprise Manager Database Control
You can shut down and start the Oracle instance from the Database Home page of Oracle Enterprise Manager Database Control (Database Control).
To shut down and start the Oracle instance using Database Control:
1.Go to the Database Home page.
See “Accessing the Database Home Page”.
2.In the General section of the Database Home page, click Shutdown.
Description of hp-shutdown-r2.gif follows
Description of the illustration hp-shutdown-r2.gif
The Startup/Shutdown Credentials page appears.
Description of shutdown_credentials.gif follows
Description of the illustration shutdown_credentials.gif
3.Enter credentials as follows:
a.Enter the host computer credentials of the user who installed Oracle Database, or of any user who is authorized to use SQL*Plus.
b.Enter the database credentials consisting of the user name SYS and the password that you assigned to SYS during the installation.
c.In the Connect As list, choose the value SYSOPER.
4.(Optional) Select the Save as Preferred Credential option if you want these credentials to be automatically filled in for you the next time that this page appears.
5.Click OK.
A confirmation page appears.
6.Click Yes to start the SHUTDOWN IMMEDIATE operation on the database.
The Startup/Shutdown: Activity Information page appears, informing you that the database is being shut down.
7.After a short period (approximately 2 minutes), click Refresh to be returned to the Database Home page.
The Database Home page indicates that the database instance status is Down.
Description of database_down.gif follows
Description of the illustration database_down.gif
8.Click Startup to start the database.
The Startup/Shutdown Credential page appears again.
9.Enter the credentials, and then click OK.
A confirmation page appears.
10.Click Yes.
The Startup page appears, indicating that the database is being started up. When startup is complete, the Login page appears.
11.Log in to the database (and to Database Control).
The Database Home page appears indicating that the database instance status is Up.
Shutting Down and Starting Up Using the Windows Services Program
On Microsoft Windows, you can also start and shut down your Oracle database using the Services program in Control Panel. You must start or stop the following services:
•OracleServiceSID, which is your Oracle instance.
•OracleORACLE_HOMETNSListener, which is your listener. The listener is required for clients to connect to your database.
•OracleDBConsoleSID, which enables clients to connect to Database Control.
In the preceding service names, SID refers to the system identifier for the instance and ORACLE_HOME refers to the Oracle home name.
To start or stop Oracle Database services:
1.Do one of the following:
◦On Windows XP and Windows Server 2003, click Start, and then select Control Panel.
◦On Windows 2000 Server, click Start, select Settings, and then select Control Panel.
The Control Panel window opens.
2.Double-click the Administrative Tools icon, and then double-click the Services icon.
The Services window opens, displaying all Windows services that are available on your system.
3.Locate the Oracle Database services listed at the beginning of this section. For example, if your SID is orcl, then locate the following services:
◦OracleServiceORCL
◦OracleOraDb11g_home1TNSListener
◦OracleDBConsoleorcl
4.Start or stop all three services, using the following steps for each service:
a.Select the service name.
b.In the Action menu, click Start or Stop.
Viewing and Modifying Initialization Parameters
This section provides instructions about viewing the initialization parameter settings for your database and modifying these parameters. You can modify the initialization parameters for the database in one of three ways:
•Until the instance is shut down: The new values for the initialization parameters are applied to the currently running instance, but, when the database is restarted, the initialization parameter values revert to their previous settings.
•From now until the initialization parameter is changed again: The changes are applied to the currently running instance and are also stored in the server parameter file. The changes made to the initialization parameters persist when the database is restarted.
•When the database is restarted: The new values for the initialization parameters are recorded in server parameter file, but are not applied to the currently running instance. The changes take effect only when the database is restarted.
Note:
These three scenarios correspond to using the SCOPE=MEMORY, SCOPE=BOTH, and SCOPE=SPFILE clauses of the ALTER SYSTEM SQL statement, respectively, when you use the ALTER SYSTEM statement to change initialization parameters.
To view or modify initialization parameters:
1.At the top of the Database Home page, click Server to view the Server subpage.
2.Under Database Configuration, click Initialization Parameters.
Oracle Enterprise Manager Database Control (Database Control) displays the Initialization Parameters page.
Description of init_params.gif follows
Description of the illustration init_params.gif
The Initialization Parameters page has two subpages:
◦Current—This subpage (the default) displays all initialization parameter values that are currently active (in memory) for the Oracle instance.
◦SPFile—This subpage displays initialization parameter settings in the server parameter file. This subpage is present only when the current instance started up with a server parameter file. The file location is displayed at the top of the subpage.
See the online Help for the Initialization Parameters page for field descriptions.
3.(Optional) On either subpage, reduce the number of initialization parameters displayed by doing one or both of the following, and then clicking Go:
◦In the Name field, enter text.
◦Select from one or more of the lists next to the Name field.
For example, to view only initialization parameters that have the text DEST anywhere in the parameter name, enter dest in the Name field, and then click Go.
4.To modify one or more initialization parameters for the currently running instance only, with the modifications being lost when the instance is restarted, complete the following steps:
a.On the Current subpage, in the Value column, enter new values for the initialization parameters.
Note:
If the Value column cannot be written to for a particular initialization parameter, then it means that this parameter is not dynamic—that is, it cannot be changed for the current instance.
b.Ensure that Apply changes in current running instance(s) mode to SPFile is not selected.
c.(Optional) In the Comments column, enter text explaining the reasons for the changes.
d.Click Apply.
A confirmation message appears.
5.To modify initialization parameters for the currently running instance, and also record the modifications in the server parameter file that will persist when the database is restarted, complete the following steps:
a.On the Current subpage, in the Value column, enter new values for the initialization parameters.
b.Select Apply changes in current running instance(s) mode to SPFile.
c.(Optional) In the Comments column, enter text explaining the reasons for the changes.
d.Click Apply.
A confirmation message appears.
6.To modify initialization parameters in the server parameter file only, such that the current instance is not affected and changes take effect only when the database is next restarted, complete the following steps:
a.Click SPFile to view the SPFile subpage.
b.(Optional) Reduce the number of entries in the initialization parameter list as described in Step 3.
c.In the Value column, enter new values for the initialization parameters.
d.(Optional) In the Comments column, enter text explaining the reasons for the changes.
e.Click Apply.
A confirmation message appears.
Note:
Changes to initialization parameters are recorded in the alert log as ALTER SYSTEM statements. See Oracle Database Administrator’s Guide for information about the alert log.
See Also:
•“About Initialization Parameters”
Managing Memory
This section provides background information about managing memory for the Oracle instance, and includes instructions about how to adjust the memory allocation for the Oracle instance. It contains the following topics:
•About Memory Management
•Enabling Automatic Memory Management
•Modifying Memory Settings – Automatic Memory Management
•Modifying Memory Settings – Automatic Shared Memory Management
•Modifying Memory Settings – Automatic PGA Memory Management
See Also:
•“About Instance Memory Structure”
About Memory Management
Memory management involves maintaining optimal sizes for the Oracle instance memory structures as demands on the database change. The memory that must be managed is the System Global Area (SGA) memory and the instance Program Global Area (PGA) memory. The instance PGA memory is the collection of memory allocations for all individual PGAs.
内存管理涉及到根据对数据库的需求变化保持Oracle实例内存结构的最佳大小。必须管理的内存是系统全局区域(SGA)内存和实例程序全局区域(PGA)内存。实例PGA内存是所有单个PGA的内存分配集合。
Beginning with Oracle Database 11g release 1 (11.1), you can let the database manage the SGA memory and instance PGA memory completely. You designate only the total memory size to be used by the instance, and Oracle Database dynamically exchanges memory between the SGA and the instance PGA as needed to meet processing demands. This capability is referred to as automatic memory management. In this memory management mode, the database also dynamically tunes the sizes of the individual SGA components and the sizes of the individual PGAs.
从Oracle数据库11g版本1(11.1)开始,您可以让数据库完全管理SGA内存和实例PGA内存。您只指定实例使用的总内存大小,Oracle数据库根据需要在SGA和实例PGA之间动态交换内存,以满足处理需求。此功能称为自动内存管理。在这种内存管理模式中,数据库还动态地调整单个SGA组件的大小和单个PGA的大小。
To have more direct control over the sizes of the SGA and instance PGA, use the Memory Advisors page of Database Control to disable automatic memory management and enable automatic shared memory management.
要更直接地控制SGA和实例PGA的大小,请使用数据库控件的内存顾问页禁用自动内存管理并启用自动共享内存管理
•With automatic shared memory management, you set target and maximum sizes for the SGA. Oracle Database then tunes the total size of the SGA to your designated target, and dynamically tunes the sizes of all SGA components.
使用自动共享内存管理,可以为SGA设置目标和最大大小。然后,Oracle数据库将SGA的总大小调到指定的目标,并动态地调优所有SGA组件的大小。
•When you enable automatic shared memory management, you also implicitly enable automatic PGA memory management. With automatic PGA memory management, you set a target size for the instance PGA. The database then tunes the size of the instance PGA to your target, and dynamically tunes the sizes of individual PGAs.
启用自动共享内存管理时,还隐式启用自动PGA内存管理。使用自动PGA内存管理,可以为实例PGA设置目标大小。然后,数据库将实例PGA的大小调到目标,并动态地调优各个PGA的大小。
If you want complete control of individual SGA component sizes, then use the Memory Advisors page of Database Control to disable both automatic memory management and automatic shared memory management. This is called manual shared memory management. In this mode, you set the sizes of several individual SGA components, thereby determining the overall SGA size. You then manually tune these individual SGA components on an ongoing basis.
如果要完全控制单个SGA组件的大小,请使用数据库控件的内存顾问页禁用自动内存管理和自动共享内存管理。这称为手动共享内存管理。在这种模式下,您可以设置几个单独的SGA组件的大小,从而确定SGA的总体大小。然后继续手动调整这些单独的SGA组件。
Manual shared memory management mode is intended for experienced DBAs only. Note that in this mode, automatic PGA memory management remains enabled.
手动共享内存管理模式仅适用于经验丰富的DBA。请注意,在此模式下,自动PGA内存管理仍处于启用状态。
Note:
Although it is possible to disable automatic PGA memory management, it is not recommended, and cannot be done using the Memory Advisors page of Database Control.
Table 5-3 summarizes the various memory management modes that you can set using the Memory Advisors page of Database Control.
Table 5-3 Oracle Database Memory Management Modes
Memory Management Mode
You Set
Oracle Database Automatically Tunes
Automatic memory management
•Total memory size for this instance
•(Optional) Maximum memory size for this instance
•Total SGA size
•SGA component sizes
•Instance PGA size
•Individual PGA sizes
Automatic shared memory management and automatic PGA memory management
(Automatic memory management disabled)
•SGA target size
•(Optional) SGA maximum size
•Instance PGA target size
•SGA component sizes
•Individual PGA sizes
Manual shared memory management and automatic PGA memory management
(Automatic memory management and automatic shared memory management disabled)
•Shared pool size
•Buffer cache size
•Java pool size
•Large pool size
•Instance PGA target size
•Individual PGA sizes
Note:
Automatic Memory Management is not available on all platforms. See Oracle Database Administrator’s Guide for more information about supported platforms.
If you choose the basic installation option when you install the database, then automatic memory management is enabled. If you choose advanced installation, then DBCA enables you to select from the three memory management modes. Oracle recommends that you enable automatic memory management.
Whichever memory management mode you choose, you may have occasion to adjust memory settings as demands on the database or on its host computer change. Reasons why you adjust memory settings include the following:
•You receive a memory-related alert or error message.
•You receive a memory-related recommendation from Automatic Database Diagnostic Monitor (ADDM).
•You want to change the amount of memory allocated to accommodate future growth in memory demand.
You can use a memory advisor to help you adjust memory sizes. See “Modifying Memory Settings – Automatic Shared Memory Management” for an example of using a memory advisor.
See Also:
•“Enabling Automatic Memory Management”
•“Modifying Memory Settings – Automatic Memory Management”
•“Modifying Memory Settings – Automatic PGA Memory Management”
Enabling Automatic Memory Management
If you did not enable automatic memory management when you installed and configured your database, then Oracle recommends that you do so after installation, unless you are an experienced DBA with specific reasons to manually tune memory sizes. With automatic memory management, the Oracle instance dynamically tunes all memory components to optimize performance as the workload changes.
To enable automatic memory management:
1.Go to the Database Home page, logging in as user SYS.
See “Accessing the Database Home Page”.
Note:
You must log in as user SYS to change the maximum memory size, which is a static initialization parameter.
2.At the top of the page, click Server.
The Server subpage appears.
3.In the Database Configuration section, click Memory Advisors.
The Memory Advisors page appears with the SGA subtab (in the middle of the page) displayed by default.
4.If the Maximum SGA Size field contains a positive number that is greater than or equal to the desired total amount of memory to allocate to the database, then skip to Step 10.
5.In the Maximum SGA Size (MB) field, enter the maximum permissible size for database memory.
Use the sum of the current sizes of the SGA and instance PGA as a guideline, and optionally add some room for growth.
6.Click Apply.
A confirmation page appears, indicating that you must restart the database.
7.Click Yes and follow the guided instructions to restart the database.
8.After you have initiated the database restart, wait a few minutes and then click Refresh.
The Database Home page appears.
9.Return to the Memory Advisors page.
You might need to log out and log back in to Enterprise Manager to get this page to display correctly after the database restart.
10.Next to Automatic Memory Management Disabled, click Enable.
The Enable Automatic Memory Management page appears.
11.In the field titled Total Memory Size for Automatic Memory Management, enter the desired amount of memory to allocate to the database, and then click OK.
A confirmation message appears.
See Also:
•“About Memory Management”
Modifying Memory Settings – Automatic Memory Management
Modifying memory settings for automatic memory management involves using the Memory Advisors page of Database Control to change the total memory size setting. The procedure for changing this setting differs depending on whether or not your desired new setting exceeds the current setting for maximum memory size. In either case, the steps involved require that you must first have enabled Automatic Memory Management. See “Enabling Automatic Memory Management”.
To modify total memory size (new value does not exceed maximum memory size):
1.Go to the Database Home page.
See “Accessing the Database Home Page”.
2.At the top of the page, click Server.
3.In the Database Configuration section, click Memory Advisors.
The Memory Advisors page appears.
Description of mem_param_auto.gif follows
Description of the illustration mem_param_auto.gif
4.Do one of the following:
◦In the Total Memory Size field, enter a new value that is less than or equal to the value in the current Maximum Memory Size field.
◦Click Advice to use the Memory Advisor to help you choose a new size.
The Memory Size Advice page appears.
Description of memory_size_advice.gif follows
Description of the illustration memory_size_advice.gif
5.If you chose to use the Memory Advisor, then click a point on the curve to change the total memory size. Otherwise, go to Step 7.
The new total memory size is displayed below the graph.
6.Continue clicking the curve until the desired value is displayed, then click OK.
You are returned to the Memory Advisors page.
7.Click Apply.
A confirmation message appears.
To modify total memory size (new value exceeds maximum memory size):
1.Go to the Database Home page, and log in as user SYS with the SYSDBA privilege.
See “Accessing the Database Home Page”.
Note:
You must log in as user SYS to change the maximum memory size, which is a static initialization parameter.
2.At the top of the page, click Server.
3.In the Database Configuration section, click Memory Advisors.
The Memory Advisors page appears.
4.In the Maximum Memory Size (MB) field, enter a new value for the maximum total memory to allocate to the database.
This value must be greater than or equal to the desired new value for total memory size.
5.Click Apply.
A confirmation page appears, indicating that you must restart the database.
6.Click Yes and follow the guided instructions to restart the database.
7.After you have initiated the database restart, wait a few minutes, then click Refresh.
The Database Home page appears.
8.Return to the Memory Advisors page.
9.Do one of the following:
◦In the Total Memory Size field, enter a new value that is less than or equal to the value in the current Maximum Memory Size field.
◦Click Advice to use the Memory Advisor to help you choose a new size.
The Memory Size Advice page appears.
10.If you chose to use the Memory Advisor, then click a point on the curve to change the total memory size. Otherwise, go to Step 12.
The new size is displayed below the graph.
11.Continue clicking the curve until the desired value is displayed, then click OK.
You are returned to the Memory Advisors page.
12.Click Apply.
A confirmation message appears.
See Also:
•Oracle Database Performance Tuning Guide for more information about memory parameters and their tuning
•“Optimizing Memory Usage with the Memory Advisors”
•“About Memory Management”
Modifying Memory Settings – Automatic Shared Memory Management
Modifying memory settings for automatic shared memory management involves using the Memory Advisors page of Database Control to change the total SGA size. This section assumes that automatic memory management is disabled, that automatic shared memory management is enabled, and that the desired new value for the total SGA size does not exceed the current value for maximum SGA size.
Note:
If you want a new total SGA size that exceeds the current value for maximum SGA size, then you must first log in as user SYS, change the maximum SGA size, and restart the database. See “To modify total memory size (new value exceeds maximum memory size):” for a similar procedure.
To modify the total SGA memory size:
1.Go to the Database Home page.
See “Accessing the Database Home Page”.
2.At the top of the page, click Server to view the Server subpage.
3.In the Database Configuration section, click Memory Advisors.
The Memory Advisors page appears. Scroll down to the SGA subpage.
Description of mem_current_allocation.gif follows
Description of the illustration mem_current_allocation.gif
4.In the Current Allocation section, do one of the following:
◦In the Total SGA Size (MB) field, enter a new total size for the SGA.
◦Click Advice to use the SGA Advisor to help you choose a new SGA size.
The SGA Size Advice window opens.
Description of mem_allocation_advice.gif follows
Description of the illustration mem_allocation_advice.gif
Click a point on the curve to change the total SGA size. The new SGA size is displayed below the graph. Continue clicking the curve until the desired value is displayed, and then click OK.
This example graph shows that at the current time, increasing the total SGA size is not expected to provide any gain in performance.
Note:
The settings on this page can be modified only if Automatic Memory Management is disabled.
5.If you chose to use the SGA Size Advisor, then click a point on the curve to change the total memory size. Otherwise, go to Step 7.
The new size is displayed below the graph.
6.Continue clicking the curve until the desired value is displayed, then click OK.
You are returned to the Memory Advisors page.
7.Click Apply.
A confirmation message appears.
See Also:
•Oracle Database Performance Tuning Guide for more information about memory parameters and their tuning
•“Optimizing Memory Usage with the Memory Advisors”
•“About Memory Management”
Modifying Memory Settings – Automatic PGA Memory Management
Modifying memory settings for automatic PGA memory management involves using the Memory Advisors page of Database Control to modify the instance PGA size. This section assumes that automatic memory management is disabled, and that automatic PGA memory management is enabled.
Note:
When you disable automatic memory management, automatic PGA memory management is enabled by default.
To modify the instance PGA size:
1.Go to the Database Home page.
See “Accessing the Database Home Page”.
2.At the top of the page, click Server to view the Server subpage.
3.In the Database Configuration section, click Memory Advisors.
The Memory Advisors page appears, with the SGA subpage shown.
4.Click PGA to view the PGA subpage.
Description of mem_param_pga.gif follows
Description of the illustration mem_param_pga.gif
5.Do one of the following:
◦In the Aggregate PGA Target field, enter a new size for the instance PGA.
◦Click Advice to use the PGA Advisor to help you choose a new instance PGA size.
See Oracle Database Performance Tuning Guide for information about sizing the instance PGA.
6.When you have specified the new instance PGA size, click Apply.
A confirmation message appears.
See Also:
•Oracle Database Performance Tuning Guide for more information about memory parameters and their tuning
•“About Memory Management”
Instances: Oracle By Example Series
Oracle By Example (OBE) has a series on the Oracle Database 2 Day DBA guide. This OBE steps you through the tasks in this chapter, and includes annotated screenshots.
To view the Instances OBE, in your browser, enter the following URL:
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r2/2day_dba/instance/instance.htm