1.4. Installing Oracle 10g

One of your duties as an Oracle DBA is to install and configure the Oracle 10g software on the server so that a database can be created to store application data. This section discusses each of the steps that you must perform in order to successfully install Oracle 10g.

NOTE

The examples in this section are for a Unix server, but most of the concepts apply equally to Windows platforms. Significant differences between Unix and Windows are noted.

1.4.1. Review the Documentation

Before beginning an installation of Oracle 10g, you need to review several documents so that you completely understand the installation requirements. These documents include the following:

  • The installation guide for your operating system

    • Oracle Database Installation Guide 10g Release 1 (10.1) for Unix Systems: AIX-Based Systems, HP-UX, HP Tru64 Unix, Linux, and Solaris Operating System (SPARC), Part No. B10811-02

    • Oracle Database Installation Guide 10g Release 1 (10.1.0.2.0) for Windows, Part No. B10130-01

  • The general release notes for the version of Oracle that you are installing

  • The operating system–specific release notes for the version of Oracle that you are installing

  • Any "quick start" installation guides

Before you begin, review each of these documents so that you are thoroughly familiar with the install process and any known associated issues.

NOTE

All these documents are available on Oracle's Technology Network website located at http://otn.oracle.com/index.html and on Oracle's MetaLink website at http://metalink.oracle.com. Unlike MetaLink accounts, OTN user accounts are free.

1.4.2. Review the System Requirements

The next task is to review your server hardware specifications to see if they meet or exceed the specifications in the install documentation. Minimally, this means that you must confirm that your server meets the installation requirements in these four areas:

  • The operating system is of the proper release level

  • The server has adequate memory to perform the install and run an instance

  • The server has adequate CPU resources to perform the install and run an instance

  • The server has adequate disk storage space to perform the install and run a database

The recommended minimum hardware requirements for an Oracle 10g installation are shown in Table 1.18.

Table 1.18. 8 Recommended Minimum Hardware Requirements for Oracle 10g
Hardware ComponentRecommended Requirement
Memory512MB.
Swap space1GB or two times the amount of RAM.
Temp space400MB of free space in the /tmp directory on Unix systems.
Free disk space1.5GB of disk space is required for the base Oracle 10g installation. 1GB of disk space is needed to create a database using the Database Configuration Assistant.

The Oracle Universal Installer, which is described in the subsequent section, "Using the Oracle Universal Installer," will perform a quick system check prior to starting an installation to see if your system meets the specific requirements for your operating system. If your system does not meet the minimum requirements, the installer returns an error and aborts.

On Unix systems, you must examine one critical system requirement before installation: Unix kernel parameters. Unix kernel parameters are used to configure the Unix operating system settings for operating system–level operations that impact Oracle-related activities such as the following:

  • The maximum size allowed for a sharable memory segment on the server, which can impact the SGA size

  • The maximum number of files that can be open on the server at one time, which impacts the total number of users and files in the database

  • The number of processes that can run concurrently on the server, which impacts the number of users and the ability to use some optional features

The systems administrator usually makes Unix kernel changes, which may require a server reboot in order to take effect. The install guide and/or release notes provides details on the appropriate kernel setting for your operating system. In addition to kernel settings, the system administrator may have to configure the server's disk storage system and backup hardware before installing the Oracle software.

1.4.3. Plan Your Install

Once you review the documentation and system requirements, you are ready to begin planning your installation. This is the last step before actually running the Oracle Universal Installer.

One way to simplify installation planning is to adopt the Optimal Flexible Architecture (OFA) model that Oracle recommends as a best-practice methodology for managing Oracle installations in Unix environments (and to a lesser extent, Windows environments). Cary Millsap designed the OFA model to produce database installations that are easier to manage, upgrade, and back up while at the same time minimizing problems associated with database growth. The OFA model addresses four areas:

  • Naming conventions for Unix file systems and mount points

  • Naming conventions for directory paths

  • Naming conventions for database files

  • Standardized locations for Oracle-related files

NOTE

You can download Cary Millsap's original 1995 OFA white paper at www.hotsos.com/downloads/visitor/00000019.pdf.

In addition to using the OFA model, planning your install also means answering the following questions:

  • Which operating system user will own the installed Oracle software?

  • On which disk drive and directory will the Oracle software be installed?

  • What directory structure will be used to store the Oracle software, its related configuration files, and the database itself?

  • How should the database files be laid out so that the maximum performance benefits will be realized?

  • How should the database files be laid out so that the maximum recoverability benefits will be realized?

1.4.3.1. Creating the Oracle User Account

On Unix systems, every file is owned by an operating system user account. Therefore, before you can install the Oracle software, you must create a Unix user account that will own the Oracle binaries. The user name for this account can be anything, but common Oracle user names include oracle, ora10g, and ora101. Each Unix user is also in one or more operating system groups. Create a new operating system group for the Oracle Unix user. This group is usually called dba, and you will be prompted for it later during the installation.

1.4.3.2. Naming Volumes and Mount Points

Unless Oracle's automatic storage management feature or raw devices are used, almost all files on a Unix server are stored on logical storage areas called volumes, which are attached, or mounted, to directories, or mount points, by the Unix system administrator. The OFA model suggests that these mount points be given a name that consists of a combination of a character and numeric values. Examples of common OFA mount points for Unix systems include the following:

  • /u01

  • /mnt01

  • /du01

  • /d01

Notice that the naming convention for these mount points is generic. The mount point's name has no relationship to what type of file it will ultimately hold. The OFA model recommends this generic naming convention because it provides the greatest flexibility for future management of the server's file systems.

NOTE

The concept of mount points does not apply directly to Windows environments. Windows environments assign a standard Windows drive letter (for example, C:, D:) to each volume.

1.4.3.3. Creating OFA Directory Paths

The OFA model prescribes that the directory structures under the mount points use a consistent and meaningful naming convention. In addition to this naming convention, the OFA model also assigns standard operating system environment variable names to some of these directory paths as "nicknames" to aid in navigation and ensure portability of the directory structures in the event that they need to be moved to new file systems.

Tables 1.19 and 1.20 show the two operating system environment variables used in the OFA model, along with the directories with which the variables are associated, for both Unix and Windows systems.

Table 1.19. 9 Comparison of Unix Directory Paths and Variables
Environment VariableDirectory PathDescription
$ORACLE_BASE/u01/app/oracleTop-level directory for Oracle software on the host server
$ORACLE_HOME/u01/app/oracle/product/10.1.0Directory into which the Oracle 10g software will be installed

Table 1.20. 0 Comparison of Windows Directory Paths and Variables
Environment VariableDirectory PathDescription
%ORACLE_BASE%D:ORACLETop-level directory for Oracle software on the host server
%ORACLE_HOME%D:ORACLEORA101Directory into which the Oracle 10g software will be installed

These environment variables are used extensively when installing, patching, upgrading, and managing Oracle systems. Table 1.21 shows several examples of how these variables define the locations of other Oracle directories.

Table 1.21. 1 Common Uses of ORACLE_BASE and ORACLE_HOME
DirectoryDescription
$ORACLE_HOME/dbsDefault location for PFILES and SPFILES on Unix systems
%ORACLE_HOME%databaseDefault location for PFILES and SPFILES on Windows systems
$ORACLE_BASE/admin/PROD/pfileLocation of the PFILE for a database called PROD on Unix systems
%ORACLE_BASE%adminPRODpfileLocation of the PFILE for a database called PROD on Windows systems
$ORACLE_HOME/network/adminDefault location for Oracle Net configuration files on Unix systems
%ORACLE_HOME% etworkadminDefault location for Oracle Net configuration files on Windows systems
$ORACLE_HOME/rdbms/adminLocation of many Oracle database configuration scripts on Unix systems
%ORACLE_HOME% dbmsadminLocation of many database configuration scripts on Windows systems

For Unix systems, Table 1.21 says $ORACLE_HOME/dbs is the default location for the PFILE and SPFILE, but then says that PFILES should be stored in $ORACLE_BASE/admin/PROD/ pfile. Windows systems are similar. This implies that the same file needs to be in two locations at the same time. You can accomplish this using two tricks. Which you use depends on your operating system.

On Unix systems, you can create the PFILE in the $ORACLE_BASE/admin/PROD/pfile directory and then create a symbolic link in $ORACLE_HOME/dbs that points to the file in $ORACLE_ BASE/admin/PROD/pfile using this syntax:

ln -s $ORACLE_BASE/admin/PROD/pfile/initPROD.ora
   $ORACLE_HOME/dbs/initPROD.ora

On Windows systems, you can create the PFILE in the %ORACLE_BASE%adminPRODpfile directory and then put another PFILE in %ORACLE_HOME%database that contains a single entry that points to the other PFILE in %ORACLE_BASE%adminPRODpfile like this:

ifile=D:oracleadminPRODpfileinitPROD.ora

Using these techniques allows you to put the initialization parameter files in their default locations under $ORACLE_HOME, but also in their desired location under $ORACLE_BASE.

Other Administrative Directories

According to the OFA model, for a database called PROD, the initialization parameter file should be located in $ORACLE_BASE/admin/PROD/pfile. However, the OFA model also recommends that several other directories be built under this location for other management purposes. These directories are located under $ORACLE_BASE/admin/PROD:

adhoc This directory is designed to store ad hoc SQL scripts for the PROD database.

arch If the database is in archive log mode, this directory is specified as the location where the archived redo logs are to be written by LGWR. The PFILE/SPFILE parameter called LOG_ ARCHIVE_DEST specifies the location of the arch directory.

adump If database auditing is turned on, this directory is specified as the location where the audit trail information is to be written. The PFILE/SPFILE parameter AUDIT_FILE_DEST specifies the location of the adump directory.

bdump This directory is the location of the database Alert log file and any trace files generated by background processes. The PFILE/SPFILE parameter BACKGROUND_DUMP_DEST specifies the location of the bdump directory.

cdump This directory is the location where core dump files will be written by operating system processes that crash. The PFILE/SPFILE parameter CORE_DUMP_DEST specifies the location of the cdump directory.

create This directory stores the SQL scripts that were used to initially create the database. These scripts may have been manually created or created using the Oracle Database Configuration Assistant described in Chapter 2.

exp This directory stores files that have been created using the Oracle export utility.

logbook This directory stores files that document the activities you performed on the database.

pfile This directory stores the parameter initialization file, or PFILE, for the database.

udump This directory is the location where any trace files generated by user processes will be written. The PFILE/SPFILE parameter USER_DUMP_DEST specifies the location of the udump directory.


NOTE

Why should the "real" copy of the PFILES be stored under $ORACLE_BASE instead of $ORACLE_HOME? Because it is a good idea to keep only version-specific files under $ORACLE_HOME. That way, when you eventually uninstall the software from an old $ORACLE_HOME, you won't lose your carefully tailored initialization files.

In addition to $ORACLE_BASE and $ORACLE_HOME, a few other non-OFA-related operating system environment variables on Unix and Windows systems are important to be aware of. These are described in Table 1.22.

Table 1.22. 2 Common Non-OFA Environment Variables
Operating System VariableDescription
$ORACLE_SIDDefines which instance a Unix user session should be connecting to on the server.
%ORACLE_SID%Defines which instance a Windows user session should connect to on the server.
$TNS_ADMINSpecifies where the Oracle Net configuration files are stored on Unix systems—if they are to be stored outside their default location of $ORACLE_HOME etworkadmin.
%TNS_ADMIN%Specifies where the Oracle Net configuration files are stored on Windows systems—if they are to be stored outside their default location of %ORACLE_HOME%/network/admin.
$TWO_TASKEstablishes a default Oracle Net connection string that will be used on Unix systems if none is specified by the user.
%LOCAL%Establishes a default Oracle Net connection string that will be used on Windows systems if none is specified by the user.
$LD_LIBRARY_PATHSpecifies the locations of the Oracle shared object libraries. This variable usually points to $ORACLE_HOME/lib or $ORACLE_HOME/ lib32 on Unix systems.
$PATHTells the operating system in which directories to look for executable files on Unix systems.
%PATH%Tells the operating system in which directories to look for executable files on Windows systems.

NOTE

The directories described in the "Other Administrative Directories" sidebar are merely guidelines. On large production databases, you will likely not want to store the database archived redo logs and export files under $ORACLE_HOME/ admin/PROD because of their size, number, and need to be actively managed.

You'll need many of the environment settings discussed in this section in order to install Oracle 10g. You will see examples of their use later in this chapter, in the section "Responding to OUI Prompts."

1.4.3.4. Creating OFA Directories Structures

The OFA directory structure and its associated operating system environment variables are primarily used to manage the Oracle 10g software binaries and the supporting files for an instance such as the PFILE and SPFILES. However, the OFA model also prescribes a directory naming convention and structure for the physical database files. In general, the OFA model recommends that the physical database file be located in a directory structure like the one shown here for a database called PROD with five mount points:

  • /u01/oradata/PROD

  • /u02/oradata/PROD

  • /u03/oradata/PROD

  • /u04/oradata/PROD

  • /u05/oradata/PROD

Notice that the directory naming convention incorporates the database name in the path. This makes it easier to have multiple files from multiple databases on the same mount points, on the same server. In addition to these directory paths, the names of the physical database files themselves also have an OFA naming convention, which is discussed in the following sections.

1.4.3.4.1. Control Files

Control files use names such as controln.ctl, in which n is the number of the copy of the multiplexed control file, for example, control01.ctl, control02.ctl, and so on.

NOTE

The query shown earlier on V$CONTROLFILE demonstrates an OFA-compliant naming convention for control files.

1.4.3.4.2. Datafiles

Datafiles use names such as filenamen.dbf, in which n is the number of the datafile of a tablespace that is composed of multiple datafiles. The datafile names should also describe the tablespace to which they belong. For example, if a tablespace called TOOLS comprises four datafiles, those datafiles might be called tools01.dbf, tools02.dbf, tools03.dbf, and tools04.dbf.

NOTE

Databases that use the Oracle Managed Files (OMF) feature will use systemgenerated filenames. See Chapter 3 for details.

NOTE

The query shown earlier on DBA_DATA_FILES demonstrates an OFA-compliant naming convention for datafiles.

1.4.3.4.3. Redo Log Files

Redo logs use names such as redogm.log, in which g is the group number of the redo log and m is the member number. For example, if a database has three redo log groups, and each redo log group is multiplexed with two members, the first redo log group's files might be called redo1a.log and redolb.log.

NOTE

The query shown earlier on V$LOGFILE demonstrates an OFA-compliant naming convention for redo logs.

Many of these environment variables and OFA file locations are used by the Oracle Universal Installer during the installation process. An example of using the Oracle Universal Installer to install Oracle 10g is shown in the next section.

1.4.4. Using the Oracle Universal Installer

You use the Oracle Universal Installer (OUI) to install and configure the Oracle 10g software. The OUI is a Java-based application that provides the same installation look and feel no matter which operating system the install is being run on. The OUI process consists of six primary operations:

  • Mounting the CD and starting the OUI

  • Performing preinstallation checks

  • Responding to server-specific prompts for file locations, names, and so on

  • Selecting the products that you want to install

  • Copying the files from the install media to $ORACLE_HOME

  • Compiling the Oracle binaries

  • Performing post-install operations using Configuration Assistants

1.4.4.1. Mounting the CD and Starting the OUI

To begin the install process, insert the Oracle 10g CD in the server. On some Unix systems, you may have to use the appropriate operating system command to mount the CD in your server before it is accessible.

Once the CD is mounted, take a moment to set the environment variables $ORACLE_BASE, $ORACLE_HOME, $PATH, and $LD_LIBRARY_PATH. OUI installations on Unix systems must also set the X Windows DISPLAY environment variable as shown here before continuing; otherwise, the OUI will not display correctly:

$ ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
$ ORACLE_HOME=$ORACLE_BASE/product/10.1.0; export ORACLE_HOME
$ PATH=$ORACLE_HOME/bin:$PATH; export PATH
$ LD_LIBRARY_PATH=$ORACLE_HOME/lib; export LD_LIBRARY_PATH
$ DISPLAY=192.168.1.100:0.0; export DISPLAY

NOTE

After mounting the CD, you may want to copy its contents to a staging directory so that you can install from there instead of from the CD.

1.4.4.2. Performing Preinstallation Checks

Once these operating system variables are set, start the OUI using the runInstaller.sh command shown here:

$ /cdrom/runInstaller
Starting Oracle Universal Installer...

Checking installer requirements...

Checking operating system version: must be redhat-2.1, UnitedLinux-1.0
     or redhat-3
                                      Passed


All installer requirements met.

Preparing to launch Oracle Univeral Installer from
     /tmp/OraInstall2004-07-16_01-53-28PM. Please wait...

Notice that the output shows that the OUI checked the server's operating system version, available RAM, kernel settings, and so on that we described earlier in this chapter.

NOTE

If needed, you can turn off the system verification that occurs prior to the installation by using the -ignoreSysPrereqs option of the runInstaller command.

Once the preinstallation tests are completed and passed, the OUI displays the initial OUI screen shown in Figure 1.20.

Click the Next button on the OUI screen to proceed with the installation.

1.4.4.3. Responding to OUI Prompts

The next OUI screen prompts you for two pieces of information:

  • The location for the inventory files that the OUI uses to keep track of which Oracle products are installed on the server

  • The name of the operating system group of which the user doing the install is a member

You can see both items in Figure 1.21.

Figure 1.20. The initial OUI installation screen

Figure 1.21. The OUI Specify Inventory Directory and Credentials screen

The value suggested for the oraInventory location, /u01/app/oracle/oraInventory, was selected based on the $ORACLE_BASE environment variable. The value suggested for the operating system group, dba, is the Oracle default value. Because both settings are correct for our environment, click the Next button to continue the installation. When you click the Next button on a Unix system, the OUI displays the screen shown in Figure 1.22.

This screen asks you to open a second session on the Unix server as the superuser root so that the script orainstRoot.sh can be executed. The following example shows this orainstRoot.sh script being executed from another session:

$ su -
Password:
# cd /u01/app/oracle/oraInventory
./orainstRoot.sh
Creating the Oracle inventory pointer file (/etc/oraInst.loc)
Changing groupname of /u01/app/oracle/oraInventory to dba.
#

Running the script creates some directory structures that are used to support the Oracle installation and sets the proper file permissions on those directories as well as other files. Once the orainstRoot.sh script executes, click the Continue button to open the Specify File Locations screen, which is shown in Figure 1.23.

On this screen, you specify the location of the source CD and the destination location of the Oracle software (for example, $ORACLE_HOME). Additionally, you can assign a nickname to this $ORACLE_HOME (OraDb10g_home1, in this example). The value of /u01/app/oracle/product/ 10.0.1 is filled in automatically by the installer based on the $ORACLE_HOME environment variable setting that you established before starting the OUI. Click the Next button to open the Select Installation Type screen, as shown in Figure 1.24, and continue with the installation.

Figure 1.22. The OUI orainstRoot.sh screen

Figure 1.23. The Specify File Locations screen

Figure 1.24. The Select Installation Type screen

1.4.4.4. Selecting Products to Install

This screen prompts you to select the type of installation to perform. In this example, we selected the Enterprise Edition option.

Click the Next button to open the next screen, which is shown in Figure 1.25.

The OUI goes thorough a second round of installation checks that confirm that the server's operating system version and configuration are appropriate for the Enterprise Edition install of Oracle 10g. If all the verification checks complete successfully, click the Next button to open the Select Database Configuration screen, as shown in Figure 1.26.

Figure 1.25. The OUI verifies system version and configuration.

Figure 1.26. The Select Database Configuration screen

This screen asks if you want to create a database following the installation process. Because creating a database is covered in Chapter 2, we'll skip this step for now. Click the Do Not Create A Starter Database option, and then click Next to open the Summary screen, as shown in Figure 1.27.

This screen summarizes all the options that you selected and all the components that will be installed. If you need to make changes, click the Back button to go back and modify your previous selections. If you are satisified with your selections, click the Next button to start copying the Oracle binaries from the CD to the $ORACLE_HOME directory.

1.4.4.5. Copying and Compiling Files

As shown in Figure 1.28, a bar is displayed to indicate the progress of the copy process.

Figure 1.27. The Summary screen

Figure 1.28. To track the copy progress, keep an eye on the bar.

NOTE

If these operating system checks do not succeed, you must correct the areas failing the checks before continuing.

Once the file copy portion of the installation is complete, the OUI begins linking the binaries to create the executable files needed to make the Oracle 10g software run on the server. Figure 1.29 shows the linking progress bar.

Figure 1.29. You can track the linking process by watching the bar.

On Unix systems, following the linking process, you are prompted to execute a second configuration script as the superuser root from the Unix command line, as shown in Figure 1.30.

Figure 1.30. Running the script as root

Like the first root script, the root.sh script should be executed from a second session as shown here:

$ su -
Password:

# cd /u01/app/oracle/product/10.1.0
./root.sh
Running the Oracle10 root.sh script...
The following environment variables are set as:
  ORACLE_OWNER= oracle
  ORACLE_HOME= /u01/app/oracle/product/10.1.0

Enter the full pathname of the local bin directory: [/usr/local/bin]:

Creating /etc/oratab file...
Adding entry to /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Successfuly accumulated necessary OCR keys.
Creating OCR keys for the user 'root', privgrp 'root'..
Operation successful.
Oracle Cluster Registry for cluster has been initialized

Adding to inittab
Checking the status of Oracle init process...
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
        moderne
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
#

Executing the root.sh script copies some files to a location outside $ORACLE_HOME and sets the permissions on several files inside and outside $ORACLE_HOME. Once the root.sh script executes successfully, click OK to continue the installation.

NOTE

If you have multiple installations to perform, you can speed up the process and minimize errors by building an OUI response file. This text file contains all the necessary responses to the OUI prompts so that an unattended, silent install is possible.

NOTE

The OUI on Windows systems also offers a Basic Installation mode in which only a few installation questions are asked before the copying of files begins. If you select the Advanced Installation mode, the prompts will closely follow those shown for Unix in this section.

1.4.4.6. Performing Post-Install Tasks

Once the root.sh script has completed, the OUI will perform some brief post-installation configuration activities before displaying the End Of Installation screen shown in Figure 1.31.

Figure 1.31. The End Of Installation Screen

Click the Exit button and then the OK button on the pop-up screen to exit the OUI and return to the Unix prompt.

Once the OUI is complete, you should have a completely installed and configured $ORACLE_ HOME. We'll use this software to create your first database in Chapter 2.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset