Symantec logo

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;

IDX NAME VNAME PATH

------------------------------------------------------------------------------

1 Veritas ORAMAP API Veritas /opt/VRTSdbed/lib/libvxoramap.so

  1. 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:

    SQL> execute dbms_storage_map.map_file('/ora92/dbs/qio10m.dbf','DATAFILE', TRUE);

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

  2. 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;

NAME DX STATUS TYPE STR FSIZE NEXTS

---------------------------------------------------------------------------

/ora92/dbs/qio10m.dbf 0 VALID DATAFILE FILE 20488 1

To display the contents of v$map_file_extent.

SQL> select * from v$map_file_extent;

FILE_MAP_IDX EXT_NUM EXT_ELEM_OFF EXT_SIZE EXT_FILE_OFF EXT_TY ELEM_IDX

--------------------------------------------------------------------------------------

0 0 7733248 20488 0 DATA 0

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;

IDX ELEM_NAME TYPE ELEM_SIZE NSUB ELEM_DESCR STRIPE_SIZE

--------------------------------------------------------------------------------------

0 /dev/vx/rdsk/PROD_dg/ora92 MIRROR 12582912 MIRROR 0

1 vxvm:PROD_dg/ora92-01 CONCATENATED 12586455 1 VERITAS VOLUME 0

2 /dev/vx/rdmp/c2t5d0s4 PARTITION 17674902 1 HOST DEVICE 0

3 /dev/rdsk/c2t5d0s4 PARTITION 17674902 1 DEVICE 0

4 c2t5d0 DISK 17682084 0 DISK 0

To display the contents of v$map_subelement:

SQL> select * from v$map_subelement;

CHILD_IDX PARENT_IDX SUB_NUM SUB_SIZE ELEM_OFFSET SUB_FLAGS

--------- ---------- -------- -------- ----------- ---------

1 0 0 12586455 0 0

2 1 0 12586455 0 0

3 2 0 17674902 0 0

4 3 0 17682084 7182 0

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

3 where file_name = '/ora92/dbs/qio10m.dbf')

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

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;

FILE_NAME ELEM_NAME ELEM_SIZE ELEM_TYPE ELEM_DESCR

--------------------------------------------------------------------------------------

/ora92/dbs/qio10m.dbf vxvm:PROD_dg/ora92-01 12586455 CONCATENATED VERITAS VOLUME

/ora92/dbs/qio10m.dbf /dev/vx/rdmp/c2t5d0s4 17674902 PARTITION HOST DEVICE

/ora92/dbs/qio10m.dbf /dev/rdsk/c2t5d0s4 17674902 PARTITION DEVICE

/ora92/dbs/qio10m.dbf c2t5d0 17682084 DISK DISK