Friday, August 5, 2016

Moving ASM FILES between remote ASM instance by ASMCMD

We were working on database duplication for standby to copy the ASM related files from one cluster to other and encountered few issues. I first encountered it on 12c related to ASM file copy, asmcmd remote copy works through listener connection. ASMCMD remote connection can fail with below generic error.

1. Sysasm remote connection does not work. 
2. Incorrect password given for asmsnmp user. 
3. Remote ASM Instance password file missing.
4. Not able to reach remote host. 
5. Remote host listener is down. 
6. Remote ASM Instance is not registered with listener and running non-default port.

I have faced the below issue:

ASMCMD> cp +TESTDG/<DB_NAME>/t_435129223.143.435129224 asmsnmp/<pwd>@NODE1+asm1:+TESTDG/<DB_NAME>/t_435129223.143
ASMCMD-8201: (Bad argc for RDBMS:ASMCMD-8201).

[8201] means unable to connect remote ASM Instance. 

It can even raise,

ASMCMD> cp +TESTDG/<DB_NAME>/t_435129223.143.435129224 asmsnmp/<pwd>@NODE1+asm1:+TESTDG/<DB_NAME>/t_435129223.143

ASMCMD-8016: copy source '+TESTDG/<DB_NAME>/t_435129223.143.435129224' and target '+TESTDG/<DB_NAME>/t_435129223.143' failed
ORA-17628: Oracle error 19505 returned by remote Oracle server
ORA-19505: failed to identify file ""
ORA-06512: at "SYS.X$DBMS_DISKGROUP", line 486
ORA-06512: at line 3 (DBD ERROR: OCIStmtExecute)

Solution:

select * from v$pwfile_users;

grant sysasm to asmsnmp;