Page 1 of 1

Creating Aliases on ASM

Posted: Thu Dec 30, 2010 2:47 pm
by bgrenn
I used these 2 lines to make aliases for all my datafiles, then rename them to the alias..

This helped with a smoother RMAN active database duplicate.  Otherwise it can get confused

set linesize 160
set pagesize 0

select 'alter diskgroup DATA add alias ''' || substr(name,1,instr(name,'.')) || 'dbf'' for ''' || name || ''';' from v$datafile;


set linesize 160
set pagesize 0

select 'alter database rename file '''|| name || ''' to ''' || substr(name,1,instr(name,'.')) || 'dbf'';' from v$datafile;