duplicate报ORA-01017权限问题
环境:
OS:RedHat EnterPrise Linux 5.8 x64
Cluster:Oracle Grid 11.2.0.4
Database:Oracle Database EnterPrise 11.2.0.4
Archive:RAC+DG
今天在配置DG的过程中,前期环境都已经准备好了,就差最后一步将RAC数据duplicate到standby端,但是蹊跷的事情就在这一步发生了,尝试几次都无法将数据duplicate过去,当然我尝试通过拷贝rman备份到对端也无法完成恢复,死活就报ORA-01017错误,经过几个小时的努力,问题最终也算是得到了比较好的解决。
如下:
故障现象:
rmantarget sys/oracle@jetdb auxiliary sys/oracle@standby
RecoveryManager: Release 11.2.0.4.0 - Production on Mon May 26 16:14:36 2014
Copyright(c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connectedto target database: JETDB (DBID=2170518470)
connectedto auxiliary database: JETDB (not mounted)
RMAN>duplicate target database for standby from active database nofilenamecheck ;
Startingrestore at 26-MAY-14
usingtarget database control file instead of recovery catalog
allocatedchannel: ORA_DISK_1
channelORA_DISK_1: SID=416 device type=DISK
channelORA_DISK_1: restoring control file
RMAN-00571:===========================================================
RMAN-00569:=============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571:===========================================================
RMAN-03002:failure of restore command at 05/26/2014 16:14:54
ORA-19870:error while restoring backup piece /DBBackup/Phycal/stdb_cntl_0fp98vq2_1_1.bkp
ORA-19504:failed to create file "+DATA001/jetdb/controlfile/control01.ctl"
ORA-17502:ksfdcre:3 Failed to create file +DATA001/jetdb/controlfile/control01.ctl
ORA-15001:diskgroup "DATA001" does not exist or is not mounted
ORA-15055:unable to connect to ASM instance
ORA-01017:invalid username/password; logon denied
问题分析:
1、 从上面告警日志来看,ORA-01017可以很明显看出是由于权限问题导致。
随即,我们开始检查备库的密码文件,$ORACLE_HOME/dbs/orapw{SID}是存在的。
[oracle@standby dbs]$ ll$ORACLE_HOME/dbs/orapw*
-rw-r----- 1 oracle oinstall 1536 May 2617:49 /DBSoft/oracle/product/11.2.4/dbhome_1/dbs/orapwstandby
2、 这个时候我们应该查看的是数据库的alter告警文件:
Errorsin file/DBSoft/oracle/diag/rdbms/standby/standby/trace/standby_asmb_11087.trc (incident=24130):
ORA-00600:internal error code, arguments: [OSDEP_INTERNAL], [], [], [], [], [], [], [],[], [], [], []
ORA-27302:failure occurred at: skfnbeqOpenI
Incidentdetails in:/DBSoft/oracle/diag/rdbms/standby/standby/incident/incdir_24130/standby_asmb_11087_i24130.trc
UseADRCI or Support Workbench to package the incident.
See Note411.1 at My Oracle Support for error and packaging details.
ORA-00210:cannot open the specified control file
ORA-00202:control file: '+DATA001/jetdb/controlfile/control01.ctl'
ORA-17503:ksfdopn:2 Failed to open file +DATA001/jetdb/controlfile/control01.ctl
ORA-15001:diskgroup "DATA001" does not exist or is not mounted
ORA-15055:unable to connect to ASM instance
ORA-15055:unable to connect to ASM instance
ORA-00600:internal error code, arguments: [OSDEP_INTERNAL], [], [], [], [], [], [], [],[], [], [], []
ORA-27302:failure occurred at: skfnbeqOpenI
ORA-1013signalled during: ALTER DATABASE MOUNT...
Mon May26 16:31:34 2014
从告警文件中我们可以很明显的看出是ASM磁盘有问题,进入进入grid用户下用srvctl命令检查asm状态:
[grid@standby~]$ srvctl status asm
ASM isrunning on standby
SQL>select name,state,free_mb from v$asm_diskgroup;
NAME STATE FREE_MB
--------------------- ----------
DATA001 MOUNTED 121112
ARC001 MOUNTED 122483
BAK001 MOUNTED 122826
结果看来ASM也是没有问题的,那么唯一的出问题的地方可能就是Oracle哪里配置的问题。
3、这个时候我们应该先看看会不会是权限的问题:
[root@standby ~]# id oracle
uid=501(oracle) gid=504(oinstall)groups=504(oinstall) ,505(dba)
[root@standby ~]# id grid
uid=500(grid) gid=504(oinstall) groups=504(oinstall),503(asmadmin),506(asmdba),507(asmoper)