Previous  |  Next  >  
Product: Storage Foundation for Databases Guides   
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide   

Oracle File Mapping (ORAMAP)

VERITAS has defined and implemented two libraries: libvxoramap_64.so for HPUX PA and libvxoramap_64.sl for HPUX IA architecture. These two libraries provide a mapping interface to Oracle9i release 2 or later. libvxoramap_64.so serves as a bridge between Oracle's set of storage APIs (known as "ORAMAP") and VERITAS Federated Mapping Service (VxMS), a library that assists in the development of distributed SAN applications that must share information about the physical location of files and volumes on a disk.

With VERITAS Storage Foundation for Oracle Storage Mapping option, you can view the complete I/O topology mapping of datafiles through intermediate layers like logical volumes down to actual physical devices. This information can be used to determine the exact location of an Oracle data block on a physical device and to help identify hot spots.


Note   Note    To use the mapping functionality, you must be using Oracle 9.2.0.3 or later.

Mapping Components

The mapping components in the System Global Area (SGA) and Oracle's representation of these components are described in this section. You will need an understanding of these components to interpret the mapping information in Oracle's dynamic performance views.

The mapping information in Oracle's dynamic performance views consists of:

  • File components
  • A mapping file component is a mapping structure describing a file. It provides a set of attributes for a file, including the file's size, number of extents, and type. File components are exported to the user through V$MAP_FILE.
  • File extent components
  • A mapping file extent component describes a contiguous group of blocks residing on one element. The description specifies the device offset, the extent size, the file offset, the extent type (Data or Parity), and the name of the element where the extent resides.
  • Element components
  • A mapping element component is a mapping structure that describes a storage component within the I/O stack. Elements can be mirrors, stripes, partitions, RAID5, concatenated elements, and disks.
    This component contains information about the element's mapping structure, such as the element's size, type, number of subelements, and a brief description. Element components are exported to the user through V$MAP_ELEMENT.
  • Subelement components
  • A mapping subelement component describes the link between an element and the next element in the I/O stack. The subelement component contains the subelement number, size, the element name for the subelement, and the element offset. Subelement components are exported to the user through V$MAP_SUBELEMENT.

These four types of mapping components completely describe the mapping information for an Oracle instance.

Storage Mapping Views

The mapping information that is captured is presented in Oracle's dynamic performance views. Brief descriptions of these views are provided below. For more detailed information, refer to your Oracle documentation.

View Description

V$MAP_LIBRARY

Contains a list of all the mapping libraries that have been dynamically loaded by the external process.

V$MAP_FILE

Contains a list of all the file mapping structures in the shared memory of the instance.

V$MAP_FILE_EXTENT

Contains a list of all the file extent mapping structures in the shared memory of the instance.

V$MAP_ELEMENT

Contains a list of all the element mapping structures in the SGA of the instance.

V$MAP_EXT_ELEMENT

Contains supplementary information for all element mapping structures.

V$MAP_SUBELEMENT

Contains a list of all subelement mapping structures in the shared memory of the instance.

V$MAP_COMP_LIST

Describes the component list associated with the element name.

V$MAP_FILE_IO_STACK

Contains the hierarchical arrangement of storage containers for the file. This information is displayed as a series of rows. Each row represents a level in the hierarchy.

Verifying Oracle File Mapping Setup

  To verify that $ORACLE_HOME is set up for Oracle file mapping (ORAMAP)

  1. Enter:
    cd $ORACLE_HOME/rdbms/filemap/bin
    ls –l
    -r-xr-x--- 1 root system 900616 Apr 08 19:16 fmputl
    -r-sr-xr-x 1 root system 14614 Apr 08 19:16 fmputlhp
  2. Verify that:

    • fmputlhp is owned by root and that the setud bit is set.
    • The permissions for fmputlhp are set to -r-sr-xr-x.
    • The permissions for fmputl are set to -r-xr-x---.

  3. If any of these items is not set as specified, make the appropriate corrections.

Enabling Oracle File Mapping

  To enable Oracle file mapping with the VERITAS Storage Mapping option

  1. Ensure that the file filemap.ora exists and contains a valid entry for the VERITAS mapping library for Oracle storage mapping.
      # cd $ORACLE_HOME/rdbms/filemap/etc
      # cat filemap.ora

    For 64-bit Oracle, the filemap.ora file should contain the following setting:


      lib=VERITAS:/opt/VRTSdbed/lib/libvxoramap_64.so
      lib=VERITAS:/opt/VRTSdbed/lib/libvxoramap_64.so for PA
      lib=VERITAS:/opt/VRTSdbed/lib/libvxoramap_64.sl for IA
  2. After verifying that the system is using the VERITAS library for Oracle storage mapping, set the file_mapping initialization parameter to true.
    SQL> alter system set file_mapping=true;

    The file_mapping initialization parameter is set to false by default. You do not need to shut down the instance to set this parameter. Setting file_mapping=true starts the FMON background process.


    Note   Note    If you want storage mapping to be enabled whenever you start up an instance, set the file_mapping initialization parameter to true in the init.ora file.

Accessing Dynamic Performance Views

  To access dynamic performance views

  1. Confirm that the VERITAS mapping library for Oracle file mapping has been enabled.
      SQL> select lib_idx idx, lib_name name, vendor_name vname, \
         path_name path from v$map_library;
  2. After storage mapping has been enabled, Oracle datafiles can be mapped using the DBMS_STORAGE_MAP package.

    The following example shows how to map a datafile using SQL:

    For more information about various features and capabilities of the DBMS_STORAGE_MAP package, see your Oracle documentation.

  3. Use SQL commands to display the mapping information that is captured in Oracle's dynamic performance views.

    To display the contents of v$map_file for a Quick I/O file:


      SQL> select file_name name, file_map_idx idx, \
         file_status status, file_type type, file_structure str, \
         file_size fsize, file_nexts nexts from v$map_file;

    To display the contents of v$map_file_extent.


      SQL> select * from v$map_file_extent;

    To display the contents of v$map_element:


      SQL> select elem_idx idx, elem_name, elem_type type, elem_size, \
         elem_nsubelem nsub, elem_descr, stripe_size from \
         v$map_element;

    To display the contents of v$map_subelement:


      SQL> select * from v$map_subelement

  To display all the elements within the I/O stack for a specific file.


  SQL> with fv as
   2     (select file_map_idx, file_name from v$map_file
   4  select
   5     fv.file_name, lpad(' ', 4 * (level - 1)) || \             
        el.elem_name elem_name, el.elem_size, el.elem_type, \
        el.elem_descr
   6  from
   7     v$map_subelement sb, v$map_element el, fv,
   8     (select unique elem_idx from v$map_file_io_stack io, fv
   9     where io.file_map_idx = fv.file_map_idx) fs
   10     where el.elem_idx = sb.child_idx
   11     and fs.elem_idx = el.elem_idx
   12     start with sb.parent_idx in
   13     (select distinct elem_idx
   14     from v$map_file_extent fe, fv
   15     where fv.file_map_idx = fe.file_map_idx)
   16     connect by prior sb.child_idx = sb.parent_idx;

Using Oracle Enterprise Manager

Oracle Enterprise Manager is a web-based GUI for managing Oracle databases. You can use this GUI to perform a variety of administrative tasks such as creating tablespaces, tables, and indexes; managing user security; and backing up and recovering your database. You can also use Oracle Enterprise Manager to view performance and status information about your database instance.

From Oracle Enterprise Manager, you can view storage mapping information and a graphical display of the storage layout. Storage mapping information cannot be viewed with the Oracle 10g version of the Oracle Enterprise Manager client. However, the Oracle9i version of Oracle Enterprise Manager can be used with Oracle 10g to view storage mapping information.

For more information about Oracle Enterprise Manager, refer to your Oracle documentation.

  To view storage information

  1. To view storage information, start Oracle Enterprise Manager and select a database from the left navigational pane (the object tree) of the Oracle Enterprise Manager Console.
  2. Expand the Databases icon and select the desired database.

    The Database Connect Information window appears.

  3. Enter a user name and password to log in to the database and click OK.
  4. In the object tree, expand the Storage icon.
  5. Under the Storage icon, expand the Datafiles icon.
  6. Select the datafile for which you want to view storage layout information.
  7. In the right pane, click the Storage Layout tab.
  8. Expand the objects to display their storage layout.
    Note   Note    Within the Oracle Enterprise Manager Console, you can point to an object on the screen and a description of the object is displayed in a pop-up field. If an object name or path appears truncated, point to it and the pop-up field will display the full object name and path.

    Note   Note    You can also right click on an object and select View Details to see detailed information about the object.
  9. By default, storage layout information is displayed in a tabular format. That is, the Tabular Display icon is selected. To view a graphical display of the storage layout, click the Graphical Display icon.
  10. Expand the objects to display their storage layout information graphically.
  11. To exit, choose Exit from the File menu.

 ^ Return to Top Previous  |  Next  >  
Product: Storage Foundation for Databases Guides  
Manual: Storage Foundation 4.1 for Oracle Administrator's Guide  
VERITAS Software Corporation
www.veritas.com