Skip Headers

Oracle® Database 2 Day DBA
10g Release 1 (10.1)

Part Number B10742-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

2 Installing Oracle and Building the Database

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:

Overview of Installation

To install your Oracle software you use the Oracle Universal Installer (OUI). The Oracle Universal Installer is a 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.

Checking Prerequisites

Before the installation process, Oracle performs a number of automated prerequisite checks to ensure that your machine fulfills the basic hardware and software requirements for an Oracle installation. If your machine does not meet any of the requirements, an error message is displayed. The requirements may vary somewhat depending upon the type of machine and operation system you are running, but some examples of prerequisite checks include:

  • A minimum of 512 MB of memory is available.

  • Sufficient paging space is available.

  • Appropriate operating system service packs or patches are installed.

  • Appropriate files 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:

Your Oracle operating system-specific documentation if you experience problems and need more information about exact requirements.

Installation Choices

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 pages depends on your operating system.

The installation choices you can make are divided into basic and advanced. During a Windows basic installation, you need only make basic choices. For all other cases, including Windows advanced installation and Linux and Unix installations, you make both basic and advanced choices.

Basic Installation Choices

When you install Oracle during basic and advanced installations, you make the following choices. Note that the basic installation is available only on Windows.

  • What database product do you want to install?

    You can install one of the following:

    • Oracle 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.

    • Oracle 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.

    If you want a preconfigured database installed, you can select one of the following database types, optimized according to usage:

    • General Purpose

    • Transaction Processing

    • Data Warehouse

    If you want to create an custom database where you configure your own database structure, you can 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 which uniquely identifies 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 a Windows basic installation, Oracle automatically installs the sample schemas. Many of the examples in the documentation are based on the sample schemas. Installing sample schemas is an option only during Windows advanced installations and installations on Linux and Unix. See "Advanced Installation Choices".

    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.

Advanced Installation Choices

During Windows advanced installation and installation on Linux and Unix operating systems, you are prompted to make the choices listed in this section, in addition the basic options. The installation process provides defaults for every choice.

Note that when you run a Windows basic installation, you are not prompted to make these choices, as the defaults are used.

The options you have during an advanced installation are as follows:

  • Install the sample schemas?

    In order 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 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. However, sample schemas are installed by default during basic installation.

  • What kind of storage mechanism do you want your database to use?

    A database comprises several files which stores the user data, database meta data, as well as information required to recover from failures. As an administrator, you decide what kind of storage sub-system to locate these files on.You can select from the following options:

    • File System—This is the default. 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 can create and manage the actual files.

    • Automatic Storage Management—This is new functionality that 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 done automatically. Automatic Storage Management requires a separate instance to configure and manage disks groups. You are guided through the creation and launching of an Automatic Storage Management instance and its components by the database installation process. For more information, see Oracle Database Administrator's Guide.

    • Raw Devices—Enables you to manage your storage devices outside of the operating system file system by providing Oracle with unformatted physical disk space called raw devices. This method is primarily used in Oracle Real Application Clusters environments. If you selected this option, you must ensure that the raw devices have been created using an operating system command, and that they are not being used for any other purposes or by other Oracle databases.

    If you are not certain of which option to use, go with the default selection of File System.

  • 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 machine. If no such agent is found, 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 page 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, that will be done immediately after the software installation is complete.

Installing Oracle Software and Database

This section describes the installation steps. Most steps are common to all platforms and involves running the Oracle Universal Installer. Platform specific steps are noted.

On Windows, you have an additional option of a basic installation which minimizes user input.

The following steps provide a summary of the installation process. For further assistance along the way, consult the online help or your operating system-specific installation documentation.

  1. 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 specific documentation or contact your system administrator to find out if you have the necessary privileges to install new software.

  2. Insert the distribution CD for the database into your CD drive. The Autorun window will appear automatically. Click Install/Deinstall Products.

    If downloading from Oracle's download site, follow the instructions given on the Web site.

  3. The Oracle Universal Installer Welcome page appears. Click Next to begin the installation of your software. Windows users can proceed to Step 4. Linux and Unix users can proceed to Step 5.

  4. Windows Only. The Windows installation gives you two installation choices:

    • Basic Installation—Select this installation method if you want to quickly install Oracle Database 10g. This method requires minimal user input. It installs the software and optionally creates a general-purpose database using the information you specify.

      For Basic installation, you specify:

      • Oracle Home Location—Specify the directory where you want 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 Oracle Enterprise Edition, Oracle Standard Edition or Custom install. Refer to "Basic Installation Choices".

      • Create Starter Database —Specify whether to create a starter database during the installation. Oracle recommends that you create a starter database for first-time installations. You must specify a Global Database Name, Database Password for the SYS and SYSTEM administrator accounts. The Global Database Name is described in "Basic Installation Choices".

      To start the Basic Installation, click Next. A summary screen appears listing the products to be installed. Click Next. The installation starts.

      If you are creating starter database, the Database Configuration Assistant starts automatically. At the end of database creation, you are prompted to unlock user accounts, which makes the accounts accessible. Since the SYS and SYSTEM accounts are already unlocked, click OK to bypass password management.Your installation and database creation is now complete.

      A browser is started automatically, prompting you to log in to Enterprise Manager. You can use the SYS user and password you specified, and connect as SYSDBA. You use Enterprise Manager to perform common database administration tasks. See Chapter 3, " Getting Started with Oracle Enterprise Manager ".

    • Advanced Installation—Select this option if you want to customize your installation. For example, you use this method to install Oracle Real Application Clusters, to upgrade a database, to configure Automatic Storage Management, or to configure automated backups. If you select this option, the installation continues with Step 6.

  5. Linux and Unix Only. If this is the first time that you are installing any Oracle software on this machine, the following occurs:

    • The Specify Inventory Directory page 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 and 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 dialog page appears. You are asked to open a new terminal window, log in as root, and to run the orainstRoot.sh script. When the script finishes, return to the Oracle Universal Installer page and click Continue.

  6. The Specify File Locations page appears. Enter the Oracle home name and directory path in which to install the Oracle software, or accept the default, and then click Next.

    If an Oracle home already exists on your machine, Oracle suggests that home name and directory path for the installation. If that home is for a different release of Oracle, it is recommended that you not use this home, but instead specify a new home name and path.

  7. In the next two pages, select the following options:

    • Specify to install the Enterprise Edition or Standard Edition. Select Custom only for advanced environments. Refer to"Basic Installation Choices".

      On Windows, you have an additional option of Personal Edition, which is the same as Enterprise Edition, but supports only a single user development environment.

    • Select one of the three preconfigured database types to be installed: General Purpose, Transaction Processing, or Data Warehouse. Do not select Advanced at this time.

    • Specify that you want to Create a starter database. If you select Do not create a starter database, then you will not create a database at this time and must use the Database Configuration Assistant to create a database at a later time.

  8. You have provided enough information for installing the software. Now more information is required for the database to be installed. In the following series of pages you enter:

    • Database Naming—Enter a global database name and SID (system identifier). The Global Database Name is described in "Basic Installation Choices" on page 2-2.

    • Database Character Set—Accept the default, unless you are aware of another character set that you should be using.

    • Database Examples---You can install the sample schemas. Most examples in Oracle documentation and course material are based on the sample schemas. Oracle recommends that you install the sample schemas to complete the exercises in this book.

    • Database Management Option---You can manage your database and Enterprise Manager centrally using Oracle Enterprise Manager 10g Grid Control or locally using Oracle Enterprise Manager 10g Database Control. Select Use Database Control for Database Management. This is the recommended choice for first-time installation. Use Grid Control if you plan to manage more than one database from Enterprise Manager. For more information, see "Advanced Installation Choices"

    • Database File Storage—This is discussed in "Advanced Installation Choices".

    • Backup and Recovery Options—You can enable automated backups into a recovery area, or optionally, later create your own backup strategy.

    • Passwords for database administrative accounts—The SYS and SYSTEM accounts are the primary usernames for managing the database. The passwords that you assign should be revealed only to the highest level of administrators for your database.

    A summary page displays the components that are about to be installed. To start the installation, click Install. A progress bar tracks the progress of the installation.

  9. Linux and Unix only. A dialog page appears. Open a new terminal window, log in as root, and run the root.sh script. When the script finishes, return to the Oracle Universal Installer page and select Continue.

  10. At the end of the installation of the software, the Configuration Tools page appears. Allow the tools to install and start. They configure your network, start an Oracle Net Services listener process for connecting to the database, and create the database and configure management tools. Click Next.

  11. A page appears showing a progress bar for database creation. When database creation is done, an informational page appears that lists information about your database. Review this list. Click Password Management at the bottom of the page if you want to unlock or change passwords on database accounts.

  12. The Password Management page appears. Locked accounts cannot be accessed. Remove the check from the Lock Account column for any accounts you might want to use, and assign new passwords for them. If do not know which accounts to unlock, do nothing. These user accounts are explained in Chapter 7, " Administering Users and Security". You can unlock them later.

  13. After returning from the Password Management page, a final End of Installation page appears with important information about Web application port numbers.

The Oracle database software is now installed and you have a running database. A web browser window automatically opens pointing to the URL of local Database Control. You are prompted to enter your user name and password. You can enter username SYS and the associated password, and connect as SYSDBA.

Chapter 3, " Getting Started with Oracle Enterprise Manager " describes Enterprise Manager, the Web-based user interface for managing your database. This chapter includes topics such as shutting down and starting up your database.

Using DBCA to Create and Configure a Database

During installation, you can create and configure a new database. If you have already done so, you do not need to read this section and can skip to the next chapter.

However, if you choose to install software only and later create a database, or if you want to create additional databases using the release software that you just installed, you can do so by using the Database Configuration Assistant (DBCA). Other uses for DBCA are to delete a database, add options to a database, or to manage templates. A template is a definition of a database saved in an XML file format that can be used to create other databases.

Online help is available by clicking Help. It provides information that guides you in selecting configuration options.

Starting DBCA

To launch DBCA:

  1. Log onto your computer as a member of the administrative group that is authorized to install Oracle software and create and run the database.

  2. To launch DBCA on a Windows operating system select the following:

    Start > Programs > Oracle - home_name  Configuration and Migration Tools >
    Database Configuration Assistant
    
    

    To launch the DBCA on UNIX, or as another method on a Windows operating system, enter the following at a command prompt:

    dbca

    which is typically found in $ORACLE_HOME/bin. The Welcome page appears.

  3. Click Next to continue.

Using DBCA to Create a Database

Select Create a Database on the DBCA Operations page 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 pages of the wizard provide a default setting that you can accept. To accept all the default parameters, you can click Finish at any step.

Database Templates

This page enables you to select the type of database you want to create. By default, Oracle Corporation 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, select the default General Purpose template.

For more complex environments, you may want to select the Custom Database option. This will result in a more extensive interview and it will take longer to create your database, since a database creation script must be run.

For more information about using database templates, see "Managing Templates with DBCA" .

Database Identification

Enter the Global Database Name, in the form database_name.domain_name and SID (Oracle system identifier). The SID defaults to the database name and uniquely identifies the instance that runs the database.

Management Options

Use this page 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.

To use Enterprise Manager, check Configure the Database with Enterprise Manager.

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.

Otherwise, select Use Database Control for Database Management to manage your database locally. If you choose this option, you can additionally Enable Email Notifications for Oracle to email you alerts regarding potential problems, and Enable Daily Backup. Click Help for more information about these options.

Database Credentials

In this page, you specify the passwords for the administrative accounts such as SYS and SYSTEM. To use the same password for all accounts, specify Use the Same Password for All Accounts and enter the password.

Otherwise, specify Use Different Passwords and specify passwords individually.

Storage Options

Specify the type of storage mechanism you would like your database to use. For more information, refer to "Installation Choices" earlier in this chapter.

Database File Locations

In this page, 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. Even 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. Even 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 you, 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.

Recovery Configuration

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. Use this page to specify a flash recovery area and to enable archiving.

To specify a backup and recovery area, choose Specify Flash 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 page.

By checking Enable Archiving, you can enable archiving. This includes archiving 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".

Database Content

In the Sample Schemas property page, check Sample Schemas if you want 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 property page, you can specify one or more SQL scripts to run after your database is created. This is useful for performing post-installation tasks, such as loading custom schemas. To specify scripts, check Run the following scripts. 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.

Otherwise to run no script, accept the default No scripts to run.

Initialization Parameters

The links on this page provide access to pages that enable you change default initialization parameter settings. These parameters fall into the following categories:

Memory

Use this page to set the initialization parameters that control how the database manages its memory usage. You can choose from one of two 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.

To use this method, click Custom. To allocate specific amounts of memory to SGA and PGA, select Automatic. 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.

Sizing

In this property page, you specify the smallest block size and the maximum number of operating system user processes that can simultaneously connect to the database.

To specify block size, 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 8KB. 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.

To specify maximum number of processes that can simultaneously connect to the database, enter the number or accept the default. The value should be 6 or greater. This value should allow for all background processes, such as locks and parallel execution processes. The default value for this parameter is 150 which is good enough for many environments.

Character Sets

Use this page 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.

The national character set is an alternate 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. Select the National Character Set from the drop-down menu 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). Select the default language from the drop-down menu 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. Select the format from the drop-down menu or accept the default.

Connection Mode

Use this page to select the database mode. You can run the database in dedicated server mode or shared server mode.

In Dedicated Server Mode, there is 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.

In Shared Server Mode, several client connections 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, since you can have more client connections to the database than in dedicated server mode with the same memory. If you choose shared server mode, 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.

Database Storage

A tree listing shows you 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 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, you cannot add or remove control files, datafiles or rollback segments.

Creation Options

You have the option of creating your database at this time, or saving the database definition as a template to use at another time, or both.

Using DBCA to Delete a Database

To delete a database using DBCA, select Delete a database from the Operations page. When you select this option, DBCA deletes all the files associated with this database. On Windows, any associated services are also deleted.

Using DBCA to Configure Database Options

To change the database configuration, select Configure database options in a database from the Operations page. 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.

Managing Templates with DBCA

DBCA templates are XML files that contain information required to create a database. Templates are used in DBCA to create new databases and make clones of existing databases. The information in templates includes database options, initialization parameters, and storage attributes (for datafiles, tablespaces, control files and redo logs).

Templates can be used just like scripts, and they can be used in silent mode. But they are more powerful than scripts, because you have the option of cloning a database. This saves time in database creation, 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

Advantages of Using Templates

The following are some of the advantages of using templates:

  • 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.

Types of Templates

There are two types of templates:

  • Seed templates

  • Non-seed templates

The characteristics of each are shown in the following table:

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:

  • Name of the database

  • Destination of the datafiles

  • Number of control files

  • Number of redo log groups

  • Initialization parameters

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 redo logs for the seed database are stored in a compressed format in another file with a .dfj extension. The corresponding .dfj file's location is stored in the .dbc file.

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 redo logs are created to your specification (not copied), and names, sizes, and other attributes can be changed as required.

DBCA Templates Provided by Oracle

Oracle provides templates for the following 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 (SELECT statements), writing (INSERT and UPDATE statements), and deleting (DELETE statements) data in database tables.

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.

Creating Templates Using DBCA

The Template Management page provides you with the option of creating or deleting a template.

For creating a template, you have the following three 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 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--a seed database)

    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.

Oracle saves templates as XML files.

While 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.

Deleting DBCA Templates

The Template Management page also lets you delete existing templates. The DBCA displays a list of your current templates. You must select the template to delete. When you delete a template, it is no longer available for creating a new database or a new template.

Upgrading a Database

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 provides a tool for upgrading an existing database, called the Database Upgrade Assistant (DBUA).

Overview of the Database Upgrade Assistant

The Database Upgrade Assistant (DBUA) interactively steps you through the upgrade process and configures the database for the new Oracle Database 10g release. The Database Upgrade Assistant automates the upgrade process by performing all of the tasks normally performed manually. The Database Upgrade Assistant makes appropriate recommendations for configuration options such as tablespaces and redo logs. You can then act on these recommendations.

For example, the Database Upgrade Assistant recommends sizing information for the new SYSAUX tablespace, which is required in Oracle Database 10g.

Before the Upgrade

The Database Upgrade Assistant performs the following pre-upgrade steps:

  • It checks for any invalid user accounts or roles

  • It checks for any invalid datatypes

  • It checks for any desupported character sets

  • It checks for adequate resources, including rollback segments, tablespaces, and free disk space

  • It optionally backs up all necessary files

The Database Upgrade Assistant does not begin the upgrade until it completes all of the pre-upgrade steps.

During the Upgrade

The Database Upgrade Assistant automatically modifies or creates new required tablespaces, invokes the appropriate upgrade scripts, archives the redo logs, and disables archiving during the upgrade phase.

While the upgrade is running, the Database Upgrade Assistant shows the upgrade progress for each component. The Database Upgrade Assistant writes detailed trace and log files and produces a complete HTML report for later reference. To enhance security, the Database Upgrade Assistant automatically locks new user accounts in the upgraded database. The Database Upgrade Assistant then proceeds to create new configuration files (parameter and listener files) in the new Oracle home.

Real Application Clusters Support

The Database Upgrade Assistant is fully compliant with the Real Application Clusters (RAC) environment. In a RAC environment, the Database Upgrade Assistant upgrades all the database and configuration files on all nodes in the cluster.

Support for Silent Mode

The Database Upgrade Assistant supports a silent mode of operation where no user interface is presented to the user. Silent mode lets you use a single statement for the upgrade.

Oracle Database Version Restrictions

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.

Starting the Database Upgrade Assistant

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 and you can 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 Database Upgrade Assistant.

To launch the Database Upgrade Assistant on the Windows operating system choose:

Start > Programs > Oracle - home_name  Configuration and Migration Tools > Database Migration Assistant

To launch the Database Upgrade Assistant on a UNIX or Linux operating system enter the following at a command prompt:

dbua

typically found in your $ORACLE_HOME/bin directory.


See Also:

Oracle Database Upgrade Guide for information about Database Upgrade Assistant command line options

When the Database Upgrade Assistant starts, the Welcome page appears.

Upgrading the Database Using the Database Upgrade Assistant

Complete the following steps to upgrade a database using the Database Upgrade Assistant:

  1. At the Welcome page of the Database Upgrade Assistant, make sure the database being upgraded meets the specified conditions. Then, click Next.

    If you need help at any page or want to consult more documentation about the Database Upgrade Assistant, then click Help to open the online help.

  2. At the Select a Database page, select the database you want to upgrade. Then, click Next.

    You may need to provide a user name and password with SYSDBA privileges if you do not have operating system authentication.

  3. At the Sysaux page, give the related attributes for creation of a SYSAUX tablespace. Then, click Next.

  4. At the Recompiling Invalid Objects page, decide whether you want the Database Upgrade Assistant to recompile all invalid PL/SQL modules after the upgrade is complete. When you upgrade a database to the new Oracle Database 10g release, many of the PL/SQL modules in your database will 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 will first be recompiled before it is actually 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 Database Upgrade Assistant recompiles all the invalid PL/SQL modules immediately after the upgrade is performed. This will ensure that you will not experience any performance issues later, as you begin using your newly upgraded database.


    Note:

    Selecting Recompile invalid objects at the end of upgrade is equivalent to running the ORACLE_HOME/rdbms/admin/utlrp.sql script, which is used to recompile stored PL/SQL and Java code and is described in the Oracle Database Upgrade Guide.

    The task of recompiling all the invalid PL/SQL modules in your database can take a significant amount of time and increase the time it takes to complete your database upgrade. If you have multiple CPUs, then you can reduce the time it takes to perform this task by taking advantage of parallel processing on your available CPUs. If you have multiple CPUs available, then the Database Upgrade Assistant automatically adds an additional section to the Recompile Invalid Objects page and automatically determines the number of CPUs you have available.

    The Database Upgrade Assistant also provides a recommended degree of parallelism, which determines how many parallel processes are used to recompile your invalid PL/SQL modules. Specifically, the Database Upgrade Assistant sets the degree of parallelism to one less than the number of CPUs you have available. For example, if you have three CPUs available for processing, then the Database Upgrade Assistant 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.

  5. At the Management Options page, you have the option of setting up your database so it can be managed with Oracle Enterprise Manager. Oracle Enterprise Manager provides Web-based management tools for managing individual database instances, as well as central management tools for managing your entire Oracle environment, including multiple databases, hosts, application servers, and other components of your network.

    1. When you run the Database Upgrade Assistant, 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 drop-down list. When you finish installing the Oracle Database, the database will automatically be available as a managed target within the Oracle Enterprise Manager Grid Control.

    2. If you are not centrally managing your Oracle environment, you can still use Oracle 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 clustered 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.

    3. When you select the Database Control management option, you can configure Enterprise Manager so that email notifications will be enabled immediately upon installation.

      Select Enable Email Notifications if you want the SYSMAN user (the default Super Administrator and owner of the Management Repository schema) to receive email notification when a metric for a specified condition reaches a critical or warning threshold. For example, Enterprise Manager can send an email when a target goes down or when there are database space usage problems.

    4. If you select the Database Control management option, 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 Oracle 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 page, immediately after you finish installing the Oracle Database. Enterprise Manager will back up the database to the Flash Recovery Area that you specify later on the Recovery Configuration page of the Database Upgrade Assistant.

    5. After you have made your choices, click Next.

  6. At the Database Credentials page, 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.

  7. At the Recovery Configuration page, 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 page shown previously in the Database Upgrade Assistant.

  8. At the Backup page, you have two options:

    • Choose I have already backed up my database if you completed a backup before running the Database Upgrade Assistant.

    • Choose I would like this tool to back up the database if you did not complete a backup. If you choose this option, then you can select the backup directory by clicking Browse.

    After you have made your choice, click Next.

  9. At the Network Configuration for the database page, there are two property page options:

    • The Listeners property page is displayed if you have more than one listener in the new release's Oracle home. Select the listeners for which you would like to register the upgraded database.

    • The Directory Service property page shows up if you have directory service is configured in the new release's Oracle home. You can select to either register or not register the upgraded database with the directory service.

  10. At the Summary page, 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.

  11. The Database Upgrade Assistant lists the initialization parameters that will be set for the database during the upgrade. Click Upgrade.

    A Progress dialog appears and the Database Upgrade Assistant begins to perform the upgrade.

  12. During the upgrade, you may encounter error messages with Ignore and Abort choices. If other errors appear, than you must address them accordingly.

    • If Ignore is presented as a choice in the message, then clicking the button will ignore the current upgrade step.

      This causes the Database Upgrade Assistant to 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 Database Upgrade Assistant, and complete the ignored steps.

    • If Ignore is not presented as a choice in the message, then you need to terminate the process by clicking Abort.

      This will terminate the upgrade process. The Database Upgrade Assistant prompts you to restore the database if the database backup was taken by the Database Upgrade Assistant.

      After the database has been restored, you need to correct the cause of the error and restart the Database Upgrade Assistant to perform the upgrade again.

      If you do not want to restore the database, then the Database Upgrade Assistant leaves the database in its present state so that you can proceed with a manual upgrade.

  13. 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 OK.

  14. At the Results dialog, you can view the details of the upgrade. You can also unlock and set passwords to the user accounts.

    If you are not satisfied with the upgrade, then you can restore the database back to the previous release.

    If you are satisfied with the upgrade, then click Done.

  15. At the Changes in Default Behavior page, the Database Upgrade Assistant displays some 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/requirement has been introduced that may affect current scripts or applications.

  16. Perform the following actions, as necessary:

    1. Back up the database

    2. Change passwords for any new Oracle supplied administrative accounts.

    3. Migrate your traditional text initialization parameter file to a server parameter file, if you had not already done so in the previous release. This is not a required step, but using a server parameter file enables initialization parameter settings to be persistent across startup and shutdown and eliminates manual maintenance of initialization parameters. For more information, seeOracle Database Upgrade Guide.

    4. Adjust your parameter file for the new release.

Installation: Oracle by Example Series

Oracle by Example (OBE) has a series on the Oracle 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://otn.oracle.com/obe/2day_dba/install/install.htm