Datasheet

34
Chapter 1
Using Oracle ASM
Adding ASM Filename Aliases to Existing Files
You can add filename aliases to ASM files that have already been created. To add the alias, use
the
alter diskgroup command with the add alias parameter. For example, if you wanted to
create an alias for
ALIAS_TBS.260.613168611, you would issue the following command:
Alter diskgroup cooked_dgroup1
add alias ‘+cooked_dgroup1/alias_dir/alias_tbs_01.dbf’
FOR ‘+cooked_dgroup1/11GDB/datafile/alias_tbs. 260.613168611’;
Managing ASM File Alias Names
You can change ASM file alias names with the rename alias parameter of the alter
diskgroup
command, as shown in this example:
Alter diskgroup cooked_dgroup1
Rename alias ’+cooked_dgroup1/alias_dir/alias_tbs_01.dbf’
To ’+cooked_dgroup1/datafiles/alias_tbs_01.dbf’;
You can use the drop alias command to drop ASM aliases, as in this example:
Drop alias ’+cooked_dgroup1/datafiles/alias_tbs_01.dbf’;
Drop Files from an ASM Disk Group
There may be cases where you will need to drop files from an ASM disk group (for exam-
ple, the database is removed in an unorderly fashion). To remove ASM files, use the
alter
diskgroup
command with the drop file clause. Here is an example of removing a file
from an ASM disk group (in this case, using an alias name):
alter diskgroup cooked_dgroup1
drop file ’+cooked_dgroup1/alias_dir/alias_tbs_01.dbf’;
Defining ASM as the Default Destination
for Database Files
If you decide you want to allow Oracle to create all file types as ASM file types, you can set
the values of various parameters such that ASM will automatically be employed. One of the
big benefits of this feature is the standardization of your database, ensuring that all files get
placed where they belong and in the ASM structure to which they belong. You can define
95134c01.indd 34 1/28/09 9:43:45 AM