[Laskey99] Section 2.6. Critical Decisions

来源:百度文库 编辑:神马文学网 时间:2024/07/03 09:57:15
2.6.
While most decisions made duringinstallation can be changed at a later time, some decisions areeither very difficult or impossible to change, so it is importantthat you make these decisions correctly at the time of installation.They include:
Creation of a starter database
Location of Oracle software (ORACLE_HOME )
Directory structure for Oracle datafiles
Language to be used
Database blocksize
Number, size, and location of online log files
Maximum number of datafiles to be allowed
We describe each of these decisions in the following sections.
2.6.1. The Starter Database
On most Oracle platforms,when you install the Oracle software you are given an option tocreate an initial or starter database, whichnormally consists of:
Default database name (usually ORCL)
Default database blocksize (usually 2048)
A SYSTEM tablespace
A USERS tablespace
Users SYS, SYSTEM, and SCOTT
Three online redo log files
A single control file
A single non-SYSTEM rollback segment
A standard initialization file (generally referred to as INIT.ORA in this book)
The sizes and locations of the files associated with this initialdatabase vary from platform to platform. For all but the mostsimplistic database application, we strongly recommend that thestarter database not be installed. Rather, you should carefully planthe database installation and create the database according to thatplan. We recommend against using the starter database for thefollowing reasons:
The database should be meaningfully named.
The default blocksize is usually too small.
The operating system file locations do not follow the Optimal Flexible Architecture (OFA), described in the next section.
The initial file sizes are usually inadequate.
Users are created with inappropriate DEFAULT and TEMP tablespace assignments.
The redo log files have not been sized and are not located properly.
Multiple (mirrored) control files should always be used to protect against damage or loss.
Multiple rollback segments should be defined in a non-SYSTEM tablespace.
Initialization parameters should be planned and tuned for the database.
While it is certainly possible for the DBA to allow Oracle to createan initial database and then make appropriate modifications, it isfar more efficient and less complex and time-consuming to create theappropriate database from scratch.

Some implementations of Oracle may not give you a choice regarding the installation of the starter database. In this case, you can either modify it after creation to meet your needs, or delete it after installation and create your own database.
A sample script for creating a database is included at the end ofthis chapter. Note that this script is for example purposes only and,as such, is probably more simplistic than the script you'd useto create an actual production database.
2.6.2. Oracle Directory Structure
Oraclehas published a standard called the Optimal Flexible Architecture(OFA), which describes an ideal directory structure for Oraclesoftware and database files. While the OFA was defined primarily forUnix environments (as it has many specific advantages for the Unixenvironment), the principles of OFA can be applied to most operatingsystem environments.
OFA provides a very precisely defined structure, including directorynames.In many installations it may be necessary and even desirable to makemodifications to the OFA standard, and we do so in this book.However, even when modified, the key to OFA is a standard directorystructure. On a Unix machine with five disk drives, hosting twodatabases (DB1 and DB2) running two versions of Oracle (7.3.4 and8.0.5), the structure might look like this:
/disk00/oracle/product/7.3.4/...
/disk00/oracle/product/8.0.5/...
/disk01/oracle/oradata/DB1/...
/disk02/oracle/oradata/DB1/...
/disk03/oracle/oradata/DB2/...
/disk04/oracle/oradata/DB2/...
The key elements of this structure are:
Each mount point (disk) has the same name and is numbered sequentially (disk00 is the first disk, disk01 is the second, etc.).
Below each mount point is a directory called oracle . All Oracle files will be created below this point. On the disk that contains the Oracle software, the directory to this point ( /disk00/oracle, in our example) is called ORACLE_BASE.
The next level can contain the software directory (named the product directory according to the OFA standard), which in turn contains a directory for each Oracle version installed. This directory normally exists only on a single disk, and the directory to this level (/disk00/oracle/product/7.3.4 or /disk00/oracle/product/8.0.5 in our example) is called ORACLE_HOME . All Oracle software is organized in predefined directories below ORACLE_HOME, and on most platforms, ORACLE_HOME must be defined at the operating system level. Only the account that actually runs Oracle should have permission to access these directories.
At the same level as the product directory, each disk or mount point will have an oradata directory. A separate directory for each database (usually given the same name as the database) is then created below oradata. All Oracle datafiles are created here. The OFA standard requires that a given disk drive must contain only files for a single database (i.e., datafiles for DB2 cannot reside on the same disk as datafiles for DB1), but in practice, this is probably not reasonable, and you may want to relax this part of the OFA standard at your site. Files in these directories should be protected so that only the account that actually runs Oracle has permission to alter them.
Before beginning the installation of Oracle software, you shouldcreate at least the directory structure forORACLE_HOME. The remainder of the structureshould be created prior to attempting to create a database.

The Oracle White Paper "Optimal Flexible Architecture," by Cary Millsap, provides a complete definition of the OFA standard and is available on Oracle's web site (www.oracle.com).

Create Bookmark (Key: b)Create Bookmark
Create Note or Tag (Key: t)Create Note or Tag
Download (Key: d)Download
Email This Page (Key: e)Email This Page
PrintPrint
Html View (Key: h)Html View
Zoom Out (Key: -)Zoom Out
Zoom In (Key: +)Zoom In
Toggle to Full Screen (Key: f)
Previous (Key: p)Previous
Next (Key: n)Next
Related Content

New Features in Server Installation
From: Oracle Database 11g: New Features for DBAs and Developers
The Oracle Security Model
From: Oracle Security
Preparing to Install
From: Pro Oracle Database 10g RAC on Linux: Installation, Administration, and Performance
Installing Oracle and Creating a Database
From: Oracle Database Foundations
Post-Installation Procedures for Linux
From: Oracle Database 10g Linux Administration
Oracle User Configuration
From: Pro Oracle Database 10g RAC on Linux: Installation, Administration, and Performance
Noninteractive Installation
From: Migrating to Oracle8i
Oracle System Files
From: Oracle Security
The Instance and the Database: Starting an Oracle Database
From: Oracle Security
Installing an Oracle database
From: Using Oracle Solutions on Linux for System z