Thursday, September 6, 2007

Installing Oracle Database 10g

Installing Oracle Database 10g

Learning objective

After completing this topic, you should be able to install Oracle Database 10g on a UNIX operating system.

Exercise overview

In this exercise, you're required to install Oracle Database 10g on a Linux operating system.

This involves the following tasks:

  • configuring the Oracle install environment
  • running the root user script
  • configuring the installation
  • setting database passwords

Task 1: Configuring the Oracle install environment

The system administrator has set up the OS so that it is ready for the install, and the install media is staged at /stage/Disk1.

On running the Oracle Universal Installer (OUI) installation command, the Welcome page appears. You start the software installation by clicking Next.

At the prompt, complete the location of the inventory directory so that it's set to the oraInventory directory and then navigate to the next page of the OUI.

Steps list
Instructions
1. Type oraInventory in the Enter the full path of the Inventory Directory field.
2. Click Next.

Task 2: Running the root user script

The Oracle Universal Installer dialog box appears, prompting you to run the root user script.

To run the file, you leave the OUI and open a new terminal. In the new terminal, you enter the commands

su
oracle
cd /u01/app/oracle/oraInventory

Run the root user script.

Steps list
Instructions
1. Type orainstRoot.sh, and press Enter

Task 3: Configuring the installation

After running orainstRoot.sh, you return to the OUI and continue to the Specify File Locations page.

Accept the default source and destination file locations and select the install type best suited to online transaction processing. Choose the database configuration most appropriate for a wide range of standard tasks, and then specify Unicode Standard UFT-8 AL32UTF8 as the database character set. To complete the task, navigate to the Specify Database Schema Passwords page.

Steps list
Instructions
1. Click Next
2. Select the Enterprise Edition option, and click Next
3. Click Next
4. Click the General Purpose option, and click Next
5. Select Unicode Standard UFT-8 AL32UTF8 from the Database Character Set section drop-down menu
6. Click Next.

Task 4: Setting database passwords

You now need to configure passwords for the database schemas.

Specify "oracle" as the password for all administration accounts and then navigate to the Summary page of the OUI.

Steps list
Instructions
1. Select the Use the same password for all the accounts option
2. Type oracle in the Enter Password field
3. Type oracle in the Confirm Password field
4. Click Next

You can now view all the products and settings you chose for the installation. Once you have checked the summary, you can start the installation by clicking Install.

Configuring the Oracle Database 10g installation

Configuring the Oracle Database 10g installation

Learning objective

After completing this topic, you should be able to recognize how to configure the Oracle Database 10g installation.

1. Selecting database configurations

When configuring the Oracle Database 10g installation using the Oracle Universal Installer (OUI), you can choose from the following database templates:

  • General Purpose
  • Transaction Processing
  • Data Warehouse
  • Advanced
General Purpose
The General Purpose template is a starter database that you can use for a wide range of tasks.
Transaction Processing
The Transaction Processing template is a starter database that you can use for transaction-heavy applications.
Data Warehouse
The Data Warehouse template is a starter database that is optimized for data warehousing purposes.
Advanced
The Advanced template is a customizable starter database. This option provides total flexibility in the creation of the starter database, but takes longer to build.

Each of these templates includes preconfigured files that enable you to build your database quickly, except for the Advanced template, which takes longer to build.

To select a starter database, you first ensure that the Create a starter database option is selected.

In this example, you want to select a database template that can be used for a wide range of tasks.

Select the General Purpose option, and click Next.

This brings you to the Specify Database Configuration Options page.

If you choose to create a starter database, a series of pages prompt you for information to configure the starter database.

Note

If you decide not to create a starter database, the summary page displays next.

The Specify Database Configuration Options page asks you for information on the following:

  • database naming
  • database character set
  • database examples
database naming
The Database Naming section prompts you for the database name. The default name is orcl.
database character set
The Database Character Set section prompts you for the character set the database uses to store your data.

You can modify the character set at a later stage, but this can be time-consuming and may require downtime for your database.
database examples
The Database Examples section enables you to create the database with a set of optional sample schemas for demonstrations and training.

In this example, you choose to keep the default name orcl as the global database name.

You now want to select the database character set. The current setting - WE8ISO8859P1 - doesn't support the euro symbol (€), so you want to select a character set that does.

In the Database Character Set section, you select Unicode Standard UFT-8 AL32UTF8 from the drop-down menu.

Next you want to specify that your starter database be created with sample schemas.

In the Database Examples section, you select the Create database with sample schemas option.

You then click Next to continue.

This brings you to the Select Database Management Option page, where you can choose to manage the database centrally or locally.

Question

Match the database templates to a description of when to use them.

Options:

  1. General Purpose
  2. Transaction Processing
  3. Data Warehouse
  4. Advanced

Targets:

  1. A starter database used for data warehousing purposes
  2. A starter database used for a wide range of tasks
  3. A customizable starter database
  4. A starter database used for transaction-heavy applications

Answer

The Data Warehouse template is a starter database used for data warehousing purposes. The General Purpose template is a starter database used for a wide range of tasks. The Advanced template is a customizable starter database, and the Transaction Processing template can be used for transaction-heavy applications.

The General Purpose template is designed for general purpose usage, and has preconfigured files that enable you to build your database quickly.

The Transaction Processing option is optimized for transaction-heavy applications. It has preconfigured files to facilitate a speedy database build.

The Data Warehouse template is optimized for data warehouse applications. It has preconfigured files, enabling you to build your database quickly.

The Advanced option provides total flexibility in the creation of the starter database, but does take longer to build.

Question

Suppose you are installing an Oracle database using the OUI. You want to select a starter database suitable for your application, and specify the appropriate database configuration options. You have navigated through the OUI to the Select Database Configuration page.

This question requires you to select the database template suitable for transaction-heavy applications, and then choose the option that creates the database with sample schemas. Which option performs this task?

Options:

  1. In the Select Database Configuration page, you select the General Purpose option, and click Next. In the Database Examples section, you select the Create database with sample schemas option.
  2. In the Select Database Configuration page, you select the Transaction Processing option, and click Next. In the Database Examples section, you select the Create database with sample schemas option.

Answer

In the Select Database Configuration page, you select the Transaction Processing option, and click Next. In the Database Examples section, you select the Create database with sample schemas option.

2. Configuring storage, backup, recovery, and passwords

In the Select Database Management Option page, you can choose to manage your database using

  • Grid Control
  • Database Control
Grid Control
Grid control manages several databases, either on one machine or many machines.
Database Control
Database control manages a single database.

You accept the default option, which is database control, and click Next.

This brings you to the Specify Database File Storage Option page.Here you can choose a file storage mechanism for your database from the following:

  • File System
  • Automatic Storage Management (ASM)
  • Raw Devices
File System
The File System option allows you to specify the location of files in your OS-configured file system.
Automatic Storage Management (ASM)
The Automatic Storage Management (ASM) option creates and manages files automatically. It also provides for the use of mirroring and striping.
Raw Devices
The Raw Devices (Partitions) option supports disk partitions that don't contain file systems.

You shouldn't use this option unless you're familiar with using raw partitions.

For information on setting up and maintaining raw partitions, you can check your OS documentation.

You want to use the file system for your database storage.

You select the File System option, and click Next.

This brings you to the Specify Backup and Recovery Options page. Here you can choose to enable automated backups for your database files.

You should set up a backup plan at some stage, but you have the option to do so later by accepting the default, Do not enable Automated backups.

You choose to enable backups now. You select the Enable Automated Backups option and click Next to continue.

When you enable automated backups, you can either specify the recovery area location or choose to use ASM.

In this example, you enter

/home/oracle/product/10.1.0/
flash_recovery_area/
as the storage location for the backups.

You also specify the operating system credentials that the backup job uses. You enter oracle as the username and password, and then click Next.

This opens the Database Schema Passwords page, where you can provide passwords for the SYS, SYSTEM, SYSMAN, and DBSNMP administrative users.

You can provide a password for each user separately by selecting Use different passwords for these accounts and entering the relevant password in the Enter Password and Confirm Password fields.

Or you can provide one password for all. To do this, you select the Use the same password for all accounts option, enter a password, and confirm it for all administrative users.

In this example, you configure one password for all users and then click Next to continue.

The Summary page appears.

Here you can view all the products and settings you chose for the installation.

Question

Match each file storage mechanism to the correct description.

Options:

  1. File System
  2. ASM
  3. Raw Devices

Targets:

  1. Creates and manages files automatically
  2. Specifies disk partitions that don't contain file systems
  3. Specifies the location of files in your OS-configured file system

Answer

The ASM creates and manages files automatically. The Raw Devices option specifies disk partitions that don't contain file systems, and the File System option specifies the location of files in your OS-configured file system.

You can select File System or the other storage mechanisms on the Specify Database File Storage Option page of the OUI.

Automatic Storage Management (ASM) also provides support for mirroring and striping.

For information on setting up and maintaining raw partitions, you can check your OS documentation.

Question

Suppose you want to select appropriate storage mechanism and backup and recovery options for your application. You have navigated through the OUI to the Specify Database File Storage Option page.

This question requires you to select the file storage mechanism that creates and manages files automatically, and then enable automated backups. Which option performs this task?

Options:

  1. In the Specify Database File Storage Option page, you select the Automatic Storage Management (ASM) option, and click Next. In the Specify Backup and Recovery Options page, you select the Enable Automated Backups option.
  2. In the Specify Database File Storage Option page, you select the File System option, and click Next. In the Specify Backup and Recovery Options page, you select the Enable Automated Backups option.

Answer

In the Specify Database File Storage Option page, you select the Automatic Storage Management (ASM) option, and click Next. In the Specify Backup and Recovery Options page, you select the Enable Automated Backups option.

3. Completing the install

Once you have checked the summary details, the next step is to start the installation by clicking Install.

You can watch the progression of the installation on the Install page.

At the end of the install, the Configuration Assistants page displays the following configuration assistant options:

  • iSQL*Plus Configuration Assistant
  • Oracle Net Configuration Assistant
  • Oracle Database Configuration Assistant
iSQL*Plus Configuration Assistant
The iSQL*Plus Configuration Assistant configures the OC4J (Oracle Containers for Java) instance that iSQL*Plus uses. It also configures tools to connect to the Oracle database.
Oracle Net Configuration Assistant
The Oracle Net Configuration Assistant configures standard network components such as listener names and protocol addresses, naming methods for clients to resolve connect identifiers to connect descriptors, net service names in a tnsnames.ora file, and directory server usage.
Oracle Database Configuration Assistant
The Oracle Database Configuration Assistant creates the starter database you have selected.

The Database Configuration Assistant window appears, displaying the progress of the installation.

When the database has been created, the Database Configuration Assistant displays a summary of the database details.

You click OK to continue.

When installing on a Linux (or UNIX) OS, or if you didn't create a starter database, the OUI prompts you to run the script root.sh as root.

This script updates or creates a file with details about ORACLE_HOME databases and location. On a Linux installation, the file is called /etc/oratab.

You need to open a new terminal window to execute root.sh as the root user.

Once you've run the root.sh, you return to the Setup Privileges page, and click OK.

This brings you to the End of Installation summary, which displays the URLs for the Oracle applications that have been deployed.

You access the iSQL*Plus URL and the Enterprise Manager URL via a web browser.

You can find the ports shown in the summary in

$ORACLE_BASE/product/10.1.0/db_2/portlist.ini

You click Exit to end the installation process.

Finally, you click Yes to exit.

Question

Match each configuration assistant to the correct function.

Options:

  1. iSQL*Plus Configuration Assistant
  2. Oracle Net Configuration Assistant
  3. Oracle Database Configuration Assistant

Targets:

  1. Creates the starter database you selected
  2. Configures the OC4J
  3. Configures basic network components during installation

Answer

The iSQL*Plus Configuration Assistant configures the OC4J, the Oracle Net Configuration Assistant configures basic network components during installation, and the Oracle Database Configuration Assistant creates the starter database you have selected.

The iSQL*Plus Configuration Assistant uses the OC4J (Oracle Containers for Java) instance to connect to the Oracle database.

The basic components that Oracle Net Configuration Assistant configures include listener names and protocol addresses, naming methods the client will use to resolve connect identifiers to connect descriptors, net service names in a tnsnames.ora file, and Directory server usage.

The Oracle Database Configuration Assistant uses the selection you made to create the database.

Summary

When using the OUI to configure the Oracle Database 10g installation, you have a choice of several starter database templates. When you select one, you're prompted for configuration details, such as the database character set and the database name. You're also given the option to include sample schemas in your database.

The OUI lets you choose whether your database is managed locally or centrally. You can also specify the type of file storage system you want for the database. You can protect your database by enabling automated backups and setting passwords for all the administrative users.

You can view a summary of database details before you run the installation. When installing on a Linux or UNIX OS, or if you didn't create a starter database, the OUI prompts you to run the script root.sh as root to complete the installation process.

Setting up the Oracle install environment

Setting up the Oracle install environment

Learning objective

After completing this topic, you should be able to recognize how to configure the Oracle install environment using the Oracle Universal Installer.

1. Starting the Oracle Universal Installer

The Oracle Universal Installer (OUI) enables you to install, upgrade, or uninstall Oracle database components.

Because the OUI uses a Java-based engine, it presents the same interface and installation choices regardless of the platform on which you use it.

In this case, you are installing Oracle Database 10g on a Linux platform.

The OUI supports

  • web-based installation
  • noninteractive installation
  • automatic dependency detection
  • multiple Oracle homes
  • partial uninstallation
  • multiple languages
web-based installation
The OUI can install Oracle software remotely over HTTP when you point it to a URL.

For example, you can use this feature to install Oracle in an online test environment.
noninteractive installation
You can run the OUI together with a prepared response file that contains installation specifications.

This method installs Oracle without any user interaction.
automatic dependency detection
The OUI automatically detects dependencies between Oracle components and adjusts the installation accordingly.
multiple Oracle homes
When you use multiple Oracle homes on a single computer, the OUI keeps an inventory of the names, components, and product versions for each of the Oracle homes.
partial uninstallation
You can use the OUI to remove individual components of a database system or you can use it to uninstall the entire database system.
multiple languages
The OUI supports multilingual installation.

It detects the language setting of the operating system and runs the Oracle installation in the same language.

Suppose you want to use the OUI to configure the Oracle install environment and create a database.

To do this, you must first log on to Linux as the "oracle" user and mount the Oracle Database 10g CD.

You then change directory to the CD and, from your home directory, execute the command ./runInstaller.

On running the OUI installation command, the Welcome page appears.

To start the software installation, you click Next.

In the Specify Inventory directory and credentials page, you must set the location of the inventory directory.

The OUI creates the inventory directory automatically to provide subdirectories for each product. Because it contains the bookkeeping for the OUI, you shouldn't delete any files from this directory.

The inventory holds data on every Oracle software product in all Oracle homes on the machine and non-Oracle products included with Oracle software, like the Java Runtime Environment (JRE).

Here you want to specify the location of the inventory directory as /u01/app/oracle/oraInventory.

You type oraInventory at the prompt and press Enter to complete the location of the inventory directory.

When installing software on a Linux or a UNIX system, the OUI also requires the name of the group that owns the base directory.

You have to select an operating system group name with permissions to update, install, and deinstall Oracle products.

You accept the default Operating System Group Name, oinstall, and click Next.

The Oracle Universal Installer dialog box appears, prompting you to run the script orainstRoot.sh as root. This script builds the inventory pointer file.

The OUI uses the inventory pointer file to find the inventory location. An example of the file is:

inventory_loc=/oracle/oraInventoryinst_group=oinstall

To run the file, you must leave the OUI and open a new terminal.

In the new terminal, you enter the commands

su

cd /u01/app/oracle/oraInventory


Now you need to run the orainstRoot.sh script.

You type orainstRoot.sh and press Enter.

Once you have run the script, you switch back to the OUI, and click Continue.

This brings you to the Specify File Locations page.

Question

Suppose you are using the OUI to install an Oracle database 10g on a Linux platform. On the Specify Inventory and credentials page, you want to set the location of the inventory directory, oraInventory. You have entered /u01/app/oracle/.

Complete the path of the inventory directory.

Answer

The full path of the inventory directory is /u01/app/oracle/oraInventory.

Question

Suppose you're installing Oracle on a UNIX OS.

Type the appropriate script as root.

Answer

To install Oracle on a UNIX OS, you enter orainstRoot.sh as root.

2. Specifying file locations and installation type

The Specify File Locations page provides a default location for the product's installation kit or stage.

You identify Oracle homes by name. The Oracle home name specifies the program group associated with a particular Oracle home and the Oracle services on the associated home.

The Oracle home name can be 1 to 16 characters in length and must contain alphanumeric characters and underscores only, with no spaces.

The OUI maintains the following Oracle homes on UNIX platforms:

  • each Oracle home that the OUI created
  • each home as defined in the /var/opt/oratab file (in Linux, /etc/oratab)
  • the home saved in the ORACLE_HOME environment variable

The OUI maintains the following Oracle homes on Windows platforms:

  • all Oracle homes that are already created using the OUI
  • all homes created using the previous OUI (ORCA-based)
  • the home saved in the ORACLE_HOME registry entry

Here you accept the default source and location paths, and click Next.

On the Select Installation Type page, you create the database for your installation.

You can choose from the following install types:

  • Enterprise Edition
  • Standard Edition
  • Custom install
Enterprise Edition
The Enterprise Edition is a self-managing database that provides scalability, performance, high availability, and security for clustered and single-system configurations. For example, you might use the Enterprise Edition for online transaction processing and business intelligence.

The Enterprise Edition has many services that are not available with the Standard Edition. These include standby database features, extended security features, and features that support Enterprise Data Warehouses.
Standard Edition
The Standard Edition is typically used for small and medium business, and general departmental applications. It does not have all the options of the Enterprise Edition.


Custom install
The Custom install enables you to customize the Enterprise Edition by choosing individual components to install. This means you can add components to your current installation that are not usually installed, or you can save space on your installation by preventing the installation of unnecessary components.


You now want to specify the database installation type.

You click the Enterprise Edition option, and then click Next.

The Product-specific Prerequisite Checks page displays. This page shows the name, type and status for all prerequisite checks.

Before installation, the OUI verifies that the system meets all the minimum requirements for installing and configuring the chosen product.

The OUI runs automatic checks first. Afterwards, you can run any optional checks manually.

When the check completes successfully, a summary appears in the bottom half of the page.

You might have to verify a requirement if the OUI produces a warning during the execution, or if a manual check is unconfirmed.

In this example, the automatic checks have run successfully, and there is no need for manual checks, so you click Next to continue.

You can now select your database configuration options.

Question

Match each Oracle Database 10g database installation type to its appropriate use.

Options:

  1. Enterprise Edition
  2. Standard Edition
  3. Custom install

Targets:

  1. General departmental applications
  2. Installation of individual components
  3. Online transaction processing and business intelligence

Answer

You might use the Enterprise Edition for online transaction processing and business intelligence, the Standard Edition for general departmental applications, and the Custom install to prevent the installation of unnecessary components.

The Enterprise Edition provides scalability for clustered and single-system configurations.

The Standard Edition is typically used by small and medium businesses.

You use the Custom install type when neither the Enterprise Edition or the Standard Edition fit the needs of your installation.

Question

Suppose you want to specify the database installation type for Oracle on a UNIX OS.

This question requires you to Specify the installation type that enables you to add components to your current installation that are not usually installed, and ensure that the system meets the minimum requirements for installing and configuring the software. Which option performs this task?

Options:

  1. Click the Enterprise Edition option, and click Next.
  2. Click the Custom option, and click Next.

Answer

The Custom install is the installation type that enables you to add components to your current installation that are not usually installed, and ensure that the system meets the minimum requirements for installing and configuring the software.

Alternatively, you press Alt+C.

Question

Rank in the correct order the steps required to configure the Oracle install environment using the OUI.

Options
Option Description
A Execute orainstRoot.sh as the root user
B Select the database installation type
C View the prerequisite checks
D Specify the inventory directory and credentials
E Specify the file locations

Answer

Correct ranking
Option Description
D Specify the inventory directory and credentials
The OUI creates the inventory directory automatically to provide subdirectories for each product.
A Execute orainstRoot.sh as the root user
The orainstRoot.sh script builds the inventory pointer file. The OUI uses the inventory pointer file to find the inventory location.
E Specify the file locations
This Specify File Locations page of the OUI provides a default location for the product's installation kit or stage.
B Select the database installation type
You can choose as your database installation type the Enterprise Edition, the Standard Edition, or the Custom install.
C View the prerequisite checks
Before installation, the OUI verifies that the system meets all the minimum requirements for installing and configuring the chosen product.

Summary

Using the Oracle Universal Installer (OUI), you can install, upgrade, and uninstall Oracle components and databases. Oracle includes a version of the OUI that supports web-based installation and multiple languages. You can run the OUI interactively, or you can automate it using a response file.

The OUI provides a default location for the product's installation kit. For your database installation type, you can select the Enterprise Edition, the Standard Edition, or you can customize your installation by choosing individual components to install. Before installation, the OUI checks the environment for the requirements necessary for a successful installation.

Wednesday, September 5, 2007

The Oracle Database 10g preinstall process

The Oracle Database 10g preinstall process

Learning objective

After completing this topic, you should be able to identify the components involved in the Oracle preinstall process.

1. Minimum system requirements

Before you can install Oracle Database 10g, you must ensure that your system has everything it needs to launch the software successfully.

The minimum system requirements for installing Oracle Database 10g across all platforms are

  • 512 MB of physical random access memory (RAM)
  • 1 GB of swap space (or virtual memory)
  • 400 MB of disk space in the temporary director (/tmp or \Temp)
  • 1.5 GB of disk space for the Oracle software
  • 1.5 GB of disk space for the preconfigured database
  • operating-system requirements covered in specific Oracle documentation

You should remember that these requirements are the minimum, and your installation may require more system resources - particularly disk space or RAM.

You should always ensure that your particular installation has enough swap space or virtual memory.

For instance, a system with 2 GB or more of RAM will require a swap space of between one and two times the size of RAM.

Each type of operating system has its own requirements, which are set out in the appropriate Oracle documentation.

You should refer to this information to establish the exact requirements of your particular system.

The documentation provides you with a list of the operating-system releases that Oracle Database 10g supports and a set of instructions for installing OS groups or users.

Before the Oracle Universal Installer interface is launched, Oracle performs several self-tests to ensure your system meets the minimum system requirements.

If your system fails to meet one or more requirements, you can choose to ignore the error and resume the installation. To do this, you run the installer using the –ignoreSysPrereqs flag.

However, if the system requirements aren't met, the chances of a successful installation are greatly reduced.

Question

Which are minimum requirements for a successful Oracle Database 10g install?

Options:

  1. 1 GB of swap space

  2. 1.5 GB of disk space for the Oracle software
  3. 500 MB of disk space in the temporary directory
    (/tmp or \Temp)
  4. 512 MB of physical random access memory (RAM)
  5. 2.5 GB of disk space for the preconfigured database

Answer

For a successful Oracle Database 10g install, minimum system requirements include 1 GB of swap space, 1.5 GB of disk space for the Oracle software, and 512 MB of physical random access memory (RAM).

Option 1 is correct. On systems with 2 GB or more of RAM, the swap space must be between one and two times the size of RAM.

Option 2 is correct. However, some installations may require more disk space.

Option 3 is incorrect. The minimum disk space in the temporary directory is 400 MB.

Option 4 is correct. However, it's best for your installation to have as much RAM as possible.

Option 5 is incorrect. The minimum disk space required for the preconfigured database is 1.5 GB.

2. Using Optimal Flexible Architecture (OFA)

Optimal Flexible Architecture (OFA) is Oracle's recommended standard database architecture.

The OFA standard is a set of configuration guidelines created to ensure reliable Oracle installations that require little maintenance.

This architecture includes a default directory tree and a default file-naming convention.

The OFA naming convention and directory distribution organizes files according to their type and usage, making it easier for you to distinguish between file types.

OFA allows you to distribute database files and Oracle components across multiple disks.

You can use this feature to distribute data files between disks, or to separate control files and log files from data files.

This can help improve system performance. For example, if you place data files and log files on separate disks, the disk heads don't need to move from data sectors to log sectors and back.

OFA is designed to perform the following tasks:

  • eliminate fragmentation of free space
  • facilitate routine administrative tasks
  • facilitate the administration of multiple Oracle databases
  • manage and administer database growth
  • organize large amounts of software

eliminate fragmentation of free space
Using OFA, you can eliminate the fragmentation of free space in the data dictionary, isolate other fragmentation, and minimize resource contention.
facilitate routine administrative tasks
Using OFA, you can facilitate routine administrative tasks like software and data backup, to avoid data corruption.
facilitate the administration of multiple Oracle databases
Using OFA, you can administer multiple Oracle homes optimally, because you can store the files for each Oracle home on a separate disk or in a separate partition.
manage and administer database growth
Using OFA, you can manage and administer database growth by distributing storage between multiple disks.
organize large amounts of software

Using OFA, you can organize large amounts of complicated software and data on disk, which helps prevent device bottlenecks and slowed performance.

The flexible, distributed architecture of OFA allows you to add users, data files, tables, and indexes wherever necessary, with minimum inconvenience.

For example, you can place different databases on separate drives, leaving plenty of space for expansion on each drive.

An example of an OFA directory tree is shown.

Question

What do you think are the advantages of using OFA?

Options:

  1. Easier administration of multiple Oracle homes

  2. Easier file identification
  3. Improved performance
  4. Reduced storage space requirements

Answer

Using OFA improves performance, and it makes it easier for you to identify files and administer multiple Oracle homes.

Using OFA, you can administer multiple Oracle homes optimally because you can store the files for each Oracle home on a separate disk or in a separate partition.

Using OFA's default filenames, you can easily distinguish between the different types of Oracle files. For example, you can easily tell the difference between a log file, a control file, and a data file.

Using OFA, you can improve performance by placing data files and log files on separate disks. In this way, the disk heads don't need to keep moving from data sectors to log sectors and back.

Using OFA has no effect on data compression, so it doesn't reduce storage space requirements. However, it does let you distribute storage between multiple disks.

OFA's naming strategy helps to maintain an orderly directory tree, ease recognition of OFA resources, and avoid naming collisions.

The naming standard provides a different OFA syntax for the mount point directories, the subdirectories on those mount points, and the actual database files.

The different types of OFA syntax include

  • mount point syntax
  • home directories syntax
  • software directories syntax
  • subdirectories syntax
  • file-naming syntax
mount point syntax
The mount point syntax names all mount points using the syntax /pm. Here p is a string constant and m is a unique fixed-length key that differentiates mount points. The syntax m is generally a two-digit number. For example, you can name a mount point /u01 or /disk01.
home directories syntax
The home directories syntax names all home directories using the syntax /pm/h/u. Here pm is a mount point name, h is a standard directory name, and u is the name of the directory owner. For example, you can name a home directory /u01/app/oracle or /u01/home/oracle.
software directories syntax
The software directories syntax helps OFA to execute multiple versions of application software simultaneously . The syntax stores all versions of the Oracle software in a directory using the syntax, /pm/h/u/product/v. Here pm is a mount point name, h is a standard directory name, and u is the name of the directory owner. In this syntax, product is a literal and the variable v is the version number. For example, you can name an installation of the Oracle Database 10g version 10.2.0, /u01/app/oracle/product/10.2.0.
subdirectories syntax
The subdirectories syntax enables the OFA to organize administrative data. The syntax stores database-specific administration files in subdirectories using the syntax /h/admin/d/a/. Here h is the home directory of the Oracle software owner, admin is a literal, d is the database name, and a is a subdirectory for each database administration file. For example, you can name a subdirectory containing SQL files /u01/admin/oracle/adhoc.
file-naming syntax
The file-naming syntax enables you to identify database files easily. The syntax is /pm/q/d/f. Here p is a string constant, m is a unique fixed-length key that distinguishes mount points, q is a string distinguishing Oracle data from all other files, d is a database name, and f is the filename. For example, you can name database files as follows:

  • a control file - /pm/q/d/controln.ctl
  • a redo log file - /pm/q/d/redon.log
  • a data file - /pm/q/d/tn.dbf

Question

Match each OFA component to the correct naming convention.

Options:

  1. Mount points
  2. Home directories
  3. Subdirectories
  4. Control files

Targets:

  1. /h/admin/d/a/
  2. /pm/q/d/f
  3. /pm
  4. /pm/h/u

Answer

For mount points the naming convention is /pm, for home directories it's /pm/h/u, for control files it's /pm/q/d/f, and for subdirectories it's /h/admin/d/a/.

An example of an OFA-compliant mount point is /u01.

An example of an OFA-compliant home directory is /u01/home/oracle.

An example of an OFA-compliant subdirectory is /u01/admin/oracle/arch.

An example of an OFA-compliant control file is /u01/q/oracle/control05.ctl.

3. Environment variables

Environment variables are a series of hidden values that the web server sends to every program you run. To avoid complications when running Oracle, there are some environment variables you should set in advance of an installation. The following Oracle environment variables are vital to a successful Oracle install.

  • NLS_LANG
  • ORACLE_BASE
  • ORACLE_HOME
  • ORACLE_SID
NLS_LANG

ORACLE_BASE

ORACLE_HOME

ORACLE_SID

Question

Match each environment variable to the appropriate functionality.

Options:

  1. ORACLE_BASE
  2. ORACLE_HOME
  3. ORACLE_SID
  4. NLS_LANG

Targets:

  1. Specifies the initial instance name
  2. Specifies the initial NLS settings for a session using the format
    language_territory.characterset
  3. Specifies the directory containing the Oracle software
  4. Facilitates future installations and upgrades

Answer

ORACLE_BASE facilitates future installations and upgrades and ORACLE_HOME specifies the directory containing the Oracle software. ORACLE_SID specifies the initial instance name and NLS_LANG specifies the initial NLS settings for a session.

You use ORACLE_BASE to specify the base of the Oracle directory structure for OFA.

This environmental variable is a directory path - for instance, $ORACLE_BASE/product/10.1.0.

This environmental variable is a string of numbers and letters that must begin with a letter.

An example of the NLS_LANG environmental variable is AMERICAN_DENMARK.WE8MSWIN1252.

Summary

To install Oracle successfully, you must ensure that your system meets the minimum system requirements. To establish the requirements of your particular operating system, you should use the accompanying Oracle documentation.

Optimal Flexible Architecture (OFA) is Oracle's recommended standard architecture, including a default file-naming convention and a default directory layout. An OFA-compliant installation of Oracle offers optimal flexibility and scalability.

Environment variables that are vital to Oracle installations include ORACLE_BASE, ORACLE_HOME, ORACLE_SID, and NLS_LANG. Setting these before installation may help avoid future problems.

RDBMS and Oracle database administration

RDBMS and Oracle database administration

Learning objective

After completing this topic, you should be able to identify the basic concepts involved in RDBMS and Oracle database administration.

Exercise overview

Suppose you're a trainee database administrator (DBA) and you need to familiarize yourself with relational database fundamentals, as well as the issues involved in setting up and maintaining an Oracle 10g database.

In this exercise, you're required to identify the concepts and issues involved in setting up an Oracle database.

This involves the following tasks:

  • defining relational database structure and integrity constraints
  • choosing an Oracle database product and sequencing DBA tasks
  • identifying tasks that can be performed with SQL

Task 1: Defining database structure and integrity constraints

As part of your overall understanding of relational databases, you need to recognize the components that make up a relational database. You need to understand the role of keys in creating relationships between database tables. And you need to recognize the role of integrity constraints in a relational database.

Step 1 of 3

Which components make up a relational database?

Options:

  1. Columns
  2. Fields
  3. Tables
  4. Text files
  5. Rows

Result

Fields and tables - the latter consisting of columns and rows - are relational database components.

Option 1 is correct. Columns arrange data into specific data types, and always have their own name.

Option 2 is correct. A field, or cell, can be defined as a single column of a single row, or the intersection point of a column and row.

Option 3 is correct. Unlike a flat-file database, a relational database system is composed of multiple two-dimensional tables.

Option 4 is incorrect. Flat-file databases are composed of text files, but relational databases are composed of two-dimensional tables.

Option 5 is correct. A table consists of rows of data, which can be arranged into one or more columns. Each row contains data related to a specific subject.

Step 2 of 3

Match the different items to the correct description of their role in database tables.

Options:

  1. A Field that does not allow duplicate or null values
  2. A collection of data items related to a subject
  3. A field in one table that points to a related field in another table

Targets:

  1. Foreign key
  2. Primary key
  3. Row

Result

A foreign key is a field in one table that points to a related field in another table, a primary key is a field in a table that is referenced by a field in another table, and a collection of data items related to a subject is a row.

The primary key must be a unique identifier.

A row in a table is a collection of data items related to a subject.

A foreign key is so named because it points to values in a different, or foreign, table.

Step 3 of 3

You can use integrity constraints to define business rules in a database.

Which tasks can you perform with integrity constraints?

Options:

  1. Add rows to a table
  2. Disallow duplicate values
  3. Disallow nulls
  4. Require column values to match the primary key in a related table

Result

You can use integrity constraints to disallow duplicate values and nulls in a column, and require column values to match the primary key in a related table.

Option 1 is incorrect. You would use a SQL statement, not a constraint, to add rows to a table.

Option 2 is correct. The UNIQUE constraint does not allow duplicate values to be entered in the column to which it's applied.

Option 3 is correct. The NOT NULL constraint does not permit nulls, or empty entries, in the column to which it's applied.

Option 4 is correct. The FOREIGN KEY constraint requires each value in a column to match a value in a related table's primary key.

Task 2: Choosing an Oracle product and sequencing DBA tasks

You're ready to begin installing an Oracle database, but first you need to identify the correct Oracle product for your organization's needs. You also need to sequence the tasks that you, as a DBA, will need to perform once you've created the database.

Step 1 of 2

You have a large amount of data to store, you need to be able to search and retrieve data, and you need to avail of data warehousing. Due to budget constraints, you want a product that meets only your immediate needs.

Which Oracle product best suits your requirements?

Options:

  1. Oracle Applications
  2. Oracle Collaboration Suite
  3. Oracle Database
  4. Oracle Developer Suite

Result

Oracle Database is the product that best meets your requirements.

Option 1 is incorrect. Oracle Applications is an e-business suite for managing and automating processes across an organization. You do not require this at present.

Option 2 is incorrect. Oracle Collaboration Suite is a system for integrating communications data and file sharing, which you do not need in this case.

Option 3 is correct. Oracle Database enables the storage and retrieval of large amounts of data, and supports data warehousing.

Option 4 is incorrect. You would use Oracle Developer Suite to develop business-specific applications, which is not required in this case.

Step 2 of 2

You've installed the Oracle software and planned, created, and opened the database.

Rank the remaining DBA tasks in order of their priority.

Options
Option Description
A Implement database design
B Enroll users
C Monitor performance
D Back up database

Result

Correct ranking
Option Description
D Back up database
In addition to the initial backup upon database creation, you should schedule regular backup operations.
B Enroll users
Once you've backed up the database, you can enroll users and assign them the appropriate roles and privileges.
A Implement database design
Having enrolled database users, you implement the planned database design by creating tablespaces and database objects.
C Monitor performance
You can use Oracle's database resource management feature to monitor and control resource allocation among groups of users.

Task 3: Identifying tasks that can be performed with SQL

Having created your database, you can now use SQL to perform various tasks. Here you need to identify the tasks that can be performed using SQL.

Step 1 of 1

Identify the types of tasks you can use SQL to perform.

Options:

  1. Add or delete table rows
  2. Create and alter database objects
  3. Manage database backup and recovery
  4. Query data

Result

You can use SQL to add or delete rows, to create and alter database objects, and to query data.

Option 1 is correct. You can also use SQL to update table rows.

Option 2 is correct. You can also use SQL to drop database objects.

Option 3 is incorrect. You use Enterprise Manager to manage backup and recovery.

Option 4 is correct. SQL uses a set of standalone statements for retrieving database information.

Introducing Oracle database administration

Introducing Oracle database administration

Learning objective

After completing this topic, you should be able to identify the basic tasks involved in Oracle database administration.

1. Oracle database products

Oracle produces a range of database products, applicable to different business requirements.

  • Oracle Applications
  • Oracle Application Server
  • Oracle Collaboration Suite
  • Oracle Database
  • Oracle Developer Suite
  • Oracle Services
Oracle Applications

Oracle Application Server

Oracle Collaboration Suite

Oracle Database

Oracle Developer Suite

Oracle Services

Question

Match the Oracle database products to their descriptions.

Options:

  1. Oracle Applications
  2. Oracle Application Server
  3. Oracle Collaboration Suite
  4. Oracle Database
  5. Oracle Development Suite

Targets:

  1. Supports enterprise grid computing, clustering, and data warehousing
  2. An e-business suite comprising different business applications
  3. An application-development environment with business tools
  4. Enables the development and deployment of web-based applications
  5. Integrates communications data such as voice, e-mail, and fax?

Answer

The Oracle database products have been correctly matched to their descriptions.

Oracle Applications enables the management and automation of processes across an organization.

Oracle Application Server is a J2EE-certified application server.

Oracle Collaboration Suite also enables you to share files and to store and retrieve information from an Oracle database.

Oracle Database is available in three editions: Enterprise, Standard, and Personal.

Oracle Forms and Oracle Reports are examples of Oracle Development Suite tools.

2. Database administrator tasks

The main responsibility of an Oracle database administrator (DBA) is to ensure that the database is available to its users.

As an Oracle DBA, you need to perform a number of tasks when designing and implementing an Oracle database.

  • plan the database
  • evaluate the database server hardware
  • install the Oracle software
  • create and open the database
plan the database
You need to plan the logical storage structure, overall design, and backup strategy for the database.
evaluate the database server hardware
The evaluation should include information on disk-drive and tape-drive availability for the Oracle software, as well as available memory for the Oracle Database instances.
install the Oracle software
You install the Oracle Database server software and any front-end tools and database applications that will access the database. In a distributed installation, you also need to install the components that connect the remote machines to the database server.
create and open the database
Once you've completed the database design, you create the database and open it so it can be used. You can create a database using the Database Configuration Assistant, or by scripting.

Once you've created and opened the database, DBA tasks include:

  • backing up the database
  • enrolling system users
  • implementing database design
  • performance monitoring
backing up the database
Depending on your planned backup strategy, you need to create any additional redo log files, perform the first full database backup, and schedule future database backups.
enrolling system users
After backup, you can enroll database users and assign them the appropriate roles and privileges.
implementing database design
Once you've enrolled the database users, you implement the planned logical structure of the database by creating tablespaces for storage, and then the database objects. Following this, you should back up the database again.
performance monitoring
Monitoring and tuning database performance is one of the main ongoing responsibilities of a DBA. You can use Oracle's database resource management feature to control resource allocation among groups of users.

Question

Suppose you're a DBA and you've just installed Oracle Database software.

Rank the tasks in the order in which they should be performed next.

Options
Option Description
A Back up the database
B Create and open the database
C Enroll database users

Answer

Correct ranking
Option Description
B Create and open the database
You can create the database using the Database Configuration Assistant, or by scripting.
A Back up the database
Following the initial backup, you should schedule regular backups of the database.
C Enroll database users
When you enroll users, you can assign them the appropriate roles and privileges.

3. SQL functionality

Structured Query Language (SQL) is the language used by administrators, users, and applications to interact with the database. SQL uses a set of standalone statements, or instructions, to the database, for retrieving and updating database information.

SQL provides an interface between the user and the database - that is, the user does not need to know how SQL retrieves information from the database.

Note

SQL now supports flow-control statements and persistent stored modules.

SQL adopts a logical approach to data. For example, when you want to retrieve a row of data, you specify a condition to filter the rows. All rows fulfilling that condition are retrieved and can be passed to the user, to another SQL statement, or to an application.

In this way, SQL provides automatic navigation to data and processes sets of data as groups, rather than as individual rows.

SQL statements also use the Oracle database optimizer to determine the most efficient way to access and retrieve data.

Some of the tasks you can perform using SQL include:

  • controlling database access
  • guaranteeing database integrity
  • manipulating database objects
  • manipulating table rows
  • querying data
controlling database access
You can use SQL to control access to the database and its objects.
guaranteeing database integrity
You can ensure database consistency and integrity using SQL.
manipulating database objects
You can use SQL to create, replace, alter, and drop database objects.
manipulating table rows
You can use SQL to insert, update, and delete rows in a table.
querying data
SQL provides statements for querying data in all kinds of relational databases.

Question

Which of these tasks can you use SQL to perform?

Options:

  1. Plan the database
  2. Manipulating database objects
  3. Manipulating table rows
  4. Querying databases

Answer

You can use SQL to control and manipulate database objects and table rows, and to query databases.

Option 1 is incorrect. You plan the database before you install Oracle. This is usually completed on paper or within a word processing application.

Option 2 is correct. You can use SQL to create, replace, alter, and drop database objects.

Option 3 is correct. You can use SQL to insert, update, and delete rows in a table.

Option 4 is correct. SQL is a query language that is used for all relational database queries.

Summary

Oracle's range of database products, including Oracle Application Server, Oracle Applications, and Oracle Developer Suite, serves diverse. business needs.

The Oracle database administrator (DBA) is responsible for planning and evaluating the database and its resources, installing Oracle, and creating and opening the database. Once the database is available to users, the DBA is responsible for backing it up regularly, creating user roles and privileges, implementing database design, and monitoring database performance.

Structured Query Language (SQL) is the language used for retrieving and updating database information. You can use SQL statements to control database access, preserve database integrity, manipulate database objects and table rows, and to query data.