Using the DBMS_STORAGE_MAP Package With Oracle ASM Files

You can use the procedures in the DBMS_STORAGE_MAP PL/SQL package to control mapping operations. For example, you can use the DBMS_STORAGE_MAP.MAP_OBJECT procedure to build mapping information for the database object that is specified by object name, owner, and type. After the DBMS_STORAGE_MAP.MAP_OBJECT procedure is run, then you can create a query to display the mapping information contained in the MAP_OBJECT view.

SQL> EXECUTE DBMS_STORAGE_MAP.MAP_OBJECT('EMPLOYEES','HR','TABLE');

SQL> SELECT io.OBJECT_NAME o_name, io.OBJECT_OWNER o_owner, io.OBJECT_TYPE o_type,
       mf.FILE_NAME, me.ELEM_NAME, io.DEPTH,
      (SUM(io.CU_SIZE * (io.NUM_CU - DECODE(io.PARITY_PERIOD, 0, 0, 
                         TRUNC(io.NUM_CU / io.PARITY_PERIOD)))) / 2) o_size
   FROM MAP_OBJECT io, V$MAP_ELEMENT me, V$MAP_FILE mf
   WHERE io.OBJECT_NAME =  'EMPLOYEES'
   AND   io.OBJECT_OWNER = 'HR'
   AND   io.OBJECT_TYPE =  'TABLE'
   AND   me.ELEM_IDX = io.ELEM_IDX
   AND   mf.FILE_MAP_IDX = io.FILE_MAP_IDX
   GROUP BY io.ELEM_IDX, io.FILE_MAP_IDX, me.ELEM_NAME, mf.FILE_NAME, io.DEPTH,
         io.OBJECT_NAME, io.OBJECT_OWNER, io.OBJECT_TYPE
   ORDER BY io.DEPTH;
 
O_NAME    O_OWNER O_TYPE FILE_NAME                                 ELEM_NAME        DEPTH O_SIZE
--------- ------- ------ ----------------------------------------- ---------------- ----- ------
EMPLOYEES HR      TABLE  +DATA/ORCL/DATAFILE/example.266.841314219 +/devices/diskd2     0     64
EMPLOYEES HR      TABLE  +DATA/ORCL/DATAFILE/example.266.841314219 +/devices/diske2     0     64

See Also:

Oracle Database PL/SQL Packages and Types Reference for information about the DBMS_STORAGE_MAP package