Ok, so you created an alias in ASM. How does the database know it is supposed to refer to that file by alias instead of actual file name?
(My question is intended as a hint to lead to self discovery)
BTW, it would be really helpful if you would go to your profile and give yourself a recognizable name. It doesn't have to be your real name, just something that looks like a real name. Who says my name is really Ed Stevens? But at least when people see that on a message they have a recognizable identity. Unlike the system generated name of 'ed0f625b-6857-4956-9b66-da280b7cf3a2', which is no better than posting as "Anonymous".
All you ed0f625b-6857-4956-9b66-da280b7cf3a2's look alike . . .
Thank you for helpful links,
Yes, I can see created alias in v$asm_alias,
but if I can use name ''+DATA/test1/datafile/app_data_01.dbf' instead of originally generated '+DATA/test1/datafile/app_data.266.824722429' ?
If it possible ?
Did you see the first link that I gave?
I've read Administering Oracle ASM Files, Directories, and Templates , thank you for reminder.
in part "Alias Oracle ASM Filename Forms" I can see following:
Oracle Database references database files by their alias filenames, but only if you create the database files with aliases. If you create database files without aliases and then add aliases later, the database references the files by their fully qualified filenames.
And then I can see example:
ALTER DISKGROUP data RENAME ALIAS '+data/orcl/datafile.dbf'
From my point of view , creating alias for datafile is useless command, if I cannot refer to this one in SQL command.
Or, could someone, please, give me example how I can use resulting alias ?
Two way you can use ,
+ While creating the datafiles at database level you can mention name like +<diskgroup_name>/<database_sid>/datafile/<tablespace_name>.dbf .Then it will create <tablespace_name>.dbf alias pointing to original physical file at ASM level.
This you can validate using asmcmd command ,
asmcmd > cd +<diskgroup_name>/<database_sid>/datafile/
asmcmd> ls -lt <tablespace_name>.dbf
thank you for showing additional way of using ASM features,
My main question is about using alias which was created with ALTER DISKGROUP ... ADD ALIAS ... FOR ... command .
Created for datafile alias is not visible in v$datafile and dba_data_files. Trying to use alias created with this command causes error.
Is there any specific reason for adding alias.
I would suggest to keep name with physical format .
Because, this will allow us to identify which file_number of ASM level related to which tablespace at database level.
file_number 266 of ASM of diskgroup DATA is related to app_data tablespace of database test1.