Sunday, February 23, 2020

ORA-15046: ASM file name...is not in single-file creation form

We can use ASM provided command “cp” to copy files from file system to ASM diskgroup and vice versa; and also from one ASM diskgroup to the other. If you receive ORA-15046 while copying a file to an ASM diskgroup from file system, or from another diskgroup, mostly it is because you are providing a file name for the destination file that is not allowed in the ASM. From file name here I mean the file name in the format that is used in ASM i.e. file_name.235.84753829. Same error would also come if an invalid directory location is provided. Following is an example of this error message

ASMCMD> cp +DATA/MYDBDG/parameterfile/spfile.282.989921809 +DATA/MYDB/PARAMETERFILE/
copying +DATA/MYDBDG/parameterfile/spfile.282.989921809 -> +DATA/MYDB/PARAMETERFILE/spfile.282.989921809
ASMCMD-8016: copy source '+DATA/MYDBDG/parameterfile/spfile.282.989921809' and target '+DATA/MYDB/PARAMETERFILE/spfile.282.989921809' failed
ORA-15056: additional error message
ORA-15046: ASM file name '+DATA/MYDB/PARAMETERFILE/spfile.282.989921809' is not in single-file creation form
ORA-06512: at "SYS.X$DBMS_DISKGROUP", line 415
ORA-06512: at line 3 (DBD ERROR: OCIStmtExecute)

In the above example, I did not provide destination file name and that caused ORA-15046 error. To avoid this error and a successful copy of file, destination file name must be provided. Same error would also come if the name provided is same as source name. Following is the example of a successful copy where I used “spfiile” as destination file name.
ASMCMD>  cp spfile.282.989921809 +DATA/MYDB/PARAMETERFILE/spfile
copying +DATA/MYDBDG/parameterfile/spfile.282.989921809 -> +DATA/MYDB/PARAMETERFILE/spfile


ASMCMD> cd +DATA/MYDB/PARAMETERFILE/
ASMCMD> ls -l
Type           Redund  Striped  Time             Sys  Name
                                                 N    spfile => +DATA/ASM/PARAMETERFILE/spfile.393.989922595

An important point to note here is that destination file name is in fact an alias only and actual physical file is created with a different name (containing file incarnation number), at a different location based on the file type. For this example, the file type is parameter file, thus physical file was created under +DISK_GROUP/ASM/PARAMETERFILE directory. In case of datafile, it would get created under +DISK_GROUP/ASM/DATAFILE directory.

No comments:

Post a Comment

Popular Posts - All Times