Creating a Tablespace in Oracle ASM: Using a Data File with an Alias Name

Example 5-1 creates an undo tablespace with a data file that has an alias name, and with attributes that are set by the user-defined template my_undo_template. This example assumes that a directory has been created in disk group data to contain the alias name and that the user-defined template exists.

Because an alias is used when creating the data file, the file is not an Oracle Managed Files (OMF) file and the file is not automatically deleted when the tablespace is dropped. To drop the file manually after the tablespace has been dropped, use the following SQL statement:

ALTER DISKGROUP data DROP FILE '+data/orcl/my_undo_ts';

Example 5-1 Creating a tablespace using an alias name

CREATE UNDO TABLESPACE myundo 
     DATAFILE '+data(my_undo_template)/orcl/my_undo_ts' SIZE 200M;