Showing posts with label ASM. Show all posts
Showing posts with label ASM. Show all posts

23 April 2014

Reference summary of ASMCMD commands

Reference summary of ASMCMD commands

cd      Changes the current directory to the specified directory.

du      Displays the total disk space occupied by ASM files in the specified ASM directory and all its subdirectories, recursively.

exit    Exits ASMCMD.

find    Lists the paths of all occurrences of the specified name (with wildcards) under the specified directory.

help    Displays the syntax and description of ASMCMD commands.

ls        Lists the contents of an ASM directory, the attributes of the specified file, or the names and attributes of all disk groups.

lsct      Lists information about current ASM clients.

lsdg     Lists all disk groups and their attributes.

mkalias Creates an alias for a system-generated filename.

mkdir   Creates ASM directory.

pwd     Displays the path of the current ASM directory.

rm       Deletes the specified ASM files or directories.

rmalias Deletes the specified alias, retaining the file that the alias points to.

ASMCMD cp command fails with ORA-15046

Symptoms

ASMCMD cp command fails with
ORA-15046: ASM file name +DGEXTBK/prod/datafile/tbsext.256.628847401' is not in single-file creation form

Cause

The target file name specified is not a valid file name.
The cp command failed because the ASM file name was not in a form that can be used to create an single file.
The file name should not contain the file number/incarnation.

Example 1
==========
ASMCMD> cp +DGEXT/orcl/datafile/tbsext.256.628847401 +DGEXTBK/prod/datafile/tbsext.256.628847401

source +DGEXT/orcl/datafile/tbsext.256.628847401
target +DGEXTBK/prod/datafile/tbsext.256.628847401
ASMCMD-08015: can not create file->'+DGEXTBK/prod/datafile/tbsext.256.628847401'
ORA-15056: additional error message
ORA-17502: ksfdcre:4 Failed to create file +DGEXTBK/prod/datafile/tbsext.256.628847401
ORA-15046: ASM file name '+DGEXTBK/prod/datafile/tbsext.256.628847401' is not in single-file creation form
ORA-06512: at "SYS.X$DBMS_DISKGROUP", line 142
ORA-06512: at line 3 (DBD ERROR: OCIStmtExecute)
ASMCMD-08016: copy source->'+DGEXT/orcl/datafile/tbsext.256.628847401' and target->'+DGEXTBK/prod/datafile/tbsext.256.628847401' failed 

Example 2
==========
ASMCMD> cp +DGEXT/orcl/datafile/tbsext.256.628847401 +DGEXTBK/prod/datafile/tbsext.257.628847401

source +DGEXT/orcl/datafile/tbsext.256.628847401
target +DGEXTBK/prod/datafile/tbsext.257.628847401
ASMCMD-08015: can not create file->'+DGEXTBK/prod/datafile/tbsext.257.628847401'
ORA-15056: additional error message
ORA-17502: ksfdcre:4 Failed to create file +DGEXTBK/prod/datafile/tbsext.257.628847401
ORA-15046: ASM file name '+DGEXTBK/prod/datafile/tbsext.257.628847401' is not in single-file creation form
ORA-06512: at "SYS.X$DBMS_DISKGROUP", line 142
ORA-06512: at line 3 (DBD ERROR: OCIStmtExecute)
ASMCMD-08016: copy source->'+DGEXT/orcl/datafile/tbsext.256.628847401' and target->'+DGEXTBK/prod/datafile/tbsext.257.628847401' failed

Solution

The cp command failed because the ASM file name was not in a form that can be used to create an single file.File name should not contain the file number/incarnation
ASMCMD> cp +DGEXT/orcl/datafile/tbsext.256.628847401 +DGEXTBK/prod/datafile/tbsext
source +DGEXT/orcl/datafile/tbsext.256.628847401
target +DGEXTBK/prod/datafile/tbsext
copying file(s)...file, +DGEXTBK/prod/datafile/tbsext, copy committed.