Tuesday, April 3, 2012

Troubleshooting ASMCMD remote copy

As it is discussed in http://arjudba.blogspot.com/2012/04/how-to-copy-asm-files-between-remote.html you can use cp command of ASMCMD to transfer a file in ASM filesystem from local ASM instance to remote ASM instance.

asmcmd remote copy works through listener connection.

However ASMCMD cp command arguments are not user friendly and also even a single mismatch will generate error. ASMCMD remote connection can fail with below generic error.

ASMCMD-08202: internal error: [asmcmdshare_error_msg_05] [8201]

[8201] means unable to connect remote ASM Instance.

It could be due to following reason.

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

We need to enable additional tracing for asmcmd connection to get a exact failure message.

++ set DBI_TRACE environment variable for asmcmd perl tracing.

export DBI_TRACE=1

++ Now connect using asmcmd and re-produce the issue.

After enabling trace, if you notice it fails due to ORA-01031: insufficient privileges then sysasm privelege was not given to sys user on remote ASM Instance.

Given the SYSASM privilege to SYS ( or the user trying to connect ). When you grant a system privilege, the password file is updated.
SQL> grant sysasm to sys; 
Grant succeeded. 

SQL> select * from v$pwfile_users; 
USERNAME SYSDB SYSOP SYSAS 
------------------------------ ----- ----- ----- 
SYS TRUE TRUE TRUE 

No comments: