Oracle8i
Enterprise Edition for Windows NT Getting Started
Release 8.1.5 for Windows NT A68694-01 |
|
This chapter describes the concepts of multiple Oracle homes and Optimal Flexible Architecture (OFA) for Oracle8i Enterprise Edition for Windows NT.
Specific topics discussed:
When you install an Oracle database, you are probably installing one of the largest applications your computer is capable of supporting. Using multiple Oracle homes and OFA provides many advantages when administering large databases. The following advantages are the most important:
This section provides an overview of multiple Oracle homes. It includes the following topics:
An Oracle home corresponds to the environment in which Oracle products run. This environment includes the following:
Oracle homes also have a name associated with them, which you specify along with their location during installation.
Because the SID is unique to a system across different Oracle homes, the listener can spawn the database thread for a specific SID in the correct Oracle home, and the ORACLE_HOME parameter (used in UNIX environments only) is not needed in the LISTENER.ORA.
Element | First Oracle Home | Each Additional Oracle Home |
---|---|---|
Service Names | OracleTNSListener80 | Includes the Oracle home name in service names. For example: OracleHOME_NAMETNSListener80 |
Program Groups | Oracle for Windows
NT
Oracle home name is not appended to the group. |
Appends the Oracle home name to the program group. For example: Oracle for Windows NT - HOME_NAME |
Registry Entries | Located in HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE | Subkeys for each Oracle home added below the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE subkey (HOME0, HOME1, HOME2, and so on). For more information on the registry keys and subkeys, see Appendix C, "Oracle 8i Configuration Parameters and the Registry". |
System Identifier (SID) name for starter database | Automatically named ORCL | Only the first starter database on your computer is called ORCL. Additional starter databases use the naming convention ORCx or ORxx where x is a number appended to ensure the SID is unique. |
Release 8.1 Oracle homes are slightly different from pre-8.1 Oracle homes.
Element | First Oracle Home | Each Additional Oracle Home |
---|---|---|
Service Names |
OracleHOME_NAMETNSListener |
OracleHOME_NAMETNSListener |
Program Groups |
Oracle - HOME_NAME |
Oracle - HOME_NAME |
Registry Entries |
Located in HKEY_LOCAL_MACHINE\
|
Subkeys for each Oracle home are added in the HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE subkey. For example, the next subkeys after HOME0 are HOME1, HOME2, HOME3, and so on. For more information on the registry keys and subkeys, see Appendix C, "Oracle 8i Configuration Parameters and the Registry". |
System Identifier (SID)1 name and DB_NAME |
Automatically named ORCL. |
For 8.1.3 and 8.1.4, the first starter database on your computer was automatically called ORCL. The second database you created on your computer had a SID of ORCL0. For 8.1.5, you must type in the database name and SID name of your choice. Note: Use the Custom option of Oracle Database Configuration Assistant to create your own SID name. |
1 For releases 8.1.3 through 8.1.5, the SID can be a maximum of 64 alphanumeric characters in length. For all previous releases, the SID is a maximum of 4 alphanumeric characters. |
If you create more Oracle homes, and install the same products that you installed into the first Oracle home, conflicts can arise that can break your original database if the products are not multiple Oracle home enabled (multiple Oracle home products.)
To avoid such problems, check the following product classifications before installing multiple versions of the same product on your computer.
Oracle products are classified as follows:
You can install multiple Oracle home products multiple times in different Oracle homes. All products are multiple Oracle home products unless they are listed in:
"Products Supporting a Single Oracle Home" or
"Products Not Supporting Multiple Oracle Homes"
You can install single Oracle home products into any Oracle home, but only once per computer. When installing groups of products, if any of the products in the following list are included in the group and already exist on the computer, do not install them a second time:
All Oracle7 products and all release 8.0.3 products are non-multiple Oracle home products. You can only install these products into an old-style Oracle home (pre-8.0.4 Oracle home).
Products not associated with an Oracle home have no restrictions on into how many Oracle homes you install them. They include the following:
When you install these products, the Universal Installer requires that you install them into any Oracle home. However, they will actually be located under Start/Program/Oracle.
Unless you specify otherwise at installation time, the Oracle home in which you installed products most recently is the first directory listed in your PATH (primary home). As such, it has priority over the other Oracle home entries in your PATH.
If you invoke a product from the MS-DOS command prompt, the release of the product invoked is the one in the Oracle home listed first in your path, unless you specifically invoke a different release of the product by one of the following methods:
You can change the value of PATH by using one of the following methods:
Oracle Home Selector is a graphical user interface (GUI) tool that enables you to edit your environment path to make an appropriate Oracle home directory your primary home. This tool can only be used when you have multiple, active Oracle home directories on a single computer.
To change the value of PATH using Oracle Home Selector:
To change the value of PATH at the system level:
On Windows NT
On Windows 95 and Windows 98
To change the value of PATH at the MS-DOS command prompt:
At the MS-DOS command prompt, enter:
C:\> SET PATH=PATHNAME;%PATH%
where PATHNAME is the full path to the binary files for the products you want to use. This change is valid for the current session only. If you want to change the value of your PATH more permanently, use Oracle Home Selector or change the value of PATH at the system level. Both methods are described above.
If you exit Oracle Universal Installer after you have entered the name and path for an Oracle home (for example, because there is no more disk space in the path you specified), you cannot specify a different path until you delete the HOMEID key and the IDx key corresponding to that Oracle home from the registry. To do this:
For more information on the registry keys and subkeys, see Appendix C, "Oracle 8i Configuration Parameters and the Registry".
The Oracle Optimal Flexible Architecture (OFA) is a set of file naming and placement guidelines for Oracle software and databases. It can also be thought of as a set of "good habits" to adopt when organizing Oracle directories and files on your computer. All Oracle products on the Oracle8i Enterprise Edition for Windows NT CD-ROM are OFA-compliant; that is, Oracle Universal Installer places Oracle products in directory locations that follow the OFA guidelines. Although using OFA is not a requirement, Oracle Corporation recommends that you use it if your database will grow in size, or if you plan to have multiple databases.
The aim of OFA is to prevent an entire class of problems that can occur when you have different versions of Oracle software and multiple, growing databases on your computer. OFA is designed to provide significant benefits in the following areas:
Putting database files in a subdirectory of the Oracle home directory that also contained Oracle software made upgrades unnecessarily difficult. Separating software from data is essential, because over time, when you upgrade a database to the latest release of Oracle8i Enterprise Edition, the new Oracle software executables will be placed in a different Oracle home directory. After the upgrade is judged to have been successful, you can easily remove the old Oracle home directory and reclaim space because the database does not reside there.
An OFA-compliant database has the following benefits:
An OFA-compliant database has the following characteristics:
OFA has caused changes to the Oracle database directory tree. This table lists the differences:
The following figure provides a top-level overview of the
old and new database directory trees:
The following is the complete hierarchical directory tree of a sample OFA-compliant database:
Note: The directory tree for multiple instance databases (Oracle Parallel Server installations) has additional subdirectories and files. See Oracle Parallel Server Getting Started for Windows NT for more information. |
OFA uses directory naming conventions that make it easy to identify the precise Oracle home and database name that is associated with a set of files. This section describes the naming conventions used for the top-level directories of an OFA-compliant database directory tree:
ORACLE_BASE is the root of the Oracle directory tree. If you install an OFA-compliant database using Oracle Universal Installer defaults, ORACLE_BASE is X:\ORACLE where X is any hard drive (for example, C:\ORACLE).
If you are installing Oracle8i Enterprise Edition on a clean computer, you may want to change ORACLE_BASE to an appropriate value before running Oracle Universal Installer. Most users will not need or want to do this.
Before you run Oracle Universal Installer for the first time, change the value of ORACLE_BASE at the system level. Only change the value of ORACLE_BASE before you run Oracle Universal Installer for the first time because if there is already an ORACLE_BASE, and then you change it, there will be a conflict of Oracle base directories. If you create another ORACLE_BASE when the original ORACLE_BASE already exists, certain tools and the database will not be able to find previously created files because they will look for them in the new ORACLE_BASE instead of the original ORACLE_BASE.
To change the value of ORACLE_BASE at the system level:
On Windows NT:
On Windows 95 and Windows 98:
Note: TAn ORACLE_BASE registry key exists for every Oracle home. Ideally, the value of the ORACLE_BASE registry key will be identical for each Oracle home. |
\ORACLE_HOME is located beneath X:\ORACLE_BASE and contains subdirectories for Oracle software executables and network files.
If you install Oracle8i Enterprise Edition on a clean computer and use the default settings, the first Oracle home directory that you create is called \ORA81.
Database administration files are stored in subdirectories of ORACLE_BASE \ADMIN\DB_NAME.
The following table describes the subdirectories for database administration files:
Database files are stored in ORACLE_BASE\ORADATA\DB_NAME.
The following table describes the database files:
\DB_NAME is the unique name for a particular database and has the same value as the DB_NAME parameter in the INIT.ORA file. When you name a database, DB_NAME can be no more than eight characters long and can contain only the following characters:
The following sections describe various OFA and multiple Oracle home configurations.
To install an OFA-compliant database, you must specify an Oracle home directory in the Path: field of Oracle Universal Installer of the form:
X:\[PATHNAME]\ORACLE\HOME_NAME
where:
X:\ |
is any hard drive. For example, C:\. |
[PATHNAME] |
is an optional directory pathname. |
\ORACLE |
is a mandatory directory pathname unless you have changed the value of the ORACLE_BASE registry key before performing the installation. See "ORACLE_BASE Directory" for information on how to change the ORACLE_BASE from the default value ORACLE. |
HOME_NAME |
is the name of the Oracle home. |
The following are examples of OFA-compliant Oracle home directories:
To install a default OFA database:
The default OFA database settings consist of the following:
ORACLE_BASE | is C:\ORACLE and is the same for all Oracle homes |
Oracle home 1 | is C:\ORACLE\ORA81 |
Oracle home 2 | is C:\ORACLE\ORA82 |
This figure below illustrates the directory tree:
To install a non-default OFA database, case 1:
The non-default OFA database: case 1 settings follow:
ORACLE_BASE | is X:\XYZ for the first Oracle home and is Y:\ABC for the second Oracle home |
Oracle home 1 | is X:\XYZ |
Oracle home 2 | is Y:\ABC |
This figure illustrates the resulting directory trees:
To install a non-default OFA database, case 2:
ORACLE_BASE | is X:\XYZ\ORACLE and is the same for both Oracle homes |
Oracle home 1 | is X:\XYZ\ORACLE\ABC |
Oracle home 2 | is X:\PQR |
This figure illustrates the resulting directory tree:
One of the basic goals of OFA is to increase reliability and performance by distributing I/O load across different physical drives. If you are trying to maximize reliability and performance, Oracle Corporation recommends that you do the following:
Oracle log files and database files can be separated and treated with different levels of hardware reliability.
Generally, Oracle log files are more highly reliable, because of redundancy. Creating reliability based on redundancy may require you to duplicate all of your data, using disk mirrors.
Disk mirroring can be done with the Windows NT Disk Administrator and commonly with hardware controllers. Two identical drives are usually required to construct a mirror, the concept being that if one disk fails, the other disk can be used to recover data that would otherwise be lost. Using one of the disks to recover lost data may involve "breaking" the mirror. If the mirror breaks, you need to build a new mirror.
You can achieve a lesser degree of redundancy by configuring the disks, using a Redundant Array of Inexpensive Disks (RAID) configuration provided by the disk controller. The RAID level determines the amount of redundancy. Some RAID levels may use the "hot swapping" feature. Hot swapping means that you can replace a bad disk with a good one without turning off the computer or losing functionality.
How you set up disks for use in a database depends on the number of disks and the type of hard disk controllers available. If the hard disk controllers support both striping and mirroring, Oracle Corporation recommends you configure the controllers to support striping.
Some controllers are configured at system startup time by issuing a keyboard sequence that brings up configuration programs written by the controller manufacturer. One goal is to stripe as many drives together as possible by configuring the controllers. Each stripe shows up as one logical device.
Striping provides significant performance advantages. All the space from the striped drives appears as a single logical drive. Furthermore, the space is used by interlacing "stripes" of space from all of the disks in the stripe. This means that a large file uses some space from the first disk, then some from the second disk and so on to the last disk and then starting back at the first disk again. Each file may be spread over all of the striped disks. The data in such a file may be accessed randomly by more than one CPU without contention.
The controllers that support striping usually provide caching as well. This means that data may be written to the controller and cached and saved for a time in storage not on the disk. Data that is read can be cached on the controller in a similar fashion. Read caching is not necessary for Oracle databases since all database reads are cached already in the System Global Area (SGA). The value of the DB_BLOCK_BUFFERS parameter in the initialization parameter file (INIT.ORA) determines the number of buffers that can be used in the SGA. This value also configures the Oracle database on startup.
A raw partition is a portion of a physical disk that is accessed at the lowest possible level. The I/O of a raw partition improves performance by approximately 5% to 10% compared to the I/O of a partition containing a file system. Therefore, Oracle Corporation encourages you to use raw partitions for your tablespaces.
Additional Information: |
You implement OFA on Windows NT and UNIX in the same way. However, differences exist with regard to the following:
Additional
Information:
See your UNIX operating system-specific administrator's reference for information about OFA on UNIX. |
The top-level names of the OFA directory tree differ between Windows NT and UNIX. However, the main subdirectory and file names are the same on both operating systems.
On Windows NT, ORACLE_BASE is associated with an Oracle home directory. ORACLE_BASE is defined in the registry (for example, in HKEY_LOCAL_MACHINE \SOFTWARE\ORACLE \HOME0).
On UNIX, ORACLE_BASE is associated with a UNIX user's environment.
Windows NT currently does not support symbolic links like those in UNIX, although Microsoft has announced the intention to support them in a near-future release.
The goal of OFA is to place all Oracle software under one ORACLE_BASE directory and to spread the files across different physical drives as your databases increase in size.
On Windows NT 4.0, this implies that everything is on the same hard drive, which may be neither feasible nor desirable.
On UNIX, although everything seems to be in one directory on the same hard drive, files can be on different hard drives if they are symbolically linked or have that directory as a mount point.
Oracle Corporation recommends that you use one logical drive to store your database administration files and that you place other files, as needed, on other logical drives in an ORADATA\DB_NAME directory.
In the following example, there are four logical drives for a database named PROD: