Oracle® Database 2 Day DBA 10g Release 2 (10.2) Part Number B14196-01 |
|
|
View PDF |
This chapter describes how to install Oracle software and a starter database with the Oracle Universal Installer (OUI). It also describes upgrading an older database to the current release.
This chapter contains the following topics:
To install your Oracle software you use the Oracle Universal Installer (OUI). The Oracle Universal Installer is a graphical user interface (GUI) tool that enables you to view the Oracle software that is already installed on your machine, install new Oracle software, and deinstall Oracle software that you no longer intend to use. Online Help is available to guide you through the installation process.
Before installing the software, the installer performs a number of automated prerequisite checks to ensure that your machine fulfills the basic hardware and software requirements for an Oracle Database installation. If your machine does not meet a requirement, an error message is displayed. The requirements may vary somewhat depending upon the type of computer and operation system you are running, but some examples of prerequisites include:
A minimum of 512 MB of memory is available.
Sufficient paging space is available.
Appropriate operating system service packs or patches are installed.
An appropriate file system format is being used.
The installer automatically sets any operating system environment variables that the Oracle database server requires for its operation.
See Also: Oracle Database Installation Guide for your platform for more information about exact requirements. |
The Oracle Universal Installer guides you through an interview phase that asks you to specify your choices for installation and database creation. The exact sequence of steps depends on your operating system.
The installation options are divided into basic and advanced. During a basic installation, you need only make basic choices. For all other cases, you make both basic and advanced choices.
When you install Oracle Database during basic and advanced installations, you make the following choices.
What database product do you want to install?
You can install one of the following:
Enterprise Edition—Oracle's full featured database product providing data management for enterprise-level applications. It is engineered for mission-critical, high-security online transaction processing (OLTP) and data warehousing environments.
Standard Edition—This installation type is suitable for workgroup or department-level applications, and for small to medium sized enterprises. It is engineered to provide core relational database management services and options.
Personal Edition (Windows operating systems only)—This installation type installs the same software as the Enterprise Edition installation type, but supports only a single-user development and deployment environment.
Custom Install—This installation type enables you to customize the Enterprise Edition. Use Custom Install to add a component to your existing installation that would not normally be installed or prevent certain components from being installed.
Do you want to create a starter database in addition to installing the Oracle software? To create the database, the installer automatically launches the Database Configuration Assistant at the end of the installation.
To install a preconfigured database, select one of the following database types, optimized according to usage:
General Purpose
Transaction Processing
Data Warehouse
To create an custom database in which you configure your own database structure, select an advanced install.
Best Practice: Oracle recommends that you install a preconfigured database, which is faster and easier to do. You can customize the database later. |
What are your Database Configuration Options? These options include your Global Database Name and Oracle System Identifier (SID).
The Global Database Name is the full name of the database that uniquely distinguishes it from any other database. The global database name is of the form database_name.database_domain
, as in sales.us.acme.com
. The database name portion sales
is a simple name you call your database. The database domain portion us.acme.com
specifies the database domain in which the database is located. Together database name and domain make up the Global Database Name.
During basic installation, Oracle automatically installs the sample schemas. Many of the examples in the database documentation are based on the sample schemas. .
You will also be prompted to enter your database schema password for the SYS
and SYSTEM
accounts, which enable you to manage and administer the database.
During advanced installations, you are prompted to make the choices listed in this section, in addition to the basic options. The installation process provides defaults for every choice.
The advanced installation choices are described here for completeness. However, advanced installation steps are not documented in this chapter. For more information, see the Oracle Database Installation Guide for your platform.
You are given the following options during an advanced installation:
Install the sample schemas?
To complete the exercises in this book 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.
This choice is a configuration option only during advanced installation. This option defaults to No during advanced installation. Sample schemas are installed by default, however, during basic installation.
What kind of storage mechanism do you want your database to use?
A database includes several files that store the user data, database metadata, as well as 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 your operating system's file system. You can specify the directory path where database files are to be stored. Oracle Database can create and manage the actual files.
If you are not certain of which option to use, choose the default selection of File System.
Automatic Storage Management—This functionality enables you to define a pool of storage (called a disk group) in which Oracle automatically manages database file placement and naming. For environments with a large number of disks, this option simplifies database administration and maximizes performance. Disk mirroring and striping are performed automatically.
Automatic Storage Management requires a separate instance to configure and manage disks groups. The installer guides you through the creation and launching of an Automatic Storage Management instance and its components. For more information, see Appendix A, "Automatic Storage Management" and Oracle Database Administrator's Guide.
Raw Devices—This option enables you to manage your storage devices outside of the operating system file system by providing Oracle Database with unformatted physical disk space called raw devices. This method is primarily used in Oracle Real Application Clusters (RAC) environments. If you select this option, ensure that the raw devices have been created with an operating system command, and that they are not being used for any other purposes or by other Oracle databases.
What are your Database Management Options?
Here you specify whether to manage your database centrally or locally. The central deployment mode enables you to manage multiple targets, such as databases and application servers, from a single console. The local deployment mode on the other hand can manage only a single database instance.
The central deployment mode requires a special agent to be installed on the database host. If no such agent is found, then this option is disabled.
If you are setting up a single database for the first time, it is recommended that you deploy Enterprise Manager locally, which is the default.You can later install additional databases and migrate your deployment mode to central management.
At the end of the interview, a summary window displays the options that you have chosen, the requirements for space based on those options, and the components that will be installed. If you have chosen to install a database, then this step is performed immediately after the software installation is complete.
This section describes the basic installation steps. Most steps are common to all platforms and involve running the Oracle Universal Installer. Platform-specific steps are noted.
The following steps provide a summary of the installation process. For further assistance along the way, consult the online help or the Oracle Database Installation Guide for your platform.
Log on to your computer as a member of the administrative group that is authorized to install Oracle 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 to install new software.
Insert the distribution media for the database into your computer. The Autorun window opens automatically. Click Install/Deinstall Products.
If downloading from Oracle's Web site, then follow the instructions on the site.
The Oracle Universal Installer Select Installation Method window appears. Figure 2-1 shows what this window looks like on Windows.
Figure 2-1 Oracle Universal Installer Select Installation Method Window
You must now decide which type of installation to perform:
Basic Installation—Select this option to quickly install Oracle Database 10g. This method requires minimal user input. It installs the software and optionally creates a general-purpose database based on the information you provide.
For Basic installation, you specify the following:
Oracle Home Location—Enter the directory in which to install the Oracle Database 10g software. You must specify a new Oracle home directory for each new installation of Oracle Database 10g.
Installation Type—Select either Enterprise Edition, Standard Edition, or Personal Edition (Windows Only). Refer to "Basic Installation Choices".
UNIX DBA Group (Linux and Unix only)—Specify the DBA group for your operating system.
Create Starter Database —Check this box to create a database during installation. Oracle recommends that you create a starter database for first-time installations. You must enter a Global Database Name and Database Password for the SYS
, SYSTEM
, SYSMAN
, and DBSNMP
administrator accounts. The Global Database Name is described in "Basic Installation Choices".
To start the Basic Installation, click Next. The Preparing to Install progress bar appears.
Advanced Installation—Select this option to customize your installation. For example, use this method to install Oracle Real Application Clusters, to upgrade a database, to configure Automatic Storage Management, or to configure automated backups. Selecting this option steps you through installation steps not documented here. For more information about the advanced choices, see "Advanced Installation Choices" in this chapter. Also see the Oracle Database Installation Guide for your platform.
The Product-Specific Prerequisite Checks window appears. Refer to "Checking Prerequisites". The Installer performs a number of environment checks and indicates success, warning, or failure. Details of the checks are provided. The installation can only proceed with check status of Succeeded or Warning. If you have failed checks, you must resolve them manually.
After verifying that your system meets the minimum requirements for installing and configuring the chosen products, click Next.
Linux and Unix Only. If this is the first time you are installing any Oracle software on this machine, then the following occurs:
The Specify Inventory Directory window appears. You must specify a directory for installation files and the name of an operating system group that has write permission to the directory. OUI uses this location to keep track of all Oracle software. This information is used while applying patches to or upgrading an existing installation, and while deinstalling Oracle software. Note that this area is different from the Oracle home, which you specify later. Click Next to continue.
A summary screen appears showing information such as your global settings, space requirements and the new products to be installed. Click Install to start the installation. The Install window appears showing installation progress.
At the end of the installation phase, the Configuration Assistants window appears. This window lists the configuration assistants that are started automatically. If you are creating a database, then the Database Configuration Assistant starts automatically in a separate window.
At the end of database creation, you are prompted to unlock user accounts to make the accounts accessible. Because the SYS
and SYSTEM
accounts are already unlocked, click OK to bypass password management.
Linux and Unix Only. The Execute Configuration scripts window appears. 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.
Your installation and database creation is now complete. The End of Installation window displays several important URLs, one of which is for Enterprise Manager. You can navigate to this URL in your browser and log in as the SYS user with the associated password, and connect as SYSDBA. You use Enterprise Manager to perform common database administration tasks. See Chapter 3, "Getting Started with Oracle Enterprise Manager".
After noting the information in the End of Installation screen, you can exit the Installer.
During installation, you can direct the installer to create and configure a new database. If you have already done so, you can skip to the next chapter.
If you install Oracle software only, however, or if you want to create additional databases with the release software that you just installed, then you can use the Database Configuration Assistant (DBCA).
DBCA enables you to perform the following tasks:
Online Help is available by clicking Help. It provides information that guides you in selecting configuration options.
To launch DBCA:
Log on to your computer as a member of the administrative group that is authorized to install Oracle software and create and run the database.
To launch DBCA on a Windows operating system, click the Start button and then select Programs, Oracle - home_name, Configuration and Migration Tools, and then Database Configuration Assistant.
To launch the DBCA on UNIX, or as another method on a Windows operating system, enter the following command at a system prompt:
dbca
The dbca
utility is typically located in ORACLE_HOME
/bin
.
The Welcome window appears.
Click Next to continue.
On the DBCA Operations window, select Create a Database to begin a wizard that enables you to configure and create a database. During the interview, you are asked for your input on the following:
Note that most windows of the wizard provide a default setting that you can accept. To accept all the default parameters, you can click Finish at any step. DBCA displays a final Confirmation window in which you must click OK to initiate the database creation.
This window enables you to select the type of database you want to create. By default, Oracle ships pre-defined templates. There are templates for Data Warehouse, General Purpose, and Transaction Processing databases.
The templates contain settings optimized for workload. Click Show Details to see the configuration for each type of database. Choose the template suited to the type of workload your database will support. If you are not sure which to choose, select the default General Purpose template.
For more complex environments, you can select the Custom Database option. This option results in a more extensive interview, which means that it will take longer to create your database because a database creation script must be run.
For more information about using database templates, see "Managing Templates with DBCA".
In the Global Database Name box, enter the database name in the form database_name.domain_name.
In the SID box, enter the Oracle system identifier. The SID defaults to the database name and uniquely identifies the instance that runs the database.
Use this window to set up your database so it can be managed with Oracle Enterprise Manager, which provides Web-based management tools for individual databases, as well as central management tools for managing your entire Oracle environment.
Check Configure the Database with Enterprise Manager to use Enterprise Manager. Select one of the following options:
If the Oracle Management Agent has been installed on your host computer, then you have the option of selecting central management by selecting Use Grid Control for Database Management. If you select this type of management, you must also indicate which management service to use in the drop-down menu.
Select Use Database Control for Database Management to manage your database locally. If you choose this option, you can additionally check Enable Email Notifications for Oracle to email you alerts regarding potential problems, and check Enable Daily Backup. Click Help for more information about these options.
In this window, you specify the passwords for the administrative accounts such as SYS
and SYSTEM
. Select one of the following options:
Select Use the Same Password for All Accounts and enter the password to use the same password for all accounts.
Select Use Different Passwords and specify passwords individually.
Specify the type of storage mechanism you would like your database to use. For more information, refer to "Installation Choices" earlier in this chapter.
In this window, you specify the Oracle home and directory path in which to install the Oracle software. Choose one of the following:
Use Database File Locations from Template—Selecting this option instructs the DBCA to use the directory information as specified in the template. If you choose this option, you will have an opportunity later to make modifications to database filenames and locations.
Use Common Location for All Database Files—This option requires you to specify a new directory for the Oracle home. All the database files will be created in this location. If you choose this option, you will have an opportunity later to make modifications to database filenames and locations.
Use Oracle-Managed Files—Select this option to eliminate the need for the DBA to directly manage operating system files comprising an Oracle database. You specify default location called a database area for all your files. Oracle thereafter automatically creates and deletes files in this location as required. You also have the option to create multiple copies of your redo and online log files by selecting Multiplex Redo Logs and Control Files. To learn more about redo logs and control files, refer to Chapter 9, "Performing Backup and Recovery".
Selecting this option enables you to delegate the complete management of database files to the database. You no longer need to specify the filenames, location, or their sizes.
When you create a new database, it is important to configure the database so you can recover your data in the event of a system failure. You can select the following options:
Choose Specify Flash Recovery Area to specify a backup and recovery area and specify its directory location and size. You can use variables to identify some standard locations. To review or add additional locations, click File Location Variables at the bottom of the window.
Check Enable Archiving to enable archiving of database redo logs, which can be used to recover a database. Selecting this option is the same as enabling Archive Log Mode in Oracle Enterprise Manager or running the database in ARCHIVELOG
mode. You can accept the default archive mode settings or change them by selecting Edit Archive Mode Parameters.
Oracle recommends you select Enable Archiving. Selecting this option provides better protection for your database in the case of software or hardware failure. If you do not select this option now, you can set up archive log mode later. See "Configuring Your Database for Basic Backup and Recovery".
In the Sample Schemas tab, check Sample Schemas to include the Sample Schemas (EXAMPLE
) tablespace in your database. The Sample Schemas provide a common platform for examples. Oracle books and educational materials contain examples based upon the Sample Schemas. Oracle recommends they be included in your database.
In the Custom Scripts tab, you can specify one or more SQL scripts to run after your database is created. Scripts are useful for performing post-installation tasks, such as loading custom schemas. To specify scripts, check Run the following scripts; otherwise accept the default No scripts to run. Note that if you choose to run scripts after installation, your scripts must include a connect string that identifies the database. Click Help for more information.
The links on this window provide access to windows that enable you change default initialization parameter settings. These parameters fall into the following categories:
Use this window to set the initialization parameters that control how the database manages its memory usage. You can choose from one of the following approaches to memory management:
Typical—requires little configuration, and allocates memory as a percentage of total overall physical system memory. To use this method, select Typical and enter a percentage value. Click Show Memory Distribution to see how much memory the Assistant assigns to the System Global Area (SGA) and the Program Global Area (PGA). To learn more about PGA and SGA, refer to "Managing Memory Parameters" in Chapter 5, "Managing the Oracle Instance".
Custom—requires more configuration, but gives you more control over how the database uses system memory. This option is meant for more experienced database administrators. You can directly specify memory sizes for the SGA and PGA and their sub-structures, such as the shared pool and buffer cache.
Select one of the following options:
Select Automatic to allocate specific amounts of memory to SGA and PGA.
Select Manual and enter specific values for each SGA component to customize how the SGA memory is distributed among the SGA memory substructures.
To customize how the SGA memory is distributed among the SGA memory substructures, select Manual and enter specific values for each SGA component. For a complete description of these memory areas, click Help.
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.
In the Block Size list, enter the size in bytes or accept the default. Oracle database data is stored in these blocks. One data block corresponds to a specific number of bytes of physical space on disk. While using pre-defined templates, this field is not enabled since the database will be created with the default block size of 8 KB. But while using the custom option, you can change block size. Selecting a block size other than the default 8 KB value requires advanced knowledge and should only be done when absolutely required.
In the Processes field, specify the maximum number of processes that can simultaneously connect to the database. Enter the number or accept the default of 150. The default value for this parameter is good enough for many environments.The value should be 6 or greater. This value should allow for all background processes, such as locks and parallel execution processes.
Use this window to define the character sets used by your database. Character sets are the encoding schemes used to display characters on your computer screen. Choosing a character set determines what languages can be represented in the database.
For Database Character Set, select from one of the following options:
Use the Default--Select this option if you need to support only the language currently used by the operating system for all your database users and your database applications.
Use Unicode (AL32UTF8)--Select this option if you need to support multiple languages for your database users and your database applications.
Choose from the list of character sets--Select this option if you want the Oracle Database to use a character set other than the default character set used by the operating system.
In the National Character Set list, select a character set or accept the default. The national character set is an alternative character set that enables you to store Unicode characters in a database that does not have a Unicode database character set. Another reason for choosing a national character set is that programming in the national character set might be easier.
In the Default Language 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 writing direction (left or right).
In the Default Date Format list, select a date format or accept the default. The default date format determines the convention for displaying the hour, day, month, and year. For example in the United Kingdom, the date format is DD-MM-YYYY.
Use this window to select the database mode. You can run the database in either of the following modes:
Select Dedicated Server Mode to allow a dedicated server process for each user process. Select this option when the number of total clients is expected to be small, or when database clients will make persistent, long-running requests to the database.
Select Shared Server Mode to allow several client connections to share a database-allocated pool of resources. Use this mode when a large number of users need to connect to the database. It is also useful when database memory is limited and for better performance because you can have more client connections to the database than in dedicated server mode with the same memory. If you choose shared server mode, then you must also indicate the number of server processes you want to create when an instance is started up. For more information about setting this parameter, click Help.
A tree listing displays the storage structure of your database (control files, datafiles, redo log groups, and so forth). If you are not satisfied with the storage structure or parameters, then you can make changes. You can create a new object with Create and delete existing objects with Delete.
Note that if you selected one of the preconfigured templates for a database, then you cannot add or remove control files, datafiles, or undo segments.
Check any of the following options:
Create Database—Check to create your database at this time.
Save as a Database Template—Check to save the database definition as a template to use at another time.
Generate Database Creation Scripts—Check to generate a SQL database creation script that you can run at a later time.
In the Operations window, select Configure Database Options to change various aspects of your database configuration. For example, you can change your configuration from a dedicated server to a shared server. You can add database options that have not been previously configured for use with your database, for example, Oracle Label Security or Oracle OLAP.
In the Operations window, select Delete a Database to remove a database from the system. When you select this option, DBCA deletes all the files associated with this database. On Windows, any associated services are also deleted.
DBCA templates are XML files that contain information required to create a database. Templates are used in DBCA to create new databases and clone existing databases. The information in templates includes database options, initialization parameters, and storage attributes (for datafiles, tablespaces, control files, and online redo logs).
Templates can be used just like scripts, but they are more powerful than scripts because you have the option of cloning a database. Cloning saves time because copying an already created seed database's files to the correct locations takes less time than creating them as new.
Templates are stored in the following directory:
ORACLE_HOME/assistants/dbca/templates
Using templates has the following advantages:
They save you time. If you use a template you do not have to define the database.
By creating a template containing your database settings, you can easily create a duplicate database without specifying parameters twice.
They are easily edited. You can quickly change database options from the template settings.
Templates are easy to share. They can be copied from one machine to another.
Templates are divided into the following types:
Seed templates
Non-seed templates
The characteristics of each are shown in Table 2-1.
Table 2-1 DBCA Template Types
Type | File Extension | Include Datafiles? | Database Structure |
---|---|---|---|
Seed | .dbc |
Yes | This type of template contains both the structure and the physical datafiles of an existing (seed) database. When you select a seed template, database creation is faster because the physical files and schema of the database have already been created. Your database starts as a copy of the seed database, rather than having to be built.
You can change only the following:
Other changes can be made after database creation using custom scripts that can be invoked by DBCA, command-line SQL statements, or the Oracle Enterprise Manager. The datafiles and online redo logs for the seed database are stored in a compressed format in another file with a |
Non-seed | .dbt |
No | This type of template is used to create a new database from scratch. It contains the characteristics of the database to be created. Non-seed templates are more flexible than their seed counterparts because all datafiles and online redo logs are created to your specification (not copied), and names, sizes, and other attributes can be changed as required. |
Oracle provides templates for the environments shown in Table 2-2.
Table 2-2 DBCA Template Environments
Environment | Description of Environment |
---|---|
Data Warehouse | Users perform numerous, complex queries that process large volumes of data. Response time, accuracy, and availability are key issues.
These queries (typically read-only) range from a simple fetch of a few records to numerous complex queries that sort thousands of records from many different tables. |
Transaction Processing | Many concurrent users performing numerous transactions requiring rapid access to data. Availability, speed, concurrence, and recoverability are key issues.
Transactions consist of reading ( |
General Purpose | This template creates a database designed for general purpose usage. It combines features of both the DSS and OLTP database templates. |
Custom Database | This template allows you maximum flexibility in defining a database. |
The Template Management window provides you with the option of creating or deleting a template. The DBCA saves templates as XML files.
To create a database template, select one of the following options:
From an existing template
Using an existing template, you can create a new template based on the pre-defined 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 about an existing database, including database options, tablespaces, datafiles, and initialization parameters specified in the source database. User-defined schema and their data will not be part of the created template. The source database can be either local or remote. You should choose this option when you want the new database to be structurally alike the source database and not contain the same data as contained by the source database.
From an existing database (structure as well as data)
You can create a new template that has both the structural information and physical datafiles of an existing database. Databases created using such a template are identical to the source database. User-defined schema and their data will be part of the created template. The source database must be local. You should choose the option when you want to create an exact replica of the source database which is both structurally alike as well as contains the same data as that of the source database.
When creating templates from existing databases, you can optionally choose to translate file paths into OFA (Optimal Flexible Architecture) or maintain existing file paths. OFA is recommended if the machine on which you plan to create the database using the template has a different directory structure. Non-OFA can be used if the target machine has a similar directory structure.
In the Operations window, select Configure Automatic Storage Management to configure ASM. For a brief overview of ASM, see "Advanced Installation Choices". For more detailed information, see Appendix A, "Automatic Storage Management" and Oracle Database Administrator's Guide.
Perhaps your task is not to create a new database, but to upgrade an existing database. A database upgrade is necessary when you have an older database such as Oracle9i and need to upgrade it to the current release. Oracle Database provides a tool called the Database Upgrade Assistant (DBUA) that enables you to upgrade an existing database.
The Database Upgrade Assistant (DBUA) interactively steps you through the upgrade process and configures the database for the new Oracle Database 10g release. The DBUA automates the upgrade process by performing all of the tasks normally performed manually. The DBUA makes appropriate recommendations for configuration options such as tablespaces and redo logs. You can then act on these recommendations.
The DBUA provides support for Real Application Clusters (RAC) and Automatic Storage Management (ASM).
The Database Upgrade Assistant does not begin the upgrade until it completes all of the following pre-upgrade steps:
Checks for any invalid user accounts or roles
Checks for any invalid datatypes or invalid objects
Checks for any desupported character sets
Checks for adequate resources, including rollback segments, tablespaces, and free disk space
Checks for any missing SQL scripts needed for the upgrade
Backs up all necessary files (optional)
The Database Upgrade Assistant automatically performs the following tasks:
Modifies or creates new required tablespaces
Invokes the appropriate upgrade scripts
Archives redo logs
Disables archiving during the upgrade phase
While the upgrade is running, the DBUA shows the upgrade progress for each component. The DBUA writes detailed trace and log files and produces a complete HTML report for later reference. To enhance security, the DBUA automatically locks new user accounts in the upgraded database. The DBUA then proceeds to create new configuration files (initialization parameter and listener files) in the new Oracle home.
The Database Upgrade Assistant is fully compliant with the Real Application Clusters (RAC) environment. In a RAC environment, the DBUA upgrades all the database and configuration files on all nodes in the cluster.
Note: On Windows operating systems, the DBUA does not support a direct upgrade of Oracle Parallel Server version 8.1.7 databases to Oracle Database 10g with RAC. First, manually upgrade the Oracle Parallel Server database to Oracle Real Application Clusters Oracle9i release 2 (9.2), and then upgrade it to Oracle Database 10g with Real Application Clusters (RAC) using the DBUA. |
The Database Upgrade Assistant supports the following versions of the Oracle Database for upgrading to Oracle Database 10g:
Oracle database version 8.0.6 (single instance databases only)
Oracle8i Release 8.1.7 (single instance and Real Application Clusters databases)
Oracle9i Release 1 (9.0.1) (single instance and Real Application Clusters databases)
Oracle9i Release 9.2.0 (single instance and Real Application Cluster databases)
If your database version is not in this list, you need to upgrade first to the closest release as listed. You can then upgrade the database to the current release.
During installation, if you install software only and specify that you are upgrading your database to the new Oracle release, then the Database Upgrade Assistant is launched automatically at the end of the software install. You can then continue as described in "Upgrading the Database Using the Database Upgrade Assistant".
If you perform a software-only install and do not upgrade your database at that time, then you can do so later by launching the DBUA.
Be aware of the following before you begin using the DBUA:
You must run the Oracle Net Configuration Assistant before running the DBUA.
If the database instance is not running, the DBUA will try to start the instance with the default initialization parameter file. If that fails, you will be prompted to provide the name of the correct initialization parameter file or to start the instance. If the instance is already up and running, the DBUA connects to it.
Note: If you stop the upgrade, but do not restore the database, then you should not restart the DBUA until you start up the existing database inUPGRADE mode using the 10.2 server. You cannot go back to the original server unless you restore your database.
If you restore your database manually (not using the DBUA), then remove the following file before starting the DBUA: |
To launch the DBUA on the Windows operating system choose the following menu option:
Start > Programs > Oracle - HOME_NAME > Configuration and Migration Tools > Database Upgrade Assistant
To launch the DBUA on a UNIX or Linux operating system, enter the following at a command prompt:
dbua
This command is typically found in your $ORACLE_HOME/bin
directory.
When the DBUA starts, the Welcome screen appears. At the Welcome screen, you may begin the upgrade process, as described in the following section.
Complete the following steps to upgrade a database using the Database Upgrade Assistant:
At the Welcome screen of the DBUA make sure the database being upgraded meets the specified conditions. Then, click Next.
If you need help at any screen or want to consult more documentation about the Database Upgrade Assistant, then click the Help button to open the online help.
If an ASM instance is detected on the system, then the Upgrade Operations page is displayed. From this page you can choose to upgrade only the ASM instance or the database. If you choose to upgrade the database and if the database is using ASM, then the DBUA will prompt you whether to upgrade the ASM instance along with the database. Oracle recommends that you upgrade the database and ASM in separate DBUA sessions, in separate Oracle homes.
At the Selecting a Database Instance screen, select the database you want to upgrade from the Available Databases table. Then, click Next.
You can select only one database at a time. If you are running the Database Upgrade Assistant from a user account that does not have SYSDBA
privileges, then enter the user name and password credentials to enable SYSDBA
privileges for the selected database.
The Database Upgrade Assistant analyzes the database, performing pre-upgrade checks and displaying warnings as necessary:
It checks for any online redo log files whose size is less than 4 MB. If such files are found, then the Database Upgrade Assistant gives the option to drop or create new online redo log files.
It checks the initialization parameter file for any obsolete or deprecated initialization parameters.
At the Creating the SYSAUX Tablespace screen, specify the attributes for the SYSAUX
tablespace, which is added automatically to all new Oracle Database 10g databases you create. Then, click Next.
Many of the attributes of the SYSAUX
tablespace are set automatically and cannot be modified. For example, the SYSAUX
tablespace is set to use Automatic Segment-Space Management. Nevertheless, you can specify the location of the data file, the default size of the SYSAUX
tablespace, and its autoextend attributes.
Note: If you specify an existing datafile for theSYSAUX tablespace, then you must select Reuse Existing File Name. Otherwise, the DBUA alerts you to the fact that the file already exists. |
At the Recompiling Invalid Objects screen, decide whether you want the Database Upgrade Assistant to recompile all invalid PL/SQL modules after the upgrade is complete. Then, click Next.
When you upgrade a database to the new Oracle Database 10g release, many of the PL/SQL modules in your database become invalid. As a result, all existing PL/SQL modules in an INVALID
state must be recompiled, such as packages, procedures, types, and so on.
By default, the Oracle Database recompiles invalid PL/SQL modules as they are used. For example, if an invalid PL/SQL module is called, it is recompiled before it is executed. The time it takes to recompile the module can result in poor performance as you begin to use your newly upgraded database.
To eliminate these performance issues, select Recompile invalid objects at the end of upgrade. When you select this option, the DBUA recompiles all the invalid PL/SQL modules immediately after the upgrade is performed. This action ensures that you will not experience performance issues when you begin using your newly upgraded database.
Note: Selecting Recompile invalid objects at the end of upgrade is equivalent to running theORACLE_HOME /rdbms/admin/utlrp.sql script, which is used to recompile stored PL/SQL and Java code. |
The task of recompiling all the invalid PL/SQL modules in your database can take a long time and increase the time it takes to complete your database upgrade. If you have multiple CPUs, then you can shorten the time for this task by using parallel processing on your available CPUs. If you have multiple CPUs available, then the DBUA automatically adds an additional section to the Recompile Invalid Objects screen and automatically determines the number of available CPUs.
If the database is in ARCHIVELOG
mode, then the DBUA gives you the choice of changing it to NOARCHIVELOG
mode.
The DBUA also provides a recommended degree of parallelism, which determines how many parallel processes are used to recompile invalid PL/SQL modules. Specifically, the DBUA sets the degree of parallelism to one less than the number of available CPUs. For example, if you have three CPUs available for processing, then the DBUA selects 2 from the Degree of Parallelism menu. You can adjust this default value by selecting a new value from the Degree of Parallelism menu.
At the Choosing a Database Backup Procedure screen, specify whether or not you want the DBUA to back up your database for you. Then, click Next.
If you choose not to use the DBUA for your backup, then it is assumed that you have already backed up your database using your own backup procedures. It is strongly recommended that you back up your database before the upgrade. If errors occur during the upgrade, then you may need to restore the database from the backup.
Note: The DBUA does not back up ASM databases. You must manually back them up on your own. |
If you use the DBUA to back up your database, then the DBUA makes a copy of all database files in the directory that you specify in the Backup Directory field. The DBUA performs this consistent backup automatically after it shuts down the database and before it begins the upgrade process. The backup does not compress the database files; the backup directory must be a valid file system path. You cannot specify a raw device for the cold backup files.
In addition, the DBUA creates a batch file in the specified directory. You can use this batch file to restore the database files:
On Windows operating systems, the file is called db_name
_restore.bat
.
On UNIX platforms, the file is called db_name
_restore.sh
.
Note: The Management Options screen described in this step is not displayed if a release 10.1 database is already being monitored with Enterprise Manager.
At the Management Options screen, you have the option of setting up your database so it can be managed with Enterprise Manager.
When you run the DBUA, the assistant checks to see if the Oracle Management Agent has been installed on the host computer. If the assistant locates an Oracle Management Agent, select the Grid Control option and select an Oracle Management Service from the list. When you finish installing the Oracle Database, the database is automatically available as a managed target within the Oracle Enterprise Manager Grid Control.
If you are not centrally managing your Oracle environment, you can still use Enterprise Manager to manage your database. When you install an Oracle Database, you automatically install the Oracle Enterprise Manager Database Control, which provides Web-based features for monitoring and administering the single-instance or cluster database you are installing.
To configure the database so it can be managed with the Oracle Enterprise Manager Database Control, select the Database Control option.
When you select the Database Control management option, you can configure Enterprise Manager so that E-mail notifications will be enabled immediately upon installation.
Select Enable E-mail Notifications to enable the SYSMAN user (the default Super Administrator and owner of the Management Repository schema) to receive E-mail notification when a metric for a specified condition reaches a critical or warning threshold. For example, Enterprise Manager can send an E-mail when a target goes down or when there are database space usage problems.
If you select the Database Control management option, then you can also enable automatic daily backups of your entire database.
Select Enable Daily Backups to use the Oracle-suggested backup strategy to back up your entire database with a minimum amount of configuration. Later, you can use Enterprise Manager to customize your backup strategy further.
When you select this option, Enterprise Manager will be configured to back up your database, based on the scheduled start time you enter on this window, immediately after you finish installing the Oracle Database. Enterprise Manager backs up the database to the Flash Recovery Area that you specify later on the Recovery Configuration screen of the DBUA.
After you have made your choices, click Next.
At the Database Credentials screen, secure your database with passwords for the Enterprise Manager accounts. You can set a single password, which will be applied to each of the listed Enterprise Manager user accounts, or enhance the security of the accounts by providing unique passwords for each user.
At the Recovery Configuration screen, specify a flash recovery area and enable archiving. When you are managing your database, it is important to configure the database so you can recover your data in the event of a system failure.
The Flash Recovery Area can be used to recover data that would otherwise be lost during a system failure; this location is also used by Enterprise Manager if you have enabled local management and daily backups on the Management Options screen shown previously in the DBUA.
At the Network Configuration for the database screen, you have two tabs:
The Listeners tab is displayed if you have more than one listener in the release 10.2 Oracle home. Select the listeners in the release 10.2 Oracle home for which you would like to register the upgraded database.
The Directory Service tab is displayed if you have directory services configured in the release 10.2 Oracle home. You can select to either register or not register the upgraded database with the directory service.
At the Summary screen, make sure all of the specifications are correct. If anything is incorrect, then click Back until you can correct the specification. If everything is correct, then click Finish.
The Database Upgrade Assistant lists the initialization parameters that will be set for the database during the upgrade. The COMPATIBLE
initialization parameter will be set to at least 9.2.0
.
A Progress dialog appears and the DBUA begins to perform the upgrade.
You may encounter error messages with Ignore and Abort choices. If other errors appear, then you must address them accordingly. If an error is severe and cannot be handled during the upgrade, then you have the following choices:
If Ignore is presented as a choice in the message, then clicking the button ignores the error and proceeds with the upgrade. The errors ignored are logged and shown later in the summary.
Ignoring the error causes the DBUA to display the step as skipped and move on to the next step in the upgrade, ignoring this and any dependent steps. After the upgrade is complete, you can fix the problem, restart the DBUA, and complete the skipped steps.
If Ignore is not presented as a choice in the message, then you need to stop the process by clicking the Abort button.
This action stops the upgrade process. The DBUA prompts you to restore the database if the database backup was taken by the DBUA.
After the database has been restored, you need to correct the cause of the error and restart the DBUA to perform the upgrade again.
If you do not want to restore the database, then the DBUA leaves the database in its present state so that you can proceed with a manual upgrade.
After the upgrade has completed, the following message is displayed in the Progress dialog:
Upgrade has been completed. Click the "OK" button to see the results of the upgrade.
Click the OK button.
At the Checking Upgrade Results screen, you can examine the results of the upgrade, manage the passwords in the upgraded database, and, if necessary, restore the original database settings.
The upgrade results summary includes a description of the original and upgraded databases and changes made to the initialization parameters. The upgrade results also include a Step Execution Summary that describes the steps performed during the database upgrade. For each step in the process, the summary provides the step name, the log file for the step, and the status. In some cases, you can click the status to display details about the execution step. The Step Execution Summary also includes the directory where the various log files are stored after the upgrade. You can examine any of these log files to obtain more details about the upgrade process.
Note: An HTML version of the Upgrade Results is also saved in the log files directory. |
The Password Management section of the screen enables you to unlock and set passwords for various users in the newly upgraded database. Click Configure Database Passwords to display the Password Management dialog box. The Password Management dialog box enables you to change the default password for a user after you upgrade the database. For security reasons, all users are locked except for the following users:
SYS
SYSTEM
If you have enabled Local Management with Enterprise Manager, then the SYSMAN
and DBSNMP
accounts are also unlocked. These accounts provide Enterprise Manager with access to the database so it can gather monitoring data and so you can perform administration tasks with Enterprise Manager.
If you have enabled Central Management with Enterprise Manager, then the DBSNMP
account is unlocked, as well as the SYS
and SYSTEM
user accounts.
Note: To prevent unauthorized use of the database, you should change all user passwords immediately after you upgrade your database. |
If you are not satisfied with the upgrade results, then click Restore. Depending on the method you used to back up your database, the restore operation performs one of the following tasks:
If you used the DBUA to back up your database, then clicking Restore restores the original database and the original database settings from the backup.
If you used your own backup procedure to back up the database, then clicking Restore restores only the original database settings. To restore the database itself, restore the backup you created with your own backup utilities.
If you are satisfied with the upgrade results, then click Exit to quit the DBUA and use your newly upgraded database. The DBUA removes the entry of the upgraded database from the old listener.ora
file and reloads the listener of the old database.
At the Changes in Default Behavior screen, the DBUA displays changes in behavior of Oracle Database 10g from that of previous releases. In some cases the default values of some initialization parameters have changed. In other cases some new behavior or requirement has been introduced that may affect current scripts or applications.
See the Oracle Database Upgrade Guide for information on additional tasks that should be completed after upgrading a database.
WARNING: If you retain the old Oracle software, then never start the upgraded database with the old Oracle software. Only start the database with the executables in the new Oracle Database installation. Also, before you remove the old Oracle environment, make sure you relocate any datafiles in that environment to the new Oracle Database environment. See the Oracle Database Administrator's Guide for information about relocating datafiles. |
Oracle by Example (OBE) has a series on the Oracle Database 2 Day DBA book. This OBE steps you through the tasks in this chapter and includes annotated screen shots.
To view the Installation OBE, point your browser to the following location:
http://www.oracle.com/technology/obe/10gr2_2day_dba/install/install.htm