The Oracle Universal Installer supports the installation of several active Oracle homes on the same host. An Oracle home is a directory into which all Oracle software is installed. This is pointed to by an environment variable. The Oracle home consists of the following:
Directory location where the products are installed
Corresponding system path setup
Program groups associated with the products installed in the home (where applicable)
Services running from the home
Introduction to Oracle Base
The Oracle base location is the location where Oracle Database binaries are stored. During installation, you are prompted for the Oracle base path. Typically, an Oracle base path for the database is created during Oracle Grid Infrastructure installation.
To prepare for installation, Oracle recommends that you only set the ORACLE_BASE environment variable to define paths for Oracle binaries and configuration files. Oracle Universal Installer (OUI) creates other necessary paths and environment variables in accordance with the Optimal Flexible Architecture (OFA) rules for well-structured Oracle software environments.
For example, with Oracle Database 11g, Oracle recommends that you do not set an Oracle home environment variable allow OUI to create it instead. If the Oracle base path is /u01/app/oracle, then by default, OUI creates the following Oracle home path:
Ensure that the paths you select for Oracle software, such as Oracle home paths and the Oracle base path, use only ASCII characters. Because installation owner names are used by default for some paths, this ASCII character restriction applies to user names, file names, and directory names.
Installing an Oracle Product
When you install an Oracle product, an Oracle home is created.
To install the product and create the Oracle home, perform the following steps:
Run Oracle Universal Installer.
In the Specify Home Details page, enter the Oracle home settings for the installation session. See Table 2-1 for a description of the fields in this section of the screen.
Continue with your installation. See Chapter 4, «Installing Products» for detailed information.
Table 2-1 Oracle Installation Settings for Specify Home Details page
Settings
Functions
Enter a name for the Oracle home. This name identifies the program group associated with a particular home and the Oracle services installed on this home. The Oracle home name must be between 1 to 127 characters long, and can include only alphanumeric characters and underscores.
Enter the full path to an Oracle home, or select an Oracle home from the drop-down list of existing Oracle homes. The Oracle home location is the directory where products are installed.
Data files may or may not be installed within an Oracle home. You can use the Browse button to choose a directory to install your product.
For Windows platforms, you must provide a valid path that is not in the Windows directory. Different homes cannot share the same location.
Oracle recommends that you designate an Oracle home location that is an empty or non-existing directory. If you select a directory for the Oracle home location that is not empty or already exists, you will be warned and asked if you want to proceed.
For silent installations, if a non-empty, existing directory is specified, an error is logged in the console and in the installActions .log file. Also, the Oracle Universal Installer aborts. To override this condition, use the -force flag on the command line. The effect of using the -force flag is the same as selecting Yes while installing in interactive mode. You receive a warning message, but the installation continues.
Removing Oracle Homes
To remove or deinstall Oracle homes, you can either use the Deinstall tool included with the Shiphome, or use the Deinstall utility available as part of the Oracle home.
To use the Deinstall tool, do the following to remove the Oracle home:
cd to DeinstallTool.
Run deinstall -home .
To use the Deinstall utility, do the following to remove the Oracle home:
cd to $Oracle_Home/deinstall.
Determining the Default Oracle Home
By default, when you start Oracle Universal Installer, the software searches your system to determine the default Oracle home where Oracle software should be installed.
In all cases, the ORACLE_HOME name is taken first from the command line if it is specified, or else from the response file if specified. If not specified, the value of DEFAULT_ORACLE_HOME_NAME in oraparam.ini is examined. Typically, the following convention is used for the name:
Where is the short product marketing name as specified in the oraparam.ini file; for example, «Db11g», and is a counter derived from the Central Inventory. For example, the ORACLE_HOME name could be OraDb11g_1 .
The ORACLE_HOME path is taken first from the command line if specified, or else from the response file if specified. If not, the ORACLE_HOME environment variable is used. If neither is specified, the following conventions are used for the path:
If ORACLE_BASE has been specified in the environment:
For example: $ORACLE_BASE/product/11.2.0/Db_1 .
If ORACLE_BASE has not been specified in the environment:
Where is the short product name; for example, «Db», and is picked up based on the existence of the files. For example, the ORACLE_HOME path could be $HOME/product/11.2.0/Db_1 .
The instance-related directory location is accepted first from the response file, if specified. If not, the oradata , flash_recovery_area , admin , and doc directories are created under ORACLE_BASE . If ORACLE_BASE has not been specified, the default is the $ORACLE_HOME/oradata directory. If the parent directory of the Oracle home is writable, these directories are created in the parent directory of the Oracle home.
Multiple Oracle Homes
Oracle Universal Installer supports the installation of several active Oracle homes on the same host as long as the products support this at run-time. Multiple versions of the same product or different products can run from different Oracle homes concurrently. Products installed in one home do not conflict or interact with products installed on another home. You can update software in any home at any time, assuming all Oracle applications, services, and processes installed on the target home are shut down. Processes from other homes may still be running.
Target Home
The Oracle home currently accessed by Oracle Universal Installer for installation or deinstallation is the target home. To upgrade or remove products from the target homes, these products must be shut down or stopped.
Oracle Universal Installer Inventory
The Oracle Universal Installer inventory stores information about all Oracle software products installed in all Oracle homes on a host, provided the product was installed using Oracle Universal Installer.
Inventory information is stored in Extensible Markup Language (XML) format. The XML format enables easier diagnosis of problems and faster loading of data. Any secure information is not stored directly in the inventory. As a result, during removal of some products, you may be prompted to enter the required credentials for validation.
Oracle recommends placing the central inventory on a local file system that is not shared by other systems, since the central inventory is a system-specific inventory of the installations on this system. It is strongly recommended that you place the central inventory on a local disk so that installations from other systems do not corrupt the inventory. You should not place the central inventory in the Oracle Base.
Structure of the Oracle Universal Installer Inventory
The Oracle Universal Installer inventory has the following hierarchical structure:
Central Inventory Pointer File
Every Oracle software installation has an associated Central Inventory where the details of all the Oracle products installed on a host are registered. The Central Inventory is located in the directory that the inventory pointer file specifies. Each Oracle software installation has its own Central Inventory pointer file that is unknown to another Oracle software installation.
For Oracle homes sharing the same Central Inventory, the Oracle Universal Installer components perform all read and write operations on the inventory. The operations on the Central Inventory are performed through a locking mechanism. This implies that when an operation such as installation, upgrade, or patching occurs on an Oracle home, these operations become blocked on other Oracle homes that share the same Central Inventory.
Table 2–2 shows the location of the default inventory pointer file for various platforms:
The following string shows an example of the path for the oraInst.loc file:
In UNIX, if you do not want to use the Central Inventory located in the directory specified by the inventory pointer file, you can use the -invPtrLoc flag to specify another inventory pointer file. The syntax is as follows:
If the contents of the oraInst.loc file is empty, Oracle Universal Installer prompts you to create a new inventory.
Central Inventory
The Central Inventory contains the information relating to all Oracle products installed on a host. It contains the following files and folders:
Inventory File
This file lists all the Oracle homes installed on the node. For each Oracle home, it also lists the Oracle home name, home index, and nodes on which the home is installed. It also mentions if the home is an Oracle Clusterware home or a removed Oracle home. It can only detect removed Oracle homes created using Oracle Universal Installer version 11.2 and later. This file is present in the following location:
The following code shows a sample inventory.xml file:
Oracle recommends that you do not remove or manually edit this file as it could affect installation and patching.
Logs Directory
The Central Inventory contains installation logs in the following location:
The logs directory contains the logs corresponding to all installations performed on a particular node. You can also find a copy of the installation log in the $ORACLE_HOME/cfgtoollogs directory.The installation logs for an installation are identified by the timestamp associated with the log files. These files are generally saved in the following format:
For example, consider an attachHome operation performed on 17th, May, 2009 at 6.45AM. The associated log file would be created as follows:
Oracle Home Inventory
Oracle home inventory or local inventory is present inside each Oracle home. It only contains information relevant to a particular Oracle home. This file is located in the following location:
It contains the following files and folders:
Components File
This file contains the details about third-party applications like Java Runtime Environment (JRE) required by different Java-based Oracle tools and components. In addition, it also contains details of all the components as well as patchsets or interim patches installed in the Oracle home. This file is located here:
For an example of the components file, see «Sample Components File».
Home Properties File
This file contains the details about the node list, the local node name, and the Oracle Clusterware flag for the Oracle home. In a shared Oracle home, the local node information is not present. This file also contains the following information:
GUID — Unique global ID for the Oracle home
ARU ID — Unique platform ID. The patching and patchset application depends on this ID.
ARU ID DESCRIPTION — Platform description
The information in oraclehomeproperties.xml overrides the information in inventory.xml . This file is located here:
The following example shows the Oracle home property file:
Table 2–3 lists the ARU_IDs for some platforms:
Источник
Set oracle home linux
This chapter provides information about administering Oracle Database on UNIX-based operating systems. It contains the following sections:
The appropriate appendix in this guide for platform-specific information about administering Oracle Database
Oracle Database Administrator’s Guide and Database 2 Day DBA for generic information about administering Oracle Database
1.1 Overview
You must set Oracle Database environment variables, parameters, and user settings for Oracle Database to work. This chapter describes the various settings for Oracle Database.
In Oracle Database files and programs, a question mark (?) represents the value of the ORACLE_HOME environment variable. For example, Oracle Database expands the question mark in the following SQL statement to the full path of the Oracle home directory:
Similarly, the at sign (@) represents the ORACLE_SID environment variable. For example, to indicate a file that belongs to the current instance, run the following command:
1.2 Environment Variables
This section describes the most commonly used Oracle Database and operating system environment variables. You must define some environment variables before installing Oracle Database. This section covers the following topics:
To display the current value of an environment variable, use the env command. For example, to display the value of the ORACLE_SID environment variable, run the following command:
To display the current value of all environment variables, run the env command as follows:
1.2.1 Oracle Database Environment Variables
The following table describes some environment variables used with Oracle Database.
Table 1-1 Oracle Database Environment Variables
Variable
Definition
Function: Specifies the language, territory, and character set of the client environment. The client character set specified by NLS_LANG must match the character set of the terminal or terminal emulator. If required, NLS_LANG can be temporarily reset to another character set before starting a non-interactive batch program to match the character set of files and scripts processed by this program. The character set specified by NLS_LANG can be different from the database character set, in which case the character set is automatically converted.
Refer to Oracle Database Globalization Support Guide for a list of parameters for this variable.
Function: Specifies the directory where the language, territory, character set, and linguistic definition files are stored.
Function: Specifies the full path and file name of the time zone file. The Oracle Database Server always uses the large time zone file ( $ORACLE_HOME/oracore/zoneinfo/timezlrg_ number .dat ). If you want to use the small time zone file on the client side, you must set this environment variable to the full path of the small time zone file ( $ORACLE_HOME/oracore/zoneinfo/timezone_ number .dat ). If you use the small time zone file on the client side, you must ensure that the database you access contains data only in the time zone regions recognized by the small time zone file.
Function: Specifies the base of the Oracle directory structure for Optimal Flexible Architecture compliant installations.
Function: Specifies the directory containing the Oracle software.
Function: Specifies the search path for files used by Oracle applications such as SQL*Plus. If the full path to the file is not specified, or if the file is not in the current directory, then the Oracle application uses ORACLE_PATH to locate the file.
Syntax: Colon-separated list of directories:
Function: Specifies the Oracle system identifier.
Syntax: A string of numbers and letters that must begin with a letter. Oracle recommends a maximum of 8 characters for system identifiers. For more information about this environment variable, refer to Oracle Database Installation Guide .
Function: Enables the tracing of shell scripts during an installation. If it is set to T , then many Oracle shell scripts use the set -x command, which prints commands and their arguments as they are run. If it is set to any other value, or no value, then the scripts do not use the set -x command.
Syntax: T or not T
Function: Controls whether the oraenv or coraenv script prompts or does not prompt for the value of the ORACLE_SID environment variable. If it is set to NO , then the scripts do not prompt for the value of the ORACLE_SID environment variable. If it is set to any other value, or no value, then the scripts prompt for a value for the ORACLE_SID environment variable.
Syntax: NO or not NO
Function: Specifies the directory or list of directories that SQL*Plus searches for a login.sql file.
Syntax: Colon-separated list of directories: directory1:directory2:directory3
Function: Specifies the directory containing the Oracle Net Services configuration files.
Function: Specifies the default connect identifier to use in the connect string. If this environment variable is set, then do not specify the connect identifier in the connect string. For example, if the TWO_TASK environment variable is set to sales , then you can connect to a database by using the following command:
Syntax: Any connect identifier.
Range of Values: Any valid connect identifier that can be resolved by using a naming method, such as a tnsnames.ora file or a directory server.
Function: Specifies the Oracle character set name corresponding to the UNIX locale character set in which the file names and user names are encoded by the operating system. You must set the environment variable NLS_OS_CHARSET, if the UNIX locale character set is different from the Oracle client character set. These two character sets may differ, for example, if NLS_LANG is set to a particular character set used to encode an SQL script, which is to be executed in an SQL*Plus session. Usually, the Oracle client character set and the operating system character set are the same and NLS_OS_CHARSET must not be set.
To prevent conflicts, do not define environment variables with names that are identical to the names of Oracle Database server processes. For example ARCH , PMON , and DBWR .
If the Oracle installation owner ( oracle user) environment variables are missing, or if they are set to incorrect paths, then you may encounter undefined errors during Oracle Database startup. Ensure that all the environment variables are correctly set before starting the database. Refer to My Oracle Support Note 373303.1 for more information:
You must consult Oracle Support before you implement any changes as suggested in the My Oracle Support Note 373303.1.
1.2.2 Linux and UNIX Environment Variables
Oracle Database uses operating system environment variables to define system resources and software locations.
Table 1-2 Environment Variables Used with Oracle Database
Variable
Definition
ADA_PATH (IBM AIX on POWER Systems (64-Bit) only)
Function: Specifies the directory containing the Ada compiler
Function: Used with Java applications. The required setting for this variable depends on the Java application. Refer to the product documentation for Java application for more information.
Syntax: Colon-separated list of directories or files: directory1:directory2:file1:file1
Example: There is no default setting. CLASSPATH must include the following directories:
Function: Used by X-based tools. Specifies the display device used for input and output. Refer to the X Window System documentation for information.
where hostname is the system name (either IP address or alias), server is the sequential code number for the server, and screen is the sequential code number for the screen. If you use a single monitor, then use the value 0 for both server and screen ( 0.0 ).
Note : If you use a single monitor, then screen is optional.
Function: The home directory of the user.
Example: /home/ example_home
Function: Specifies the language and character set used by the operating system for messages and other output. Oracle tools that are programmed in Java, such as Oracle Universal Installer and Oracle Database Configuration Assistant, may also use this variable to determine the language of their user interface. Refer to the operating system documentation for more information.
Function: Specifies the default linker options. Refer to the ld man page for more information about this environment variable.
LPDEST (Oracle Solaris only)
Function: Specifies the name of the default printer.
Function: Environment variable to specify the path used to search for libraries on UNIX and Linux. The environment variable may have a different name on some operating systems, such as LIBPATH on IBM AIX on POWER Systems (64-Bit), and SHLIB_PATH on HP-UX.
Syntax: Colon-separated list of directories: directory1:directory2:directory3
Function: Used by the shell to locate executable programs; must include the $ORACLE_HOME/bin directory.
Syntax: Colon-separated list of directories: directory1:directory2:directory3
Function: Specifies the name of the default printer.
TEMP , TMP , and TMPDIR
Function: Specifies the default directories for temporary files. If set, then the tools that create temporary files create them in one of these directories.
USER (when using SSH to connect on HP-UX Itanium systems)
Function: Specifies the name of the user logging in.
1.2.3 Setting a Common Environment
This section describes how to set a common operating system environment by using the oraenv or coraenv scripts, depending on the default shell:
For the Bourne, Bash, or Korn shell, use the oraenv command.
For the C shell, use the coraenv command.
oraenv and coraenv Script Files
The oraenv and coraenv scripts are created during installation. These scripts set environment variables based on the contents of the oratab file and provide:
A central means of updating all user accounts with database changes
A mechanism for switching between databases specified in the oratab file
You may find yourself frequently adding and removing databases from the development system or your users may be switching between several different Oracle Databases installed on the same system. You can use the oraenv or coraenv script to ensure that user accounts are updated and to switch between databases.
Do not call the oraenv or coraenv script from the Oracle software owner (typically, oracle ) user’s shell startup script. Because these scripts prompt for values, they can prevent the dbstart script from starting a database automatically when the system starts.
The oraenv or coraenv script is usually called from the user’s shell startup file (for example, .profile or .login ). It sets the ORACLE_SID and ORACLE_HOME environment variables and includes the $ORACLE_HOME/bin directory in the PATH environment variable setting. When switching between databases, users can run the oraenv or coraenv script to set these environment variables.
To run one of these scripts, use the appropriate command:
Local bin Directory
The directory that contains the oraenv , coraenv , and dbhome scripts is called the local bin directory. All database users must have read access to this directory. Include the path of the local bin directory PATH environment variable setting for the users. When you run the root.sh script after installation, the script prompts you for the path of the local bin directory and automatically copies the oraenv , coraenv , and dbhome scripts to the directory that you specify. The default local bin directory is /usr/local/bin . If you do not run the root.sh script, then you can manually copy the oraenv or coraenv and dbhome scripts from the $ORACLE_HOME/bin directory to the local bin directory.
1.2.4 Setting the System Time Zone
The TZ environment variable sets the time zone. It enables you to adjust the clock for daylight saving time changes or different time zones.
1.3 Initialization Parameters
These sections provide information about Oracle Database initialization parameters.
1.3.1 ASM_DISKSTRING Initialization Parameter
Only Automatic Storage Management instances support the ASM_DISKSTRING initialization parameter.
The syntax for assigning a value to the ASM_DISKSTRING initialization parameter is as follows:
In this syntax, pathn is the path to a raw device. You can use wildcard characters when specifying the path.
Table 1-3 lists the platform-specific default values for the ASM_DISKSTRING initialization parameter.
Table 1-3 Default Values of the ASM_DISKSTRING Initialization Parameter
The DISK_ASYNCH_IO initialization parameter determines whether the database files reside on raw disks or file systems. Asynchronous I/O is available only with Automatic Storage Management disk group which uses raw partitions as the storage option for database files. The DISK_ASYNCH_IO parameter can be set to TRUE or FALSE depending on where the files reside. By default, the value is set to TRUE .
The DISK_ASYNCH_IO parameter must be set to FALSE when the database files reside on file system. This parameter must be set to TRUE only when the database files reside on raw partitions.
PROCESSOR_GROUP_NAME specifies the name of the processor group in which an instance is running. This parameter instructs Oracle databases to run only on processors which are a part of the specified operating system processor groups. For NUMA systems, all System Global Area (SGA) and Program Global Area (PGA) are allocated from the NUMA nodes associated with the CPUs in this processor group.
PROCESSOR_GROUP_NAME parameter is only supported on Linux x86-64 and Oracle Solaris 11 SRU 4 and later.
On Linux x86-64, the named subset of CPUs is created through a Linux feature called control groups (cgroups). Cgroups are introduced in Linux kernel version 2.6.24. It is created by specifying a name and a set of CPUs for the group. When a process is mapped to a cgroup, it uses only the CPUs associated with the cgroup.
On Oracle Solaris 11 SRU 4, the named subset of CPUs is created through a feature called resource pools. Each resource pool consists of a name and a set of CPUs. When a process is mapped to a resource pool, it uses the CPUs associated with the resource pool.
Oracle recommends that the PROCESSOR_GROUP_NAME parameter is set only for databases using a dedicated connection broker. The USE_DEDICATED_BROKER initialization parameter is used to configure the dedicated connection brokers.
Related Topics
1.3.4 Managing Diagnostic Data
Diagnostic data includes the trace files, dumps, and core files to investigate, track, and resolve problems quickly and effectively.