Enabling File Mapping With Oracle ASM Files

To enable file mapping, set the FILE_MAPPING initialization parameter to TRUE. The database instance does not have to be shut down to set this parameter. You can set the parameter using the following ALTER SYSTEM statement:

SQL> ALTER SYSTEM SET FILE_MAPPING=TRUE;

Run the appropriate DBMS_STORAGE_MAP mapping procedure.

  • In a cold startup scenario, the Oracle Database has just started and no mapping operation has been invoked yet. You can execute the DBMS_STORAGE_MAP.MAP_ALL procedure to build the mapping information for the entire I/O subsystem associated with the database.

    For example, the following command builds mapping information and provides for 10000 extents:

    SQL> EXECUTE DBMS_STORAGE_MAP.MAP_ALL(10000);
    
  • In a warm start scenario where the mapping information has already been built, you have the option to invoke the DBMS_STORAGE_MAP.MAP_SAVE procedure to save the mapping information in the data dictionary.

    This procedure is invoked in DBMS_STORAGE_MAP.MAP_ALL() by default. This forces all of the mapping information in the SGA to be flushed to disk. The DBMS_STORAGE_MAP.MAP_SAVE procedure is invoked in DBMS_STORAGE_MAP.MAP_ALL() by default.

After you restart the database, use DBMS_STORAGE_MAP.RESTORE() to restore the mapping information into the SGA. If needed, DBMS_STORAGE_MAP.MAP_ALL() can be called to refresh the mapping information.