参考原文: How to Copy asm files between remote ASM instances using ASMCMD command (Doc ID 785580.1)
适用于: Oracle Database - Enterprise Edition - Version 11.1.0.6 to 11.2.0.2 [Release 11.1 to 11.2] Information in this document applies to any platform. ***Checked for relevance on 14-Jan-2011*** ***Checked for relevance on 09-Jul-2014 ***
[8201] means unable to connect remote ASM Instance.
该错误的可能原因如下: * not able to reach remote host. 不能连接远程主机 * Remote host listener is down. 远程监听器down掉 * Remote ASM Instance is not registered with listener and running non-default port. 远程asm实例没有注册到监听器中,并且监听器运行在非默认端口 * sysasm remote connection does not work. sysasm远程连接不工作 * Incorrect password given for sys user. sys 用户的错误密码 * Remote ASM Instance password file missing. 远程asm实例的 密码文件丢失
(DBD ERROR: OCISessionBegin)' <- DESTROY= undef at DBI.pm line 591 DBI connect('host=stgrac1;port=1521;sid=+ASM1','sys',...) failed: ORA-01031: insufficient privileges (DBD ERROR: OCISessionBegin) KK FROM HERE A ASMCMD-08202: internal error: [asmcmdshare_error_msg_05] [8201]
--->例子结束
可以看到由于ORA-01031错误,asmcmd 拷贝文件失败。 如果-a选项不使用的话,asmcmd 默认使用sysasm 权限。 这里的问题是:远程的asm实例中,sysasm 权限没有被授予sys user 把sysasm权限给sys用户。当你授予系统权限时,密码文件会被更新。
关于更多细节,请参考下面的文章: Note.730067.1 - Troubleshooting ORA-1031 Insufficient Privilege Note.578796.1 - ORA-01031 While Connecting as SYSASM
Example 2:
ASMCMD> cp -ifr thread_2_seq_5.264.678983423 sys@bderac2-vip.1521.+ASM2:+FRA/RAC/ARCHIVELOG/ Enter password: *** ASMCMD-08016: copy source->'+FRA/RAC/ARCHIVELOG/2009_02_16/thread_2_seq_5.264.678983423' and target->'+FRA/RAC/ARCHIVELOG/thread_2_seq_5.264.678983423' failed ORA-17628: Oracle error 19505 returned by remote Oracle server ORA-06512: at "SYS.X$DBMS_DISKGROUP", line 258 ORA-06512: at line 3 (DBD ERROR: OCIStmtExecute) ASMCMD>
cp命令失败的原因是: 目标的asm file 名字没有指定, 或者 文件名字不应该包括file number/incarnation. --->注意,我对本句的翻译有点疑问, 原文为The cp command failed because the target ASM file name was not specified or File name should not contain the file number/incarnation