Duplicate reports ORA-01017 permission issuesEnvironment:
OS:RedHat EnterPrise Linux 5.8x64
Cluster:Oracle Grid 11.2.0.4
Database:Oracle Database EnterPrise 11.2.0.4
Archive:RAC + DG
During the configuration of DG today, the preliminary environment has been ready, and the last step is to duplicate the RAC data to the standby end. However, this step is where something strange happens, I tried several times and couldn't copy the data duplicate in the past. Of course, I tried to copy rman back to the peer end and it couldn't be restored, and I reported a ORA-01017 error. After several hours of effort, the problem was finally solved.As follows:
Fault symptom
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-14usingtarget database control file instead of recovery catalogallocatedchannel: ORA_DISK_1channelORA_DISK_1: SID=416 device type=DISK channelORA_DISK_1: restoring control fileRMAN-00571:===========================================================RMAN-00569:=============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571:===========================================================RMAN-03002:failure of restore command at 05/26/2014 16:14:54ORA-19870:error while restoring backup piece /DBBackup/Phycal/stdb_cntl_0fp98vq2_1_1.bkpORA-19504:failed to create file "+DATA001/jetdb/controlfile/control01.ctl"ORA-17502:ksfdcre:3 Failed to create file +DATA001/jetdb/controlfile/control01.ctlORA-15001:diskgroup "DATA001" does not exist or is not mountedORA-15055:unable to connect to ASM instanceORA-01017:invalid username/password; logon denied
Problem Analysis:
1, from the above alarm log, the ORA-01017 can be clearly seen is caused by permission issues.
Then, we begin to check the password file of the slave database. $ ORACLE_HOME/dbs/orapw {SID} exists.
[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. In this case, we should check the alter alarm file of the database:
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: skfnbeqOpenIIncidentdetails in:/DBSoft/oracle/diag/rdbms/standby/standby/incident/incdir_24130/standby_asmb_11087_i24130.trcUseADRCI 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 fileORA-00202:control file: '+DATA001/jetdb/controlfile/control01.ctl'ORA-17503:ksfdopn:2 Failed to open file +DATA001/jetdb/controlfile/control01.ctlORA-15001:diskgroup "DATA001" does not exist or is not mountedORA-15055:unable to connect to ASM instanceORA-15055:unable to connect to ASM instanceORA-00600:internal error code, arguments: [OSDEP_INTERNAL], [], [], [], [], [], [], [],[], [], [], []ORA-27302:failure occurred at: skfnbeqOpenIORA-1013signalled during: ALTER DATABASE MOUNT...Mon May26 16:31:34 2014
From the alarm file, we can clearly see that there is a problem with the ASM disk. Go to the grid user and run the srvctl command to check the asm status:
[grid@standby~]$ srvctl status asmASM isrunning on standby SQL>select name,state,free_mb from v$asm_diskgroup; NAME STATE FREE_MB--------------------- ----------DATA001 MOUNTED 121112ARC001 MOUNTED 122483BAK001 MOUNTED 122826
As a result, there is no problem with ASM, so the only problem may be the problem of Oracle configuration.
3. At this time, we should first check whether it is a permission issue:
[root@standby ~]# id oracleuid=501(oracle) gid=504(oinstall)groups=504(oinstall) ,505(dba)[root@standby ~]# id griduid=500(grid) gid=504(oinstall) groups=504(oinstall),503(asmadmin),506(asmdba),507(asmoper)
At this point, we found that the problem may occur on permissions.
Oracle does not have the asmdba permission. Then add it.
[root@standby~]# usermod -G 503,506 oracle[root@standby~]# id oracleuid=501(oracle)gid=504(oinstall) groups=504(oinstall),503(asmadmin),505(dba),506(asmdba)
We can see that duplicate is successfully executed again:
[oracle@standby~]$ rman target sys/oracle@jetdb auxiliary sys/oracle@standby RecoveryManager: Release 11.2.0.4.0 - Production on Mon May 26 17:48:39 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; StartingDuplicate Db at 26-MAY-14usingtarget database control file instead of recovery catalogallocatedchannel: ORA_AUX_DISK_1channelORA_AUX_DISK_1: SID=122 device type=DISK contentsof Memory Script:{ backup as copy reuse targetfile '/DBSoft/oracle/product/11.2.4/dbhome_1/dbs/orapwjetdb1' auxiliaryformat '/DBSoft/oracle/product/11.2.4/dbhome_1/dbs/orapwstandby' ;}executingMemory Script Startingbackup at 26-MAY-14allocatedchannel: ORA_DISK_1channelORA_DISK_1: SID=14 instance=jetdb1 device type=DISKFinishedbackup at 26-MAY-14 contentsof Memory Script:{ backup as copy current controlfile forstandby auxiliary format '+DATA001/jetdb/controlfile/control01.ctl';}executingMemory Script Startingbackup at 26-MAY-14usingchannel ORA_DISK_1channelORA_DISK_1: starting datafile copycopyingstandby control fileoutputfile name=+BAK001/rman/snapcf_jetdb1.f tag=TAG20140526T174956 RECID=11STAMP=848598598channelORA_DISK_1: datafile copy complete, elapsed time: 00:00:01Finishedbackup at 26-MAY-14 contentsof Memory Script:{ sql clone 'alter database mount standbydatabase';}executingMemory Script sqlstatement: alter database mount standby databaseRMAN-05529:WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed todisk group only. contentsof Memory Script:{ set newname for tempfile 1 to "+data001"; switch clone tempfile all; set newname for datafile 1 to "+data001"; set newname for datafile 2 to "+data001"; set newname for datafile 3 to "+data001"; set newname for datafile 4 to "+data001"; set newname for datafile 5 to "+data001"; backup as copy reuse datafile 1 auxiliary format "+data001" datafile 2 auxiliary format "+data001" datafile 3 auxiliary format "+data001" datafile 4 auxiliary format "+data001" datafile 5 auxiliary format "+data001" ; sql 'alter system archive log current';}executingMemory Script executingcommand: SET NEWNAME renamedtempfile 1 to +data001 in control file executingcommand: SET NEWNAME executingcommand: SET NEWNAME executingcommand: SET NEWNAME executingcommand: SET NEWNAME executingcommand: SET NEWNAME Startingbackup at 26-MAY-14usingchannel ORA_DISK_1channelORA_DISK_1: starting datafile copyinputdatafile file number=00001 name=+DATA001/jetdb/datafile/system.268.848240089outputfile name=+DATA001/standby/datafile/system.257.848598605 tag=TAG20140526T175005channelORA_DISK_1: datafile copy complete, elapsed time: 00:00:15channelORA_DISK_1: starting datafile copyinputdatafile file number=00002 name=+DATA001/jetdb/datafile/sysaux.260.848240091outputfile name=+DATA001/standby/datafile/sysaux.258.848598619 tag=TAG20140526T175005channelORA_DISK_1: datafile copy complete, elapsed time: 00:00:07channelORA_DISK_1: starting datafile copyinputdatafile file number=00003 name=+DATA001/jetdb/datafile/undotbs1.263.848240091outputfile name=+DATA001/standby/datafile/undotbs1.259.848598627tag=TAG20140526T175005channelORA_DISK_1: datafile copy complete, elapsed time: 00:00:01channelORA_DISK_1: starting datafile copyinputdatafile file number=00005 name=+DATA001/jetdb/datafile/undotbs2.264.848240331outputfile name=+DATA001/standby/datafile/undotbs2.260.848598627tag=TAG20140526T175005channelORA_DISK_1: datafile copy complete, elapsed time: 00:00:01channelORA_DISK_1: starting datafile copyinputdatafile file number=00004 name=+DATA001/jetdb/datafile/users.267.848240091outputfile name=+DATA001/standby/datafile/users.261.848598629 tag=TAG20140526T175005channelORA_DISK_1: datafile copy complete, elapsed time: 00:00:02Finishedbackup at 26-MAY-14 sqlstatement: alter system archive log current contentsof Memory Script:{ switch clone datafile all;}executingMemory Script datafile1 switched to datafile copyinputdatafile copy RECID=11 STAMP=848598635 filename=+DATA001/standby/datafile/system.257.848598605datafile2 switched to datafile copyinputdatafile copy RECID=12 STAMP=848598635 file name=+DATA001/standby/datafile/sysaux.258.848598619datafile3 switched to datafile copyinputdatafile copy RECID=13 STAMP=848598635 filename=+DATA001/standby/datafile/undotbs1.259.848598627datafile4 switched to datafile copyinputdatafile copy RECID=14 STAMP=848598635 file name=+DATA001/standby/datafile/users.261.848598629datafile5 switched to datafile copyinputdatafile copy RECID=15 STAMP=848598635 filename=+DATA001/standby/datafile/undotbs2.260.848598627FinishedDuplicate Db at 26-MAY-14