Thursday, February 5, 2015

Remote ASM File Copy Issue

Recently during one of our restore exercise, we need to transfer the backup files from ASM  of Cluster A to ASM of Cluster B. When I tried to copy the file using following command if failed continuously. 

## To make error message more meaningful, need to enable the trace..
export   DBI_TRACE=1

ASMCMD [+] > cp +image_bkp/prd/autobackup/2015_02_05/s_870845182.578.870845183 sys@rac_tgt.1529.+ASM2:+RAC5_DATA/BACKUP_PIECES/prd/

Enter password: ******
    -> DBI->connect(dbi:Oracle:host=rac_tgt.1529;port=1521;sid=+ASM2, sys, ****, HASH(0x1b0dde70))
connect using '(DESCRIPTION=(ADDRESS=(HOST=rac_tgt.1529)(PROTOCOL=tcp)(PORT=1521))(CONNECT_DATA=(SID=+ASM2)))'    !! ERROR: '12545' 'ORA-12545: Connect failed because target host or object does not exist (DBD ERROR: OCIServerAttach)' (err#0)
    <- connect('host=rac_tgt.1529;port=1521;sid=+ASM2', 'sys', ...)= undef at DBI.pm line 637
       DBI connect('host=rac_tgt.1529;port=1521;sid=+ASM2','sys',...) failed: ORA-12545: Connect failed because target host or object does not exist (DBD ERROR: OCIServerAttach)
ASMCMD-8201: (Bad argc for RDBMS:ASMCMD-8201)

ASMCMD [+] > cp --port 1523 +image_bkp/prd/autobackup/2015_02_05/s_870845182.578.870845183 sys@rac_tgt.+ASM2:+RAC5_DATA/BACKUP_PIECES/prd/s_870845182.578.870845183 --port 1529


copying +image_bkp/prd/autobackup/2015_02_05/s_870845182.578.870845183 -> rac_tgt.intra.searshc.com:+RAC5_DATA/BACKUP_PIECES/prd/s_870845182.578.870845183
    !! ERROR: '15056' 'ORA-15056: additional error message
ORA-15046: ASM file name '+RAC5_DATA/BACKUP_PIECES/prd/s_870845182.578.870845183' is not in single-file creation form
ORA-06512: at "SYS.X$DBMS_DISKGROUP", line 413
ORA-06512: at line 3 (DBD ERROR: OCIStmtExecute)' (err#1)
    <- execute= undef at asmcmdbase.pm line 3509
ASMCMD-8016: copy source->'+image_bkp/prd/autobackup/2015_02_05/s_870845182.578.870845183' and target->'+RAC5_DATA/BACKUP_PIECES/prd/s_870845182.578.870845183' failed


Checking Metalink Note # 452158.1 I saw that the ASMCMD  cp command fails 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 --port 1523 +image_bkp/prd/autobackup/2015_02_05/s_870845182.578.870845183 sys@rac_tgt.+ASM2:+RAC5_DATA/BACKUP_PIECES/prd/test --port 1529
Enter password: ******

On target server -

ASMCMD [+RAC5_DATA/BACKUP_PIECES/prd] > ls -lt

Type        Redund  Striped  Time             Sys  Name
                                              N    AUG11/
                                              N    test => +RAC5_DATA/ASM/AUTOBACKUP/test.2365.870918155

As you can see the file is created with link pointing to file with incarnation and file number. 

1 comment: