Lecture3 Oracle

24
ITEC474 ORACLE SERVER

description

Lecture3 Oracle

Transcript of Lecture3 Oracle

  • ITEC474 ORACLE SERVER

  • Objectives

    These notes familiarize you with database administration software used by a DBA including:

    Oracle Universal Installer (OUI)

    Oracle SQL*Plus

    Oracle Database Configuration Assistant (DBCA)

    Oracle Enterprise Manager (OEM)

    Database Upgrade Assistant (DBUA)

  • Database Administration Software DBA Software Software Description

    Oracle Universal Installer This software is the standard software used to install,

    modify (upgrade), and remove Oracle software

    components for all Oracle products.

    Oracle Database

    Configuration Assistant

    This is a GUI tool that can be used to create, delete, or

    modify databases; however, it does not provide a lot of

    control on the database creation process.

    SQL*Plus Used by the DBA and system users to access data in an

    Oracle database.

    Oracle Enterprise Manager A GUI tool for administering one or more databases.

    Database Upgrade Assistant

    (DBUA)

    Can be started in command line mode (command

    is dbua) for LINUX, or by selecting the DBUA from the

    Oracle Configuration and Migrations Tools menu

    option this upgrades Oracle databases to version

    11g.

  • Special Database Administrative Users

    SYS

    In the past, the user SYS was identified initially with the password change_on_install; however, now the Oracle Universal Installer (OUI) and Database Configuration Assistant (DBCA) both prompt for a password during software installation.

    SYS is the owner of the data dictionary.

    SYSDBA and SYSOPER Privileges.

    When you connect to a database as SYS, it is made by specifying that the connection is made as either SYSDBA or SYSOPER.

    These are two special privilege classifications used to identify DBAs and privileged connections are enabled through use of a password file.

  • Special Database Administrative Users (cont.)

    Operations autorized by the SYSDBA Privilege: Perform STARTUP and SHUTDOWN operations

    ALTER DATABASE: open, mount, back up, or change character set

    CREATE DATABASE

    DROP DATABASE

    CREATE SPFILE

    ALTER DATABASE ARCHIVELOG

    ALTER DATABASE RECOVER

    Includes the RESTRICTED SESSION privilege

  • Special Database Administrative Users (cont.)

    Operations autorized by the SYSOPER Privilege: Perform STARTUP and SHUTDOWN operations

    CREATE SPFILE

    ALTER DATABASE OPEN/MOUNT/BACKUP

    ALTER DATABASE ARCHIVELOG

    ALTER DATABASE RECOVER (Complete recovery only. Any form of incomplete recovery, such as UNTIL TIME|CHANGE|CANCEL|CONTROLFILE requires connecting as SYSDBA.)

    Includes the RESTRICTED SESSION privilege

  • Special Database Administrative Users (cont.)

    SYSTEM: The user SYSTEM was identified initially by the

    password manager in the past, but now the OUI and DBCA both prompt for passwords during software installation.

    Tables and views created/owned by the user SYSTEM contain administrative information used by Oracle tools and administrative scripts used to track database usage.

    Here the database user connects as SYSTEM using role SYSDBA.

  • SQLPlus You can connect to SQLPlus in order to do the following:

    Work with a database.

    Startup and shutdown a database.

    Create and run queries, modify row data, add rows, etc.

    SQLPlus includes standard SQL plus additional add-on commands, such as the DESCribe command that Oracle provides to make it easier to work with databases.

    When you use SQLPlus for startup and shutdown of your own database, you will connect using /nolog mode, then connect as SYSDBA. The following sequence fails for databases (such as DBORCL) that are protected by a password file that authorizes special accounts to connect with SYSDBA privileges.

    SQL> connect / as sysdba

    ERROR:

    ORA-01031: insufficient privileges

  • SQLPlus (cont.)

    The sequence of commands shown above WILL work in an environment where password files are not used to authorize special account connections where the DBA has decided the environment is secure enough to rely on belonging to the operating system DBA group to validate database administrator access to the database.

  • Oracle Universal Installer

    The OUI is Java-based and enables installation for all Java-enabled operating system platforms this makes the installation process common across platforms.

    It requires about 200Mb for OUI files on Windows, and 116Mb for Unix and Linux installations.

  • Oracle Universal Installer Oracle Universal Installer 11g Release 2 (11.2)

    offers the following features: An XML-based centralized inventory Cloning of existing Oracle home Better support for cluster environments True silent capability Ability to record your Oracle Universal Installer

    session to a response file More accurate disk space calculations Automatically launched software after installation Cleaner deinstallation and upgrades Integrated prerequisite checking Support for Desktop Class and Server Class

  • Oracle Universal Installer (cont.) An XML-based centralized inventory. The XML

    format enables third-party Java applications to query the inventory for information about installed software.

    Cloning of existing Oracle home.

    Enables copying an existing Oracle home to another location and "fix it up" by updating the installation configuration to be specific to the new environment.

    Cloning makes it easy to propagate a standard setup without having to install and configure after installation.

  • Oracle Universal Installer (cont.) Better support for cluster environments

    Oracle Universal Installer now replicates its inventory to all nodes that participate in a cluster-based installation.

    You can invoke Oracle Universal Installer from any node on the cluster that is part of the installation.

    You can then upgrade, remove, or patch existing software from any node.

    True silent capability

    When running Oracle Universal Installer in silent mode on a character mode console, you no longer need to specify an X-server or set the DISPLAY environment variable on UNIX.

    No GUI classes are instantiated, making the silent mode truly silent.

  • Oracle Universal Installer (cont.) Ability to record your Oracle Universal Installer session to a

    response file

    This feature makes it easy to duplicate the results of a successful installation on multiple systems.

    All the options you selected during the installation are saved in the resulting response file.

    More accurate disk space calculations

    Oracle Universal Installer now uses a more accurate method of calculating the disk space your Oracle products require.

    This feature reduces the risk of running out of disk space during an installation.

  • Oracle Universal Installer (cont.) Automatically launched software after installation

    Some Oracle products now take advantage of a new feature that enables the software to launch automatically immediately after the installation.

    Cleaner deinstallation and upgrades

    Deinstallation completely removes all software, leaving no "bits" behind.

    This also completely removes files associated with configuration assistants and patchsets.

    Oracle homes can also be removed from the inventory and registry.

    For deinstalling 11.2 Oracle Clusterware, Database, and client homes, OUI prompts you to run the deinstall/deconfig utility from the home.

  • Oracle Universal Installer (cont.)

    Integrated prerequisite checking

    Provides a prerequisite checking tool to diagnose the readiness of an environment for installation.

    The prerequisite checks are run as part of the installation process, but can also be run as a separate application.

  • Oracle Universal Installer (cont.) Support for Desktop Class and Server

    Class. The following installation types are available for the database:

    Desktop Class

    Choose this option if you are installing on a laptop or desktop class system.

    This option includes a starter database and provides minimal configuration.

    This option is designed for users that want to quickly bring up and run the database.

  • Oracle Universal Installer (cont.) Server Class

    Choose this option if you are installing on a server class system, such as what you would use when deploying Oracle in a production data center.

    This option provides more advanced configuration options.

    Advanced configuration options available using this installation type include Oracle RAC, Automatic Storage Management, backup and recovery configuration, integration with Enterprise Manager Grid Control, and more fine-grained memory tuning, as well as other options.

    For the Server Class option, the Typical Installation method is selected by default.

    It enables you to quickly install the Oracle Database using minimal input.

    This method installs the software and optionally creates a general-purpose database using the information that you specify in this dialog.

  • Oracle Universal Installer (cont.) Utilities

    Oracle offers two utilities for software deployment:

    Oracle Universal Installer to install Oracle products

    OPatch to apply interim patches.

    OPatch is an Oracle-supplied utility that assists you with the process of applying interim patches to Oracle's software.

    OPatch 11.2 is a Java-based utility that can run on either OUI-based Oracle homes or standalone homes.

    It works on all operating systems for which Oracle releases software.

    For more information on OPatch, see the Oracle OPatch User's Guide.

  • Oracle Universal Installer (cont.) Oracle Home

    An Oracle home is the system context in which the Oracle products run.

    The Oracle Universal Installer supports the installation of several active Oracle homes on the same host.

    An Oracle home is a directory into which all Oracle software is installed.

    This is pointed to by an environment variable named ORACLE_HOME.

    This context consists of the following:

    Directory location where the products are installed

    Corresponding system path setup

    Program groups associated with the products installed in that home (where applicable)

    Services running from that home

  • Oracle Universal Installer (cont.) Oracle Base

    The Oracle base location is the location where Oracle Database binaries are stored.

    During installation, you are prompted for the Oracle base path.

    Typically, an Oracle base path for the database is created during Oracle Grid Infrastructure installation.

    To prepare for installation, Oracle recommends that you only set the ORACLE_BASE environment variable to define paths for Oracle binaries and configuration files.

    Oracle Universal Installer (OUI) creates other necessary paths and environment variables in accordance with the Optimal Flexible Architecture (OFA) rules for well-structured Oracle software environments.

    For example, with Oracle Database 11g, Oracle recommends that you do not set an Oracle home environment variable allow OUI to create it instead.

    If the Oracle base path is /u01/app/oracle, then by default, OUI creates /u01/app/oracle/product/11.2.0/dbhome_1 as the Oracle home path

  • Oracle Universal Installer (cont.) The ORAPARAM.INI File

    The oraparam.ini file is used to provide initialization parameters for the OUI. These parameters specify the behavior of specific OUI parameters, and each product installation has a unique oraparam.ini file.

    Generally you will not need to edit the oraparam.ini file, but understanding its contents can help you to troubleshoot problems that may occur. For example:

    OUI provides a default value for most installations on the File Locations page that points to the location of the product's installation kit or stage. This default value is stored in the oraparam.ini file.

    The oraparam.ini file also identifies the location of the Java Runtime Environment (JRE) required for the installation.

    In the staging area, it is located in the same directory as the executable file.

  • Oracle Database Configuration Assistant

    This assistant is covered in more detail in a later lesson. It allows you to:

    Create a database

    Configure database options

    Delete a database

    Manage templates used for these tasks.

  • Oracle Enterprise Manager

    The Oracle 11g Oracle Enterprise Manager (OEM) is a GUI, Internet-based product that executes inside a web browser such as Internet Explorer. The OEM: Enables you to manage a number of Oracle tools and

    services

    Manage the network of management servers and intelligent agents used to track and manage Oracle databases.

    Manage multiple databases from a single client platform.