Oracle 11g New features Student guide

Embed Size (px)

Citation preview

  • 7/22/2019 Oracle 11g New features Student guide

    1/590

  • 7/22/2019 Oracle 11g New features Student guide

    2/590

    Oracle Database 11g: New Features for Administrators I - 2

    Overview

    This course is designed to introduce you to the new features of Oracle Database 11gthat are

    applicable to the work usually performed by database administrators and related personnel. The

    course does not attempt to provide every detail about a feature or cover aspects of a feature that

    were available in previous releases (except when defining the context for a new feature or

    comparing past behavior with current behavior). Consequently, the course is most useful to you

    if you have already administered other versions of Oracle databases, particularly Oracle

    Database 10g. Even with this background, you should not expect to be able to implement all of

    the features discussed in the course without supplemental reading, especially the Oracle

    Database 11gdocumentation.

    The course consists of instructor-led lessons and demonstrations, plus many hands-on practices

    and demos that enable you to see for yourself how certain new features behave. As with the

    course content in general, these practices are designed to introduce you to the fundamental

    aspects of a feature. They are not intended to test your knowledge of unfamiliar syntax or to

    provide an opportunity for you to examine every nuance of a new feature. The length of this

    course precludes such activity. Consequently, you are strongly encouraged to use the provided

    scripts to complete the practices rather than struggle with unfamiliar syntax.

  • 7/22/2019 Oracle 11g New features Student guide

    3/590

    Oracle Database 11g: New Features for Administrators I - 3

    Oracle Database Innovation

    As a result of its early focus on innovation, Oracle has maintained the lead in the industry with a

    large number of trend-setting products. Continued emphasis on Oracles key development areas

    has led to a number of industry firstsfrom the first commercial relational database, to the first

    portable tool set and UNIX-based client/server applications, to the first multimedia database

    architecture.

  • 7/22/2019 Oracle 11g New features Student guide

    4/590

    Oracle Database 11g: New Features for Administrators I - 4

    Enterprise Grid Computing

    Oracle Database 10gwas the first database designed for grid computing. Oracle Database 11g

    consolidates and extends Oracles unique ability to deliver the benefits of grid computing. Oracle

    Infrastructure grids fundamentally changed the way data centers look and operate, transforming

    data centers from silos of isolated system resources to shared pools of servers and storage.

    Oracles unique grid architecture enables all types of applications to scale-out server and storage

    capacity on demand. By clustering low-cost commodity server and storage modules on

    Infrastructure grids, Oracle Database 11genables customers to improve their user service levels,

    reduce their down time, and make more efficient use of their IT resources while still increasing

    the performance, scalability, and security of their business applications.

    Oracle Database 11gfurthers the adoption of grid computing by offering:

    Unique scale-out technology with a single database image

    Lower server and storage costs

    Increased availability and scalability

  • 7/22/2019 Oracle 11g New features Student guide

    5/590

    Oracle Database 11g: New Features for Administrators I - 5

    Oracle Database 11g: Focus Areas

    The Oracle Infrastructure grid technology enables information technology systems to be built out

    of pools of low-cost servers and storage that deliver the highest quality of service in terms of

    manageability, high availability, and performance. With Oracle Database 11g, the existing grid

    capabilities are extended in the areas listed in the slide, thereby making your databases more

    manageable.

    Manageability:New manageability features and enhancements increase DBA productivity,

    reduce costs, minimize errors, and maximize quality of service through change management,

    additional management automation, and fault diagnosis.

    Availability:New high-availability features further reduce the risk of down time and data loss,including further disaster recovery offerings, important high-availability enhancements to

    Automatic Storage Management, support for online database patching, improved online

    operations, and more.

    Performance:Many innovative new performance capabilities are available, including

    SecureFiles, compression for OLTP, Real Application Clusters optimizations, Result Query

    Caches, TimesTen enhancements, and more.

  • 7/22/2019 Oracle 11g New features Student guide

    6/590

    Oracle Database 11g: New Features for Administrators I - 6

    Oracle Database 11g: Focus Areas (continued)

    The Oracle Infrastructure grid provides the additional functionality required to manage all the

    information in the enterprise with robust security, information lifecycle management, and

    integrated business intelligence analytics to support fast and accurate business decisions at the

    lowest cost.

  • 7/22/2019 Oracle 11g New features Student guide

    7/590

    Oracle Database 11g: New Features for Administrators I - 7

    Management Automation

    Oracle Database 11gcontinues the effort begun in Oracle9iDatabase and carried on through

    Oracle Database 10gto dramatically simplify and ultimately, fully automate the tasks that DBAs

    must perform. What is new in Oracle Database 11gis Automatic SQL Tuning with self-learning

    capabilities. Other new capabilities include automatic, unified tuning of both SGA and PGA

    memory buffers, and new advisors for partitioning, database repair, streams performance, and

    space management. Enhancements to Oracle Automatic Database Diagnostic Monitor (ADDM)

    give it a better global view of performance in Oracle Real Application Clusters (RAC)

    environments and improved comparative performance analysis capabilities.

  • 7/22/2019 Oracle 11g New features Student guide

    8/590

    Oracle Database 11g: New Features for Administrators I - 8

    Self-Managing Database: The Next Generation

    Self-management is an ongoing goal for Oracle Database.

    Oracle Database 10gmarked the beginning of a major effort to make the database easy to use.

    With Oracle Database 10g, the focus for self-managing was on performance and resources.

    Oracle Database 11gadds two important axes to the overall self-management goal: change

    management and fault management.

  • 7/22/2019 Oracle 11g New features Student guide

    9/590

    Oracle Database 11g: New Features for Administrators I - 9

    Suggested Additional Courses

    For more information about the key grid computing technologies used by the Oracle products,

    you can obtain additional training from Oracle University (courses listed in the slide).

  • 7/22/2019 Oracle 11g New features Student guide

    10/590

    Oracle Database 11g: New Features for Administrators I - 10

  • 7/22/2019 Oracle 11g New features Student guide

    11/590

    Oracle Database 11g: New Features for Administrators I - 11

    Suggested Schedule

    The lessons in this guide are arranged in the order in which you will probably study them in the

    class. The lessons are grouped into topic areas, but they are also organized by other criteria,

    including the following:

    A feature is introduced in an early lesson and then referenced in later lessons.

    Topics alternate between difficult and easy to facilitate learning.

    Lessons are supplemented with hands-on practices throughout the course to provide regular

    opportunities for you to explore what you are learning.

    If your instructor teaches the class in the sequence in which the lessons are printed in this guide,

    the class should run approximately as shown in the schedule. Your instructor, however, may varythe sequence of the lessons for a number of reasons, including:

    Customizing material for a specific audience

    Covering a topic in a single day instead of splitting the material across two days

    Maximizing the use of course resources (such as hardware and software)

  • 7/22/2019 Oracle 11g New features Student guide

    12/590

    Oracle Database 11g: New Features for Administrators I - 13

  • 7/22/2019 Oracle 11g New features Student guide

    13/590

  • 7/22/2019 Oracle 11g New features Student guide

    14/590

    Oracle Database 11g: New Features for Administrators I - 15acle Database 11g: New Features for

    dministrators 1 - 15

  • 7/22/2019 Oracle 11g New features Student guide

    15/590

    Oracle Database 11g: New Features for Administrators I - 16acle Database 11g: New Features for

    dministrators 1 - 16

    Oracle Database 11gInstallation: Changes

    During an Oracle Database 11ginstallation, you will notice several changes to the installation

    process. These changes include standard database out-of-box memory calculations, character setdetermination, support for the new SYSASMrole, and a corresponding operating system

    privileges group (OSASM) that is intended to secure privileges to perform ASM administration

    tasks.

    The following are the new components that are available when you install Oracle Database 11g:

    Oracle Application Expressis installed with Oracle Database 11g. It was previously

    named HTML DB and was available as a separate companion CD component.

    Oracle Configuration Manageris offered during installation. It was previously namedCustomer Configuration Repository (CCR). It is an optional component for database

    installation. Oracle Configuration Manager gathers and stores details relating to the

    configuration of the software stored in Oracle Database home directories.

    Oracle SQL Developeris installed by default with template-based database installations,

    such as General Purpose/Transaction Processing and Data Warehousing. It is also installed

    with database client Administrator, Runtime, and Custom installations.

    Oracle Warehouse Builderis installed with Oracle Database 11g.

    Oracle Database Vaultis installed with Oracle Database 11g. It is an optional component

  • 7/22/2019 Oracle 11g New features Student guide

    16/590

    Oracle Database 11g: New Features for Administrators I - #

    for database installation. It was previously available as a separate companion CD

    component.

  • 7/22/2019 Oracle 11g New features Student guide

    17/590

    Oracle Database 11g: New Features for Administrators I - 17acle Database 11g: New Features for

    dministrators 1 - 17

    Oracle Database 11gInstallation: Changes (continued)

    The following components are part of Oracle Database 10g, Release 2 (10.2) but are not

    available for installation with Oracle Database 11g:

    iSQL*Plus

    Oracle Workflow

    Oracle Data Mining Scoring Engine

    Oracle Enterprise Manager Java Console

  • 7/22/2019 Oracle 11g New features Student guide

    18/590

    Oracle Database 11g: New Features for Administrators I - 18acle Database 11g: New Features for

    dministrators 1 - 18

    Oracle Database 11gInstallation: Changes (continued)

    In Oracle Database 11g, Oracle Universal Installer (OUI) prompts you to specify the Oracle

    base. The Oracle base that you provide during installation is logged in the local inventory. You

    can share this Oracle base across all of the Oracle homes that you create on the system. Oracle

    recommends that you share an Oracle base for all of the Oracle homes created by a user.

    Oracle Universal Installer has a list box in which you can edit or select the Oracle base. The

    installer derives the default Oracle home from the Oracle base location that you provide in the

    list box. However, you can change the default Oracle home by editing the location.

    The following are changes made in Oracle Database 11gwith respect to the Oracle base to make

    it compliant with Optimal Flexible Architecture (OFA): ORACLE_BASEis a recommended environment variable. (This variable will be mandatory

    in future releases.)

    By default, the Oracle base and the Oracle Clusterware home are at the same directory

    level during Oracle Clusterware installation. You should not create an Oracle Clusterware

    home under the Oracle base. Because, specifying an Oracle Clusterware home under the

    Oracle base results in an error.

    Oracle recommends that you create the flash recovery area and the data file location under

    the Oracle base.

  • 7/22/2019 Oracle 11g New features Student guide

    19/590

    Oracle Database 11g: New Features for Administrators I - 20acle Database 11g: New Features for

    dministrators 1 - 20

    Oracle Database 11g:Software Installation

    The Oracle Database 11gsoftware installation is a straightforward process. As the operatingsystem oracleuser, change directory to Disk1on your installation media or software staging

    directory, and then start Oracle Universal Installer (OUI):

    $ ./runInstaller

    Select Oracle Database 11gon the Select a Product to Install page and click Next. On theSelect Installation Method page, provide the Oracle base (if the ORACLE_BASEparameter has

    not been set) and Oracle home locations. The default installation type and UNIX DBA groupvalues are Enterprise Editionand dba, respectively. You must use the

    Advanced/Custom installation path to install many of the Enterprise Edition options (such asReal Application Testing).

    Starting with Oracle Database 11g, OUI tries to install its inventory in $ORACLE_BASE/..

    As a result, you must ensure that $ORACLE_BASE/..is writable by any user installing the

    Oracle software. This translates to the following (as rootuser):

    # mkdir -p /u01/app

    # chgrp oinstall /u01/app

    # chmod 775 /u01/app

  • 7/22/2019 Oracle 11g New features Student guide

    20/590

    Oracle Database 11g: New Features for Administrators I - #

    However, if you are running previous versions of the Oracle software, OUI uses the

    inventory that already exists.

  • 7/22/2019 Oracle 11g New features Student guide

    21/590

    Oracle Database 11g: New Features for Administrators I - 21acle Database 11g: New Features for

    dministrators 1 - 21

    Oracle Database 11g: Software Installation (continued)

    On the Product-Specific Prerequisite Checks page, your system is examined for supported

    operating systems and kernels, required RPMs, Oracle environment consistencies, and so on.

    If no discrepancies are discovered, proceed with the installation by clicking Next. Review the

    information on the Summary page, and then click Install.

  • 7/22/2019 Oracle 11g New features Student guide

    22/590

    Oracle Database 11g: New Features for Administrators I - 22acle Database 11g: New Features for

    dministrators 1 - 22

  • 7/22/2019 Oracle 11g New features Student guide

    23/590

    Oracle Database 11g: New Features for Administrators I - 23acle Database 11g: New Features for

    dministrators 1 - 23

    Oracle Database Upgrade Enhancements

    Oracle Database 11g, Release 1 continues to make improvements to simplify manual upgrades,

    upgrades performed using the Database Upgrade Assistant (DBUA), and downgrades.

    The DBUA provides the following enhancements for single-instance databases:

    Support for improvements to the pre-upgrade tool in the areas of space estimation,

    initialization parameters, statistics gathering, and new warnings The catupgrd.sqlscript performs all upgrades and the catdwgrd.sqlscript

    performs all downgrades, for both patch releases and major releases.

    The DBUA can automatically take into account multi-CPU systems to perform parallel

    object recompilation. Errors are now collected as they are generated during the upgrade and displayed by the

    Post-Upgrade Status Tool for each component.

  • 7/22/2019 Oracle 11g New features Student guide

    24/590

    Oracle Database 11g: New Features for Administrators I - 24acle Database 11g: New Features for

    dministrators 1 - 24

    Pre-Upgrade Information Tool

    The Pre-Upgrade Information Tool analyzes the database to be upgraded. It is a SQL script that

    ships with Oracle Database 11g, Release 1 and must be run in the environment of the database

    being upgraded. This tool displays warnings about possible upgrade issues with the database.

    It also displays information about the required initialization parameters for Oracle Database 11g,

    Release 1.

  • 7/22/2019 Oracle 11g New features Student guide

    25/590

    Oracle Database 11g: New Features for Administrators I - 25acle Database 11g: New Features for

    dministrators 1 - 25

    Pre-Upgrade Information Analysis

    After installing Oracle Database 11g, you should analyze your database before upgrading it to

    the new release. This is done by running the Pre-Upgrade Information Tool. This is a necessary

    step if you are upgrading manually. It is also recommended if you are upgrading with the DBUA

    so that you can preview the items that the DBUA checks. The Pre-Upgrade Information Tool is a

    SQL script that ships with Oracle Database 11gand must be copied to and run from the

    environment of the database being upgraded. To run the tool, follow these steps:

    1. Log in to the system as the owner of the Oracle Database 11gOracle home directory.2. Copy the Pre-Upgrade Information Tool (utlu111i.sql) from the Oracle Database 11g

    ORACLE_HOME/rdbms/admindirectory to a directory outside of Oracle home (such as/tmp).

    3. Log in to the system as the owner of the Oracle home directory of the database to be

    upgraded.

    4. Change to the directory that you copied the files to. Then start SQL*Plus.5. Connect to the database instance as a user with SYSDBAprivileges.

    6. Set the system to spool results to a log file for later analysis:SQL> SPOOL upgrade_info.log

    7. Run the Pre-Upgrade Information Tool:SQL> @utlu111i.sql

  • 7/22/2019 Oracle 11g New features Student guide

    26/590

    Oracle Database 11g: New Features for Administrators I - #

    8. Turn off the spooling of the script results to the log file and check the output of thePre-Upgrade Information Tool in upgrade_info.log.

  • 7/22/2019 Oracle 11g New features Student guide

    27/590

    Oracle Database 11g: New Features for Administrators I - 26acle Database 11g: New Features for

    dministrators 1 - 26

  • 7/22/2019 Oracle 11g New features Student guide

    28/590

    Oracle Database 11g: New Features for Administrators I - 27acle Database 11g: New Features for

    dministrators 1 - 27

    STARTUPUPGRADE

    STARTUPUPGRADEenables you to open a database based on an earlier Oracle Database

    release. It also restricts logons to ASSYSDBAsessions, disables system triggers, and performs

    additional operations that prepare the environment for the upgrade (some of which are listed in

    the slide).

    To upgrade the candidate database, follow the directions below:1. Set the ORACLE_SIDcorrectly.

    The oratabfile should point to your Oracle Database 11gOracle home. The following

    environment variables point to the Oracle Database 11gdirectories:

    ORACLE_HOMEPATH

    2. Log in to the system as the owner of the Oracle Database 11gOracle home directory.3. At system prompt, change to the ORACLE_HOME/rdbms/admindirectory and

    SQL*Plus.4. Connect to the database instance as a user with SYSDBAprivileges.

    5. Start up the instance by issuing the following command:SQL> STARTUP UPGRADE

  • 7/22/2019 Oracle 11g New features Student guide

    29/590

    Oracle Database 11g: New Features for Administrators I - 28acle Database 11g: New Features for

    dministrators 1 - 28

    Upgrade Performance Enhancement

    The script is a wrapper based on the UTL_RECOMPpackage. UTL_RECOMPprovides a more

    general recompilation interface, including options to recompile objects in a single schema. Fordetails, see the documentation for UTL_RECOMP.

    By default, this script invokes the utlprp.sqlscript with 0as the degree of parallelism forrecompilation. This means that UTL_RECOMPautomatically determines the appropriate level of

    parallelism based on the Oracle CPU_COUNTand PARALLEL_THREADS_PER_CPU

    parameters. If the parameter is set to 1, sequential recompilation is used.

  • 7/22/2019 Oracle 11g New features Student guide

    30/590

    Oracle Database 11g: New Features for Administrators I - 29acle Database 11g: New Features for

    dministrators 1 - 29

    Post-Upgrade Status Tool

    The Post-Upgrade Status Tool provides a summary of the upgrade at the end of the spool log. It

    displays the status of the database components in the upgraded database and the time required to

    complete each component upgrade. Any errors that occur during the upgrade are listed with each

    component and must be addressed.

    Run utlu111s.sqlto display the results of the upgrade.

  • 7/22/2019 Oracle 11g New features Student guide

    31/590

    Oracle Database 11g: New Features for Administrators I - 30acle Database 11g: New Features for

    dministrators 1 - 30

    Rerun the Upgrade

    The Post-Upgrade Status Tool should report a status of VALIDfor all components at the end of

    the upgrade.

    Other Status Values

    As shown in the slide, the report returns INVALIDfor the Spatial component. This is because of

    the ORA-04031error. In this case, you should fix the problem; subsequently runningutlrp.sqlmight change the status to VALIDwithout rerunning the entire upgrade. Check theDBA_REGISTRYview after running utlrp.sql. If that does not fix the problem, or if you see

    a status of UPGRADING, the component upgrade did not complete. Resolve the problem and

    rerun catupgrd.sqlafter you shut down, immediately followed by a startup upgrade.

  • 7/22/2019 Oracle 11g New features Student guide

    32/590

    Oracle Database 11g: New Features for Administrators I - 31acle Database 11g: New Features for

    dministrators 1 - 31

  • 7/22/2019 Oracle 11g New features Student guide

    33/590

    Oracle Database 11g: New Features for Administrators I - 32acle Database 11g: New Features for

    dministrators 1 - 32

  • 7/22/2019 Oracle 11g New features Student guide

    34/590

    Oracle Database 11g: New Features for Administrators I - 33acle Database 11g: New Features for

    dministrators 1 - 33

    Oracle Database 11gRelease 1 Upgrade Paths

    The path that you must take to upgrade to Oracle Database 11g, Release 1 depends on the release

    number of your current database. It might not be possible to upgrade directly from the current

    version of the Oracle Database to the latest version. Depending on your current release, you

    might be required to upgrade through one or more intermediate releases to upgrade to Oracle

    Database 11g, Release 1.

    For example, if the current database is running release 8.1.6, follow these steps:

    1. Upgrade release 8.1.6 to release 8.1.7 by using the instructions in the Oracle8i Database

    Migration, Release 3 (8.1.7).

    2. Upgrade release 8.1.7 to release 9.2.0.8 by using the instructions in the Oracle9i DatabaseMigration, Release 2 (9.2).

    3. Upgrade release 9.2.0.8 to Oracle Database 11g, Release 1 by using the instructions in this

    lesson.

  • 7/22/2019 Oracle 11g New features Student guide

    35/590

    Oracle Database 11g: New Features for Administrators I - 34acle Database 11g: New Features for

    dministrators 1 - 34

    Choose an Upgrade Method

    Oracle Database 11g, Release 1 supports the following tools and methods for upgrading a

    database to the new release:

    Database Upgrade Assistant (DBUA)provides a graphical user interface (GUI) that

    guides you through the upgrade of a database. The DBUA can be launched during

    installation with Oracle Universal Installer, or you can launch the DBUA as a stand-alone

    tool at any time in the future. The DBUA is the recommended method for performing a

    major release upgrade or patch release upgrade.

    Manual upgradecan be performed using SQL scripts and utilities to provide a command-

    line upgrade of a database.

    Export and Import utilities:Use the Oracle Data Pump Export and Import utilities,

    available as of Oracle Database 10g, Release 1 (10.1), or the original Export and Import

    utilities to perform a full or partial export from your database, followed by a full or partial

    import into a new Oracle Database 11g, Release 1 database. Export/Import can copy a

    subset of the data, leaving the database unchanged.CREATETABLEASSELECTstatementcopies data from a database into a new Oracle

    Database 11g, Release 1 database. Data copying can copy a subset of the data, leaving the

    database unchanged.

  • 7/22/2019 Oracle 11g New features Student guide

    36/590

    Oracle Database 11g: New Features for Administrators I - 35acle Database 11g: New Features for

    dministrators 1 - 35

    Database Upgrade Assistant: Advantages and Disadvantages

    The Database Upgrade Assistant (DBUA) guides you through the upgrade process and

    configures a database for the new release. The DBUA automates the upgrade process and makes

    appropriate recommendations for configuration options such as tablespaces and redo logs. While

    the upgrade is running, the DBUA shows the upgrade progress for each component. The DBUA

    writes detailed trace and log files, and produces a complete HTML report for later reference. To

    enhance security, the DBUA automatically locks new user accounts in the upgraded database.

    The DBUA then proceeds to create new configuration files (initialization parameter and listener

    files) in the new Oracle home.

    If the DBA requires more control over the individual steps in the upgrade process, a manualupgrade is still possible. Usually, however, the manual upgrade method is more error prone, is

    harder to automate, and involves a greater amount of work than upgrading with the DBUA.

  • 7/22/2019 Oracle 11g New features Student guide

    37/590

    Oracle Database 11g: New Features for Administrators I - 36acle Database 11g: New Features for

    dministrators 1 - 36

    Sample Test Plan

    A series of carefully designed tests is required to validate all stages of the upgrade process.

    Executed rigorously and completed successfully, these tests ensure that the process of upgrading

    the production database is well understood, predictable, and successful. Perform as much testing

    as possible before upgrading the production database. Do not underestimate the importance of a

    test program.

    Testing the upgraded database is just as important as testing the upgrade process. Test the newly

    upgraded test database with existing applications to verify that they operate properly with a new

    Oracle database. You might also want to test enhanced functions by adding the available Oracle

    Database features. However, first make sure that the applications operate in the same manner asthey did in the current database.

  • 7/22/2019 Oracle 11g New features Student guide

    38/590

    Oracle Database 11g: New Features for Administrators I - 37acle Database 11g: New Features for

    dministrators 1 - 37

  • 7/22/2019 Oracle 11g New features Student guide

    39/590

    Oracle Database 11g: New Features for Administrators I - 38acle Database 11g: New Features for

    dministrators 1 - 38

    Database Upgrade Assistant (DBUA)

    The Database Upgrade Assistant (DBUA) guides you through the upgrade process and

    configures a database for the new release. The DBUA automates the upgrade process and makes

    appropriate recommendations for configuration options such as tablespaces and redo logs.

    The DBUA can be used to upgrade databases that were created with any edition of the Oracle

    Database software, including the Express Edition (XE) databases. The DBUA supports the

    following versions of Oracle Database for upgrading to Oracle Database 11g, Release 1:

    Oracle9i, Release 2 (9.2.0.4) and later 9ireleases

    Oracle Database 10g, Release 1 (10.1)

    Oracle Database 10g, Release 2 (10.2)If your database version is not in this list, you must first upgrade to the closest release listed and

    then upgrade to Oracle Database 11g, Release 1.

    The Database Upgrade Assistant is fully compliant with Oracle RAC environments. In RAC

    environments, the DBUA upgrades all database and configuration files on all nodes in the

    cluster.

    The DBUA supports upgrades of databases that use Automatic Storage Management (ASM). If

    an ASM instance is detected, you have the choice of updating both the database and the ASM, or

    updating only the ASM instance.

  • 7/22/2019 Oracle 11g New features Student guide

    40/590

    Oracle Database 11g: New Features for Administrators I - #

    The Database Upgrade Assistant supports a silent mode of operation in which no user

    interface is presented to the user. Silent mode enables you to use a single statement for the

    upgrade.

  • 7/22/2019 Oracle 11g New features Student guide

    41/590

    Oracle Database 11g: New Features for Administrators I - 39acle Database 11g: New Features for

    dministrators 1 - 39

    Key DBUA Features

    Before starting the upgrade process, Oracle Corporation strongly recommends that you back up

    your existing database, although the DBUA can perform a backup during the pre-upgrade stage.

    If you use the DBUA to back up your database, it creates a copy of all your database files in the

    directory that you specify. The DBUA performs this cold backup automatically after it shuts

    down the database and before it begins performing the upgrade procedure. However, the cold

    backup does not compress your database files, and the backup directory must be a valid file

    system path. In addition, the DBUA creates a batch file in the specified directory. You can use

    this batch file to restore the database files if needed.

    During the upgrade, the DBUA automatically modifies or creates new required tablespaces andinvokes the appropriate upgrade scripts. While the upgrade is running, DBUA shows the upgradeprogress for each component. The DBUA then creates new configuration files (parameter andlistener files) in the new Oracle home.

    The DBUA performs the following checks before the upgrade: Invalid user accounts or roles Invalid data types or invalid objects De-supported character sets Adequate resources (including rollback segments, tablespaces, and free disk space) Missing SQL scripts needed for the upgrade

  • 7/22/2019 Oracle 11g New features Student guide

    42/590

    Oracle Database 11g: New Features for Administrators I - #

    Listener running (if Oracle EM Database Control upgrade or configuration isrequested)

    The DBUA provides a comprehensive summary of the pre-upgrade checks when finished.

  • 7/22/2019 Oracle 11g New features Student guide

    43/590

    Oracle Database 11g: New Features for Administrators I - 40acle Database 11g: New Features for

    dministrators 1 - 40

    Key DBUA Features (continued)

    During the upgrade, the DBUA automatically modifies or creates new init.oraand spfile in

    the new ORACLE_HOMEdirectory. In addition, the DBUA updates the network configurations,

    creates the required tablespaces, and invokes the appropriate upgrade scripts. While the upgrade

    is running, the DBUA shows the upgrade progress for each component. The DBUA writes

    detailed trace and log files in$ORACLE_BASE/cfgtoollogs/dbua//upgradeNNand produces a complete

    HTML report for later reference.

  • 7/22/2019 Oracle 11g New features Student guide

    44/590

    Oracle Database 11g: New Features for Administrators I - 41acle Database 11g: New Features for

    dministrators 1 - 41

    Key DBUA Features (continued)

    After completing the pre-upgrade steps, the DBUA automatically archives redo logs and disables

    archiving during the upgrade phase.

    To enhance security, the DBUA automatically locks new user accounts in the upgraded database.

    The DBUA then proceeds to create new configuration files (initialization parameter and listener

    files) in the new Oracle home.

    The Database Upgrade Assistant is fully compliant with Oracle RAC environments. In RAC

    environments, the DBUA upgrades all database and configuration files on all nodes in the

    cluster.

  • 7/22/2019 Oracle 11g New features Student guide

    45/590

    Oracle Database 11g: New Features for Administrators I - 42acle Database 11g: New Features for

    dministrators 1 - 42

    Command-Line Syntax

    When invoked with the -silentcommand line option, the DBUA operates in silent mode. In

    the silent mode, the DBUA does not present a user interface. It also writes any messages

    (including information, errors, and warnings) to a log file inORACLE_HOME/cfgtoollogs/dbua/SID/upgraden, where nis the number of

    upgrades that the DBUA has performed as of this upgrade.

    For example, the following command upgrades a database named ORCL in the silent mode:

    $ dbua -silent -dbName ORCL &

    Here is a list of important options that you can use: -backupLocationdirectoryspecifies a directory to back up your database before

    the upgrade starts. -postUpgradeScriptsscript[,script]specifies a comma-delimited list of

    SQL scripts. Specify complete path names. The scripts are executed at the end of the

    upgrade. -initParamparameter=value[,parameter=value]specifies a comma-

    delimited list of initialization parameter values of the form name=value. -emConfiguration

    {CENTRAL|LOCAL|ALL|NOBACKUP|NOEMAIL|NONE}specifies the Oracle

  • 7/22/2019 Oracle 11g New features Student guide

    46/590

    Oracle Database 11g: New Features for Administrators I - #

    Enterprise Manager management options.

    Note:For more information about these options, see the Oracle Database Upgrade Guide

    11g.

  • 7/22/2019 Oracle 11g New features Student guide

    47/590

    Oracle Database 11g: New Features for Administrators I - 43acle Database 11g: New Features for

    dministrators 1 - 43

    Using DBUA to Upgrade Your Database

    To upgrade a database by using the DBUA graphical user interface:

    On Linux or UNIX platforms, enter the dbuacommand at system prompt in the Oracle Database

    11g, Release 1 environment. The DBUA Welcome screen appears.

    Click Next.

    If an ASM instance is detected on the system, the Upgrade Operations page provides you with the

    options to upgrade a database or an ASM instance. If no ASM instance is detected, the Databases

    screen appears.

    At the Upgrade Operations page, select Upgrade a Database. This operation upgrades a database toOracle Database 11g, Release 1.

    Oracle recommends that you upgrade the database and ASM in separate DBUA sessions in separate

    Oracle homes.

    Click Next.

  • 7/22/2019 Oracle 11g New features Student guide

    48/590

    Oracle Database 11g: New Features for Administrators I - 44acle Database 11g: New Features for

    dministrators 1 - 44

    Choose Database to Upgrade and Diagnostic Destination

    The Databases screen appears.

    Select the database that you want to upgrade from the Available Databases table.

    You can select only one database at a time. If you do not see the database that you want, makesure that an entry with the database name exists in the oratabfile in the etcdirectory.

    If you are running the DBUA from a user account that does not have SYSDBAprivileges, youmust enter the user name and password credentials to enable SYSDBAprivileges for the selecteddatabase.

    Click Next.

    The DBUA analyzes the database, performing the following pre-upgrade checks and displayingwarnings as necessary:

    Redo log files whose size is less than 4 MB. If such files are found, the DBUA gives the

    option to drop or create new redo log files.

    Obsolete or deprecated initialization parameters

    When the DBUA finishes its checks, the Diagnostic Destination screen appears.

    Perform one of the following:

    Accept the default location for your diagnostic destination.

    Enter the full path to a different diagnostic destination in the Diagnostic Destination field.

  • 7/22/2019 Oracle 11g New features Student guide

    49/590

    Oracle Database 11g: New Features for Administrators I - #

    Click Browse to select a diagnostic destination.

    ClickNext.

  • 7/22/2019 Oracle 11g New features Student guide

    50/590

    Oracle Database 11g: New Features for Administrators I - 45acle Database 11g: New Features for

    dministrators 1 - 45

    Moving Database Files

    If you are upgrading a single-instance database, the Move Database Files page appears.

    However, if you are upgrading an Oracle Real Application Clusters database, the Move Database

    Files page does not appear.

    Select one of the following options:

    Do Not Move Database Files as Part of Upgrade

    Move Database Files during Upgrade

    If you choose to move database files, you must also select one of the following:

    File System: Your database files are stored on the host file system.

    Automatic Storage Management (ASM): Your database files are stored on the ASMstorage, which must already exist on your system. If you do not have an ASM instance, you

    can create one using DBCA and then restart the DBUA.

    Click Next.

  • 7/22/2019 Oracle 11g New features Student guide

    51/590

    Oracle Database 11g: New Features for Administrators I - 46acle Database 11g: New Features for

    dministrators 1 - 46

    Database File Locations

    The Database File Locations screen appears.

    Select one of the following options:

    Use Common Location for All Database Files: If you choose to have all of your database

    files in one location, you must also perform one of the following:

    - Accept the default location for your database files.

    - Enter the full path to a different location in the Database File Locations field.

    - Click Browse and select a different location for your database files.

    Use Oracle-Managed Files: If you choose to use Oracle-Managed Files for your database

    files, you must also perform one of the following:- Accept the default database area.

    - Enter the full path to a different database area in the Database Area field.

    - Click Browse and select a different database area.

    Use a Mapping File to Specify Location of Database Files: This option enables you to

    specify different locations for your database files. A sample mapping file is available in the

    logging location. You can edit the property values of the mapping file to specify a different

    location for each database file.

    ClickNext.

  • 7/22/2019 Oracle 11g New features Student guide

    52/590

    Oracle Database 11g: New Features for Administrators I - 47acle Database 11g: New Features for

    dministrators 1 - 47

    Recovery Configuration

    The Recovery Configuration page enables you to designate a Flash Recovery Area for your

    database.

    If you selected Move Database Files during Upgrade, or if an Oracle Express Edition database

    is being upgraded to Oracle Enterprise Edition, then a Flash Recovery Area must be configured.

    If a Flash Recovery Area is already configured, the current settings are retained but the screen is

    displayed to enable you to override these values.

    Click Next.

  • 7/22/2019 Oracle 11g New features Student guide

    53/590

    Oracle Database 11g: New Features for Administrators I - 48acle Database 11g: New Features for

    dministrators 1 - 48

    Management Options and Database Credentials

    If no other database is already being monitored with Enterprise Manager, the Management

    Options page appears. On this page, you have the option of setting up your database so that it can

    be managed with Enterprise Manager.

    Before you can register the database with Oracle Enterprise Manager Grid Control, an Oracle

    Enterprise Manager Agent must be configured on the host computer.

    To set up your database to be managed with Enterprise Manager, select Configure the Database

    with Enterprise Manager and then select one of the proposed options.

    Click Next. The Database Credentials page appears.

    Choose one of the proposed options and click Next.

  • 7/22/2019 Oracle 11g New features Student guide

    54/590

    Oracle Database 11g: New Features for Administrators I - 49acle Database 11g: New Features for

    dministrators 1 - 49

    Network Configuration

    If the DBUA detects that multiple listeners are configured, the Network Configuration for the

    database page appears. This page has two tabs. The Listeners tab is displayed if you have more

    than one listener. The Directory Service tab appears if you have the directory services

    configured.

    On the Listeners tab, select one of the following options:

    Register this database with all the listeners

    Register this database with selected listeners only

    If you choose to register selected listeners only, you must select the listeners that you want from

    the Available Listeners list, and then use the arrow buttons to move them to the SelectedListeners list. If you want to register your database with a directory service, click the Directory

    Service tab.

    On the Directory Service tab, select one of the following options: Yes, register the database: Selecting this option enables client computers to connect to this

    database without a local name file (tnsnames.ora) and also enables them to use theOracle Enterprise User Security feature.

    No, dont register the database

    If you choose to register the database, you must also provide a user distinguished name (DN) in

  • 7/22/2019 Oracle 11g New features Student guide

    55/590

    Oracle Database 11g: New Features for Administrators I - #

    the User DN field and a password for that user in the Password field. An Oracle Wallet iscreated as part of database registration. It contains credentials suitable for passwordauthentication between this database and the directory service. Enter a password in both theWallet Password field and the Confirm Password field. Then click Next.

  • 7/22/2019 Oracle 11g New features Student guide

    56/590

    Oracle Database 11g: New Features for Administrators I - 50acle Database 11g: New Features for

    dministrators 1 - 50

    Recompile Invalid Objects

    The Recompile Invalid Objects page appears.

    Select Recompile invalid objects at the end of upgrade if you want the DBUA to recompile all

    invalid PL/SQL modules after the upgrade is complete. This ensures that you do not experience

    any performance issues when you begin using your newly upgraded database.

    If you have multiple CPUs, 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, the DBUA

    automatically adds an additional section to the Recompile Invalid Objects page and

    automatically determines the number of CPUs you have available.

    The DBUA also provides a recommended degree of parallelism, which determines how manyparallel processes are used to recompile your invalid PL/SQL modules. Specifically, the DBUAsets the degree of parallelism to one less than the number of CPUs you have available. You canadjust this default value by selecting a new value from the Degree of Parallelism list.

    Select Turn off Archiving and Flashback logging, for the duration of upgrade to reduce thetime required to complete the upgrade.

    If the database is in the ARCHIVELOGor flashback logging mode, the DBUA gives you thechoice of turning them off for the duration of the upgrade. If you choose this option, Oraclerecommends that you perform an offline backup immediately after the upgrade.

  • 7/22/2019 Oracle 11g New features Student guide

    57/590

    Oracle Database 11g: New Features for Administrators I - #

    Click Next.

  • 7/22/2019 Oracle 11g New features Student guide

    58/590

    Oracle Database 11g: New Features for Administrators I - 51acle Database 11g: New Features for

    dministrators 1 - 51

    Database Backup and Space Checks

    The Backup page appears. Select Backup database if you want the DBUA to back up your

    database. Oracle strongly recommends that you back up your database before starting the

    upgrade. If errors occur during the upgrade, you might be required to restore the database from

    the backup.

    If you use the DBUA to back up your database, it makes a copy of all your database files in the

    directory that you specify in the Backup Directory field. The DBUA performs this cold backup

    automatically after it shuts down the database, and before it begins performing the upgrade

    procedure. The cold backup does not compress your database files and the backup directory must

    be a valid file system path. You cannot specify a raw device for the cold backup files.In addition, the DBUA creates a batch file in the specified directory. You can use this batch file

    to restore the database files: On Windows operating systems, the file is db_name_restore.bat.

    On Linux and UNIX platforms, the file is db_name_restore.sh .

    If you choose not to use the DBUA for your backup, Oracle assumes that you have already

    backed up your database using your own backup procedures. Click Next.

    Note:If you decide to use the DBUA to back up your database, the DBUA checks that you have

    enough space before the backup is taken.

  • 7/22/2019 Oracle 11g New features Student guide

    59/590

    Oracle Database 11g: New Features for Administrators I - 52acle Database 11g: New Features for

    dministrators 1 - 52

    Database Upgrade Summary

    The Summary page appears. It shows the following information about the upgrade before it

    starts:

    Name, version, and Oracle home of the old and new databases

    Database backup location, available space, and space required

    Warnings ignored

    Database components to be upgraded

    Initialization parameter changes

    Database file locations

    Listener registration

    Check all of the specifications. Then perform one of the following:

    If anything is incorrect, click Back repeatedly until you reach the screen where you can

    correct it.

    Click Finish if everything is correct.

  • 7/22/2019 Oracle 11g New features Student guide

    60/590

    Oracle Database 11g: New Features for Administrators I - 53acle Database 11g: New Features for

    dministrators 1 - 53

    Upgrade Progress and Results

    The Progress screen appears, and the DBUA begins the upgrade.

    You might encounter error messages with the Ignore and Abort choices. If other errors appear,

    you must address them accordingly. If an error is severe and cannot be handled during the

    upgrade, you have the following choices:

    Click Ignore to ignore the error and proceed with the upgrade. You can fix the problem,

    restart the DBUA, and complete the skipped steps.

    Click Abort to terminate the upgrade process. If a database backup was taken by the

    DBUA, it asks if you want to restore the database. After the database has been restored, you

    must correct the cause of the error and restart the DBUA to perform the upgrade again. Ifyou do not want to restore the database, the DBUA leaves the database in its present state

    so that you can proceed with a manual upgrade.

    After the upgrade has completed, the following message is displayed:

    Upgrade is complete. Click OK to see the results of the upgrade.

    When you click OK, the Upgrade Results screen appears.

    The Upgrade Results screen displays a description of the original and upgraded databases, andthe changes made to the initialization parameters. The screen also shows the directory wherevarious log files are stored after the upgrade. You can examine these log files to obtain more

  • 7/22/2019 Oracle 11g New features Student guide

    61/590

    Oracle Database 11g: New Features for Administrators I - #

    details about the upgrade process.

    Click Restore Database if you are not satisfied with the upgrade results.

  • 7/22/2019 Oracle 11g New features Student guide

    62/590

    Oracle Database 11g: New Features for Administrators I - 54acle Database 11g: New Features for

    dministrators 1 - 54

  • 7/22/2019 Oracle 11g New features Student guide

    63/590

    Oracle Database 11g: New Features for Administrators I - 55acle Database 11g: New Features for

    dministrators 1 - 55

    You are now ready to use Oracle Database 11g, Release 1!

    After you have upgraded your database and before you can consider the database operational,

    you must complete some post-upgrade tasks regardless of whether you performed the upgrade

    either manually or by using the DBUA. Some of the more common tasks include:

    Update environment variables (Linux and UNIX systems only)

    Adjust initialization parameters as needed

    Upgrade the Recovery Catalog

    Test your applications and tune performance Upgrade the statistics tables created by the DBMS_STATSpackage

    Enable Oracle Database Vault Upgrade the TIMESTAMPdata

    Use the latest Time Zone file for clients

  • 7/22/2019 Oracle 11g New features Student guide

    64/590

    Oracle Database 11g: New Features for Administrators I - 56acle Database 11g: New Features for

    dministrators 1 - 56

    Deprecated Features in Oracle Database 11g, Release 1

    The slide lists the Oracle Database features that are deprecated in Oracle Database 11g, Release

    1. Although they are supported in this release for backward compatibility, Oracle recommends

    that you migrate away from these deprecated features:

    Oracle Ultra Search

    Java Development Kit (JDK) 1.4: Oracle recommends that you use JDK 5.0; however, JDK

    1.5 is also fully supported.

    CTXXPATH index: Oracle recommends that you use XMLIndex instead.

  • 7/22/2019 Oracle 11g New features Student guide

    65/590

    Oracle Database 11g: New Features for Administrators I - 57acle Database 11g: New Features for

    dministrators 1 - 57

    Important Initialization Parameter Changes

    The DIAGNOSTIC_DESTinitialization parameter replaces the USER_DUMP_DEST,

    BACKGROUND_DUMP_DEST, and CORE_DUMP_DESTparameters. Starting with Oracle

    Database 11g, the default location for all trace information is defined by DIAGNOSTIC_DEST,which defaults to $ORACLE_BASE/diag. Old parameters are ignored if specified.

    For more information about diagnostics, refer to the lesson titled Diagnosability

    Enhancements.

    A newly installed Oracle Database 11ginstance defaults to automatic undo management mode,

    and, if the database is created with the DBCA, an undo tablespace is automatically created. A

    null value for the UNDO_MANAGEMENTinitialization parameter now defaults to automatic undomanagement; in previous releases, it defaulted to manual undo management mode. You must

    therefore use caution when upgrading a previous release to Oracle Database 11g.

    Note: The CONTROL_MANAGEMENT_PACK_ACCESSinitialization parameter specifies the

    Server Manageability Packs that should be active. The following packs are available: The DIAGNOSTICpack includes AWR, ADDM, and so on.

    The TUNINGpack includes SQL Tuning Advisor, SQL Access Advisor, and so on.

    A license for DIAGNOSTICis required to enable the TUNINGpack.

  • 7/22/2019 Oracle 11g New features Student guide

    66/590

    Oracle Database 11g: New Features for Administrators I - #

    Possible values for this parameter are NONE, DIAGNOSTIC, and DIAGNOSTIC+TUNING

    (default).

  • 7/22/2019 Oracle 11g New features Student guide

    67/590

    Oracle Database 11g: New Features for Administrators I - 59acle Database 11g: New Features for

    dministrators 1 - 59

    Direct NFS Client: Overview

    Direct NFS is implemented as a Direct Network File System client as part of the Oracle RDBMSkernel in the Oracle Disk Manager library. NAS-based storage systems use Network File Systemto access data. In Oracle Database 10g, NAS storage devices are accessed using the operatingsystemprovided kernel Network File System driver, which requires specific configuration

    settings to ensure its efficient and correct usage with Oracle Database. The following are themajor problems that arise from incorrectly specifying these configuration parameters:

    NFS clients are very inconsistent across platforms and vary across operating systemreleases.

    With more than 20 parameters to tune, manageability is affected.

    Oracle Direct Network File System implements the NFS version 3 protocol in the OracleRDBMS kernel. The following are the main advantages of implementing Oracle Direct NFS:

    It enables complete control over the input/output path to Network File Servers. This resultsin predictable performance and enables simpler configuration management and a superiordiagnosability.

    Its operations avoid the kernel Network File System layer bottlenecks and resourcelimitations. However, the kernel is still used for network communication modules.

    It provides a common Network File System interface for Oracle for potential use on allhost platforms and supported Network File System servers.

  • 7/22/2019 Oracle 11g New features Student guide

    68/590

    Oracle Database 11g: New Features for Administrators I - #

    It enables improved performance through load balancing across multiple connectionsto Network File System servers and deep pipelines of asynchronous input/outputoperations with improved concurrency.

  • 7/22/2019 Oracle 11g New features Student guide

    69/590

    Oracle Database 11g: New Features for Administrators I - 60acle Database 11g: New Features for

    dministrators 1 - 60

    Direct NFS Configuration

    By default, Direct NFS attempts to serve mount entries found in /etc/mtab. No other

    configuration is required. You can optionally use oranfstabto specify additional Oracle-

    specific options to Direct NFS. For example, you can use oranfstabto specify additional

    paths for a mount point as shown in the example in the slide.

    When oranfstabis placed in $ORACLE_HOME/dbs, its entries are specific to a single

    database. However, when oranfstabis placed in /etc, it is global to all Oracle databases

    and thus, can contain mount points for all Oracle databases.

    Direct NFS looks for the mount point entries in the following order:

    $ORACLE_HOME/dbs/oranfstab, /etc/oranfstab, and /etc/mtab. It uses the firstmatched entry as the mount point.

    In all cases, Oracle requires that mount points be mounted by the kernel NFS system even when

    being served through Direct NFS. Oracle verifies kernel NFS mounts by cross-checking entriesin oranfstabwith the operating system NFS mount points. If a mismatch exists, Direct NFS

    logs an informational message and does not serve the NFS server.

  • 7/22/2019 Oracle 11g New features Student guide

    70/590

    Oracle Database 11g: New Features for Administrators I - 62acle Database 11g: New Features for

    dministrators 1 - 62

    Monitoring Direct NFS

    Use the following views for Direct NFS management: V$DNFS_SERVERS: Shows a table of servers accessed using Direct NFS V$DNFS_FILES: Shows a table of files currently open using Direct NFS V$DNFS_CHANNELS: Shows a table of open network paths (or channels) to servers for

    which Direct NFS is providing files V$DNFS_STATS: Shows a table of performance statistics for Direct NFS

  • 7/22/2019 Oracle 11g New features Student guide

    71/590

    Oracle Database 11g: New Features for Administrators I - 63acle Database 11g: New Features for

    dministrators 1 - 63

    Hot Patching: Overview

    Hot patching provides the ability to install, enable, and disable a bug fix or diagnostic patch on a

    live, running Oracle instance. Using hot patching is the recommended solution for avoiding

    down time when applying hot patches. Oracle provides the capability to do hot patching with anyOracle database using the opatchcommand-line utility. Hot patches can be provided when the

    changed code is small in scope and complexity (for example, with diagnostic patches or small

    bug fixes).

  • 7/22/2019 Oracle 11g New features Student guide

    72/590

    Oracle Database 11g: New Features for Administrators I - 64acle Database 11g: New Features for

    dministrators 1 - 64

    Installing a Hot Patch

    Unlike traditional patching mechanisms, applying a hot patch does not require instance

    shutdown or restart.

    Similar to traditional patching, you can use OPatch to install a hot patch.

    You can determine whether a patch is a hot patch by using the following command:

    opatchquery -is_online_patch oropatchquery -all

    Note:The patched code is shipped as a dynamic/shared library, which is then mapped into

    memory by each Oracle process.

  • 7/22/2019 Oracle 11g New features Student guide

    73/590

    Oracle Database 11g: New Features for Administrators I - 65acle Database 11g: New Features for

    dministrators 1 - 65

    Benefits of Hot Patching

    You do not have to shut down your database instance while you apply the hot patch. Unlike

    conventional patching, hot patching is extremely fast to install and uninstall. Because hot

    patching uses OPatch, you get all the benefits that you already have with conventional patching

    that uses OPatch. It does not matter how long or how many times you shut down your

    databasea hot patch always persists across instance shutdown and startup.

  • 7/22/2019 Oracle 11g New features Student guide

    74/590

    Oracle Database 11g: New Features for Administrators I - 66acle Database 11g: New Features for

    dministrators 1 - 66

    Conventional Patching and Hot Patching

    Conventional patching basically requires a shutdown of your database instance.

    Hot patching does not require any down time. Applications can keep running while you install a

    hot patch. Similarly, hot patches that have been installed can be uninstalled with no down time.

  • 7/22/2019 Oracle 11g New features Student guide

    75/590

    Oracle Database 11g: New Features for Administrators I - 67acle Database 11g: New Features for

    dministrators 1 - 67

    Hot Patching Considerations

    One operating system (OS) page is typically 4 KB on Linux x86 and 8 KB on Solaris SPARC64.

    With an average of approximately one thousand Oracle processes running at the same time, this

    represents around 4 MB of extra memory for a small hot patch.

  • 7/22/2019 Oracle 11g New features Student guide

    76/590

    Oracle Database 11g: New Features for Administrators I - 68acle Database 11g: New Features for

    dministrators 1 - 68

    Hot Patching Considerations (continued)

    A vast majority of diagnostic patches are available as hot patches. For bug fixes, it really

    depends on their nature. Not every bug fix or diagnostic patch is available as a hot patch. But the

    long-term goal of the hot-patching facility is to provide hot-patching capabilities for Critical

    Patch Updates.

  • 7/22/2019 Oracle 11g New features Student guide

    77/590

    Oracle Database 11g: New Features for Administrators I - 69acle Database 11g: New Features for

    dministrators 1 - 69

  • 7/22/2019 Oracle 11g New features Student guide

    78/590

    Oracle Database 11g: New Features for Administrators I - 70acle Database 11g: New Features for

    dministrators 1 - 70

  • 7/22/2019 Oracle 11g New features Student guide

    79/590

    Oracle Database 11g: New Features for Administrators I - 72

  • 7/22/2019 Oracle 11g New features Student guide

    80/590

  • 7/22/2019 Oracle 11g New features Student guide

    81/590

    Oracle Database 11g: New Features for Administrators I - 74acle Database 11g: New Features for

    dministrators 2 - 74

    Note:In this lesson, the termASM data extentis shortened to extent.

  • 7/22/2019 Oracle 11g New features Student guide

    82/590

    Oracle Database 11g: New Features for Administrators I - 75acle Database 11g: New Features for

    dministrators 2 - 75

    Without ASM Fast Mirror Resync

    ASM offlines a disk whenever it is unable to complete a write to an extent allocated to the disk,

    while writing at least one mirror copy of the same extent on another disk if the corresponding

    disk group uses ASM redundancy.

    With Oracle Database 10g, ASM assumes that an offline disk contains only stale data; therefore,

    it no longer reads from such disks. Shortly after a disk is put offline, ASM drops it from the disk

    group by re-creating the extents allocated to the disk on the remaining disks in the disk group

    using redundant extent copies. This process is a relatively costly operation and can take hours to

    complete.

    If the disk failure is only a transient failure (such as failure of cables, host bus adapters,controllers, or disk power supply interruptions), you have to add the disk again after the transient

    failure is fixed. However, adding the dropped disk back to the disk group incurs the additional

    cost of migrating the extents back to the disk.

  • 7/22/2019 Oracle 11g New features Student guide

    83/590

    Oracle Database 11g: New Features for Administrators I - 76acle Database 11g: New Features for

    dministrators 2 - 76

    ASM Fast Mirror Resync: Overview

    ASM fast mirror resync significantly reduces the time required to resynchronize a transient

    failure of a disk. When a disk goes offline following a transient failure, ASM tracks the extents

    that are modified during the outage. When the transient failure is repaired, ASM can quickly

    resynchronize only the ASM disk extents that have been affected during the outage.

    This feature assumes that the content of the affected ASM disks has not been damaged or

    modified.

    When an ASM disk path fails, the ASM disk is taken offline but not dropped if you have set theDISK_REPAIR_TIMEattribute for the corresponding disk group. The setting for this attribute

    determines the duration of disk outage that ASM will tolerate while still being able toresynchronize after you complete the repair.

    Note:The tracking mechanism uses one bit for each modified extent. This ensures that the

    tracking mechanism is very efficient.

  • 7/22/2019 Oracle 11g New features Student guide

    84/590

    Oracle Database 11g: New Features for Administrators I - 77acle Database 11g: New Features for

    dministrators 2 - 77

    Using EM to Perform Fast Mirror Resync

    When you offline an ASM disk in Oracle Enterprise Manager (EM), you are asked to confirm the

    operation. On the Confirmation page, you can override the default disk repair time. Similarly,

    you can view by failure group and choose a particular failure group to offline.

  • 7/22/2019 Oracle 11g New features Student guide

    85/590

    Oracle Database 11g: New Features for Administrators I - 78acle Database 11g: New Features for

    dministrators 2 - 78

    Using EM to Perform Fast Mirror Resync (continued)

    You can also online disks by using Enterprise Manager.

  • 7/22/2019 Oracle 11g New features Student guide

    86/590

    Oracle Database 11g: New Features for Administrators I - 79acle Database 11g: New Features for

    dministrators 2 - 79

    Setting Up ASM Fast Mirror Resync

    You set up this feature on a perdisk group basis. You can do so after disk-group creation usingthe ALTERDISKGROUPcommand. Use a command similar to the following to enable ASM fast

    mirror resync:

    ALTERDISKGROUPSETATTRIBUTE'DISK_REPAIR_TIME'='2D4H30M'

    After you repair the disk, run the SQL statement ALTERDISKGROUPONLINEDISK. This

    statement brings a repaired disk group back online to enable writes so that no new writes are

    missed. This statement also starts a procedure to copy all extents that are marked as stale on theirredundant copies. You cannot apply the ONLINEstatement to already-dropped disks.

    You can view the current attribute values by querying the V$ASM_ATTRIBUTEview.

    You can determine the time left before ASM drops an offlined disk by querying theREPAIR_TIMERcolumn of either V$ASM_DISKor V$ASM_DISK_IOSTAT. In addition, arow corresponding to a disk resync operation appears in V$ASM_OPERATIONwith the

    OPERATIONcolumn set to SYNC.

  • 7/22/2019 Oracle 11g New features Student guide

    87/590

    Oracle Database 11g: New Features for Administrators I - 81acle Database 11g: New Features for

    dministrators 2 - 81

    ASM Preferred Mirror Read: Overview

    When you configure ASM failure groups in Oracle Database 10g, ASM always reads the primary

    copy of a mirrored extent. It may be more efficient for a node to read from a failure group extent

    that is closest to the node, even if it is a secondary extent. This is especially true in extended

    cluster configurations (when nodes are spread across several sites) where reading from a local

    copy of an extent provides improved performance.

    With Oracle Database 11g, you can do this by configuring the preferred mirror read using thenew initialization parameter, ASM_PREFERRED_READ_FAILURE_GROUPS, to specify a list

    of preferred mirror read names. The disks in those failure groups become the preferred read

    disks. Thus, every node can read from its local disks. This results in higher efficiency andperformance, and reduced network traffic. The setting for this parameter is instance-specific.

  • 7/22/2019 Oracle 11g New features Student guide

    88/590

    Oracle Database 11g: New Features for Administrators I - 82acle Database 11g: New Features for

    dministrators 2 - 82

    ASM Preferred Mirror Read: Setup

    To configure this feature, set the new ASM_PREFERRED_READ_FAILURE_GROUPS

    initialization parameter. This parameter is a multivalued parameter and should contain a string

    with a list of failure group names separated by commas. Each failure group name specified

    should be prefixed with its disk group name and a . character. This parameter is dynamic andcan be modified using the ALTERSYSTEMcommand at any time. An example is shown in the

    slide. However, this initialization parameter is valid only for ASM instances. With the extended

    cluster, the failure groups specified in this parameter should contain only those disks that are

    local to the corresponding instance.

    The new column PREFERRED_READhas been added to the V$ASM_DISKview. Its format is asingle character. If the disk group to which the disk belongs pertains to a preferred read failuregroup, the value of this column is Y.

    To identify specific performance issues with the ASM preferred read failure groups, use theV$ASM_DISK_IOSTATview. This view displays the disk I/O statistics for each ASM client. If

    this view is queried from a database instance, only the rows for this instance are shown.

  • 7/22/2019 Oracle 11g New features Student guide

    89/590

    Oracle Database 11g: New Features for Administrators I - 83acle Database 11g: New Features for

    dministrators 2 - 83

    Enterprise Manager ASM Configuration Page

    You can specify a set of disks as preferred disks for each ASM instance by using Enterprise

    Manager. The preferred read attributes are instance-specific. In Oracle Database 11g, thePreferred Read Failure Groups field (asm_preferred_read_failure_group) is added

    to the configuration page.

    This parameter only takes effect before the disk group is mounted or when the disk group is

    created. It applies only to newly opened files or to a newly loaded extend map for a file.

  • 7/22/2019 Oracle 11g New features Student guide

    90/590

    Oracle Database 11g: New Features for Administrators I - 84acle Database 11g: New Features for

    dministrators 2 - 84

    ASM Preferred Mirror Read: Best Practice

    In practice, there are only a limited number of good disk group configurations in an extended

    cluster. A good configuration takes into account both performance and availability of a disk

    group in an extended cluster. Here are some possible examples:

    For a two-site extended cluster, a normal redundancy disk group should have only two failure

    groups; all disks local to one site should belong to the same failure group. Also, no more than

    one failure group should be specified as a preferred read failure group by each instance. If there

    are more than two failure groups, ASM may not mirror a virtual extent across both sites.

    Furthermore, if the site with more than two failure groups were to go down, it would take the

    disk group down as well. If the disk group to be created is a high-redundancy disk group, at mosttwo failure groups should be created on each site with its local disks, with both local failure

    groups specified as preferred read failure groups for the local instance.

    For a three-site extended cluster, a high redundancy disk group with three failure groups should

    be used. In this way, ASM can guarantee that each virtual extent has a mirror copy local to each

    site and that the disk group is protected against a catastrophic disaster on any of the three sites.

  • 7/22/2019 Oracle 11g New features Student guide

    91/590

    Oracle Database 11g: New Features for Administrators I - 85acle Database 11g: New Features for

    dministrators 2 - 85

    ASM Scalability and Performance Enhancements

    ASM Variable Size Extents is an automated feature that enables ASM to support larger file sizes

    while improving memory usage efficiency.

    In Oracle Database 11g, ASM supports variable sizes for extents of 1, 8, and 64 allocation units

    (AU). ASM uses a predetermined number of extents of each size. As soon as a file crosses a

    certain threshold, the next extent size is used.

    With this feature, fewer extent pointers are needed to describe the file and less memory is

    required to manage the extent maps in the shared pool (which would have been prohibitive in

    large file configurations). Extent size can vary both across files and within files.

    Variable Size Extents also enables you to deploy Oracle databases using ASM that are severalhundred TB (or even several PB) in size.

    Note:The management of Variable Size Extents is completely automated and does not require

    manual administration.

  • 7/22/2019 Oracle 11g New features Student guide

    92/590

    Oracle Database 11g: New Features for Administrators I - 87acle Database 11g: New Features for

    dministrators 2 - 87

    ASM Scalability in Oracle Database 11g

    ASM imposes the following limits:

    63 disk groups in a storage system

    10,000 ASM disks in a storage system

    4 petabytes maximum storage for each ASM disk

    40 exabytes maximum storage for each storage system

    1 million files for each disk group

    Maximum file size depends on the redundancy type of the disk groups used: 140 PB for

    external redundancy (value currently greater than possible database file size), 42 PB for

    normal redundancy, and 15 PB for high redundancy.

    Note:In Oracle Database 10g, the maximum ASM file size for external redundancy is 35 TB.

  • 7/22/2019 Oracle 11g New features Student guide

    93/590

    Oracle Database 11g: New Features for Administrators I - 88acle Database 11g: New Features for

    dministrators 2 - 88

    SYSASMRoleThis feature introduces a new SYSASMrole that is specifically intended for performing ASM

    administration tasks. Using the SYSASMrole instead of the SYSDBArole improves security by

    separating ASM administration from database administration.

    With Oracle Database 11g, Release 1, the OS group for SYSASMand SYSDBAis the same, andthe default installation group for SYSASMis dba. In a future release, separate groups will have

    to be created, and SYSDBAusers will be restricted in ASM instances.

    As a member of the dbagroup, you can currently connect to an ASM instance by using the first

    statement in the slide.

    You also have the ability to use the combination of CREATEUSERand GRANTSYSASMSQLstatements from an ASM instance to create a new SYSASMuser. This can be useful for remote

    ASM administration. These commands update the password file of each ASM instance and donot need the instance to be up and running. Similarly, you can revoke the SYSASMrole from a

    user by using the REVOKEcommand, and you can drop a user from the password file by using

    the DROPUSERcommand.

    The V$PWFILE_USERSview integrates a new column called SYSASM, which indicates

    whether the user can connect with SYSASMprivileges (TRUE) or not (FALSE).

  • 7/22/2019 Oracle 11g New features Student guide

    94/590

    Oracle Database 11g: New Features for Administrators I - #

    Note:With Oracle Database 11g, Release 1, if you log in to an ASM instance as SYSDBA,

    warnings are written in the corresponding alert.logfile.

  • 7/22/2019 Oracle 11g New features Student guide

    95/590

    Oracle Database 11g: New Features for Administrators I - 89acle Database 11g: New Features for

    dministrators 2 - 89

    Using EM to Manage ASM Users

    Oracle Enterprise Manager 11genables you to manage the users who access the ASM instance

    through remote connection (using password file authentication). These users are used exclusively

    for the ASM instance.

    However, you have this functionality only when connected as the SYSASMuser. It is hidden ifyou connect as the SYSDBAor SYSOPERuser.

    When you click the Create button, the Create User page is displayed.

    When you click the Edit button, the Edit User page is displayed.

    By clicking the Delete button, you can delete the created users.

    Note:Oracle Database 11gadds the SYSASMrole to the ASM instance login page.

  • 7/22/2019 Oracle 11g New features Student guide

    96/590

    Oracle Database 11g: New Features for Administrators I - 90acle Database 11g: New Features for

    dministrators 2 - 90

    ASM Disk Group Compatibility

    There are two kinds of compatibility applicable to ASM disk groups:

    ASM compatibility: Dealing with the persistent data structures that describe a disk group

    RDBMS compatibility: Dealing with the capabilities of the clients (consumers of disk

    groups)

    The compatibility of each disk group is independently controllable. This is required to enable

    heterogeneous environments with disk groups from both Oracle Database 10gand Oracle

    Database 11g. These two compatibility settings are attributes of each ASM disk group:

    RDBMS compatibility refers to the minimum compatible version of the RDBMS instance

    that would allow the instance to mount the disk group. This compatibility determines theformat of messages that are exchanged between the ASM and database (RDBMS)

    instances. An ASM instance is capable of supporting different RDBMS clients running at

    different compatibility settings. The database-compatible version setting of each instance

    must be greater than or equal to the RDBMS compatibility of all disk groups used by that

    database. Database instances are typically run from a different Oracle home than the ASM

    instance. This implies that the database instance may be running a different software

    version than the ASM instance. When a database instance first connects to an ASM

    instance, it negotiates the highest version that they both can support. The compatibility

  • 7/22/2019 Oracle 11g New features Student guide

    97/590

    Oracle Database 11g: New Features for Administrators I - #

    parameter setting of the database, the software version of the database, and the

    RDBMS compatibility setting of a disk group determine whether a database instance

    can mount a given disk group.

  • 7/22/2019 Oracle 11g New features Student guide

    98/590

    Oracle Database 11g: New Features for Administrators I - 92acle Database 11g: New Features for

    dministrators 2 - 92

    ASM Disk Group Attributes

    When you create or alter an ASM disk group, you can change its attributes by using the newATTRIBUTEclause of the CREATEDISKGROUPor ALTERDISKGROUPcommands. These

    attributes are briefly summarized in the table in the slide:

    ASM enables the use of different AU sizes that you specify when you create a disk group.

    The AU size can be 1 MB, 2 MB, 4 MB, 8 MB, 16 MB, 32 MB, or 64 MB.

    RDBMS compatibility: See the slide titled ASM Disk Group Compatibility for more

    information.

    ASM compatibility: See the slide titled ASM Disk Group Compatibility for more

    information. You can specify the DISK_REPAIR_TIME in units of minutes (M), hours (H), or days (D).

    If you omit the unit, the default is H. If you omit this attribute, then the default is 3.6H. You

    can override this attribute with an ALTERDISKGROUPstatement.

    You can specify the redundancy attribute of the specified template.

    You can specify the striping attribute of the specified template.

    Note:For each defined disk group, you can look at all the defined attributes by using theV$ASM_ATTRIBUTEfixed view.

  • 7/22/2019 Oracle 11g New features Student guide

    99/590

    Oracle Database 11g: New Features for Administrators I - 93acle Database 11g: New Features for

    dministrators 2 - 93

    Using EM to Edit Disk Group Attributes

    EM provides a simple way to store and retrieve environment settings related to disk groups.

    You can now set the compatible attributes from both the Create Disk Group page and the EditAdvanced Attributes for Disk Group page. The disk_repair_timeattribute is added to only

    the Edit Advanced Attributes for Disk Group page.

    Note:For 11gASM instances, the default ASM and Database compatibility values are 11.1.

  • 7/22/2019 Oracle 11g New features Student guide

    100/590

    Oracle Database 11g: New Features for Administrators I - 94acle Database 11g: New Features for

    dministrators 2 - 94

    Enhanced Disk Group Checks

    The CHECKdisk group command is simplified to check all the metadata directories by default.

    The CHECKcommand lets you verify the internal consistency of the ASM disk group metadata.

    ASM displays summary errors and writes the details of the detected errors in the alert log.

    In earlier releases, you could specify this clause for ALL, DISK, DISKSINFAILGROUP, andFILE. Those clauses have been deprecated because they are no longer needed. In the current

    release, the CHECKkeyword performs the following operations:

    Checks the consistency of the disk (equivalent to CHECKDISKand CHECKDISKINFAILGROUPin previous releases)

    Cross-checks all the file extent maps and allocation tables for consistency (equivalent toCHECKFILEin previous releases)

    Checks that the alias metadata directory and the file directory are linked correctly

    Checks that the alias directory tree is linked correctly

    Checks that ASM metadata directories do not have unreachable allocated blocks

    The REPAIR| NOREPAIRclause enables you to tell ASM whether or not to attempt to repairthe errors found during the consistency check. The default is REPAIR. The NOREPAIRsetting

    is useful when you want to be alerted to any inconsistencies but do not want ASM to take any

    automatic action to resolve them.

  • 7/22/2019 Oracle 11g New features Student guide

    101/590

    Oracle Database 11g: New Features for Administrators I - #

    Note:Introducing extra checks as part of check disk group slows down the entire checkdisk group operation.

  • 7/22/2019 Oracle 11g New features Student guide

    102/590

    Oracle Database 11g: New Features for Administrators I - 95acle Database 11g: New Features for

    dministrators 2 - 95

    Restricted Mount Disk Group for Fast Rebalance

    A new mount mode to mount a disk group in Oracle Database 11gis called RESTRICTED.

    When a disk group is mounted in RESTRICTEDmode, clients cannot access the files in a disk

    group. When an ASM instance knows that there are no clients, the instance improves the

    performance of the rebalance operation by not attempting to message clients for

    locking/unlocking extent maps.

    A disk group mounted in RESTRICTEDmode is mounted exclusively on only one node; clients

    of ASM on that node cannot use that disk group.

    The RESTRICTEDmode allows you to perform all maintenance tasks on a disk group in the

    ASM instance without external interaction.At the end of the maintenance cycle, you must explicitly dismount the disk group and remount it

    in normal mode.

    The ALTERDISKROUPdiskgroupnameMOUNTcommand is extended to enable ASM to

    mount the disk group in RESTRICTEDmode. An example is shown in the slide.

    When you use the RESTRICTEDoption to start up an ASM instance, all disk groups defined in

    the ASM_DISKGROUPSparameter are mounted in RESTRICTEDmode.

  • 7/22/2019 Oracle 11g New features Student guide

    103/590

    Oracle Database 11g: New Features for Administrators I - 96acle Database 11g: New Features for

    dministrators 2 - 96

    Mount Force Disk Group

    This feature alters the behavior of ASM when mounting an incomplete disk group.

    With Oracle Database 10g, as long as there are enough failure groups to mount a disk group, the

    mount operation succeeds, even when there are missing or damaged failure groups. This

    behavior has the potential to automatically drop ASM disks, requiring their addition again later

    after repair, and thus incurring a long rebalance operation.

    With Oracle Database 11g, such an operation fails unless you specify the new FORCEoption

    when mounting the damaged disk group. This allows you to correct configuration errors (such asASM_DISKSTRINGset incorrectly) or connectivity issues before trying the mount again.

    However, disk groups mounted with the FORCEoption could potentially have one or more disksoffline if they were not available at the time of the mount. You must take corrective action beforeDISK_REPAIR_TIMEexpires to restore those devices. Failing to online those devices results

    in the disks being expelled from the disk group and costly rebalancing being required to restore

    redundancy for all the files in the disk group. Also, if one or more devices are offlined as a resultof MOUNTFORCE, some or all files will not be properly protected until the redundancy is

    restored in the disk group via rebalance.

    Therefore, MOUNTwith FORCEis useful when you know that some of the disks belonging to a

    disk group are unavailable. The disk group mount succeeds if ASM finds enough disks to form a

  • 7/22/2019 Oracle 11g New features Student guide

    104/590

    Oracle Database 11g: New Features for Administrators I - #

    quorum.

  • 7/22/2019 Oracle 11g New features Student guide

    105/590

    Oracle Database 11g: New Features for Administrators I - 98acle Database 11g: New Features for

    dministrators 2 - 98

    Forcing Disk Group Drop

    Drop disk group force marks the headers of disks belonging to a disk group that cannot bemounted by the ASM instance as FORMER. However, the ASM instance first determines whether

    the disk group is being used by any other ASM instance using the same storage subsystem. If it is

    being used, and if the disk group is in the same cluster or on the same node, the statement fails.

    If the disk group is in a different cluster, the system checks further to determine whether the disk

    group is mounted by an instance in the other cluster. If the disk group is mounted elsewhere, the

    statement fails. However, this latter check is not as definitive as the checks for disk groups in the

    same cluster. You should therefore use this clause with caution.

    Note:When executing the DROPDISKGROUPcommand with the FORCEoption, you must alsospecify the INCLUDINGCONTENTSclause.

  • 7/22/2019 Oracle 11g New features Student guide

    106/590

    Oracle Database 11g: New Features for Administrators I - 99acle Database 11g: New Features for

    dministrators 2 - 99

    ASMCMD Extensions

    ASMCMD is extended to include ASM metadata backup and to restore functionality. This

    provides the ability to re-create a preexisting ASM disk group with the exact template and

    alias directory structure. Currently, if an ASM disk group is lost, it is possible to restore the

    lost files by using RMANbut you must manually re-create the ASM disk group and any

    required user directories or templates.

    ASM metadata backup and restore (AMBR) works in two modes:

    - In backup mode, AMBR parses ASM fixed tables and views to gather information

    about existing disks and failure group configurations, templates, and alias directory

    structures.It then dumps this metadata information to a text file.

    - In restore mode, AMBR reads the previously generated file to reconstruct the disk

    group and its metadata. You have the ability to control AMBR behavior in restoremode to do a full, nodg, or newdgrestore. The difference among the three

    submodes is in whether you want to include the disk group creation and change its

    characteristics.

    The lsdskcommand lists ASM disk information. This command can run in two modes:

    - In connected mode, ASMCMD uses the V$and GV$views to retrieve disk

  • 7/22/2019 Oracle 11g New features Student guide

    107/590

    Oracle Database 11g: New Features for Administrators I - #

    information.

    - In nonconnected mode, ASMCMD scans disk headers to retrieve disk

    information, using an ASM disk string to restrict the discovery set. The

    connected mode is always attempted first.

  • 7/22/2019 Oracle 11g New features Student guide

    108/590

    Oracle Database 11g: New Features for Administrators I - 101acle Database 11g: New Features for

    dministrators 2 - 101

    ASMCMD Extensions: Example

    This example describes how to back up ASM metadat