RMAN-04006: error from auxiliary database: ORA-01017: invalid username/password; logon denied when Primary and Standby have the same password for the password file

“Opinions expressed are solely my own and do not express the views or opinions of my employer.”

I was creating a standby database and had the intention of using an active duplicate to copy the data from the primary database to the standby when I had the following error:

[oracle@tech]$ rman

Recovery Manager: Release 19.0.0.0.0 - Production on Fri May 27 21:30:50 2022
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect target sys/xxx@tech


connected to target database: tech (DBID=1103567802)

RMAN>
RMAN> connect auxiliary sys/xxx@tech_dr

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-04006: error from auxiliary database: ORA-01017: invalid username/password; logon denied

I did all the ordinary checklist by checking if the password file on the standby file had the same password as the primary database and also by checking if the “Password file:” option configured on the srvctl “srvctl config database -d ” had the right path to the file on it. However, even though all these configurations were correct, I kept receiving “RMAN-04006: error from auxiliary database: ORA-01017: invalid username/password; logon denied” described above.

Oracle MOS (My Oracle Support) gives the note RMAN-04006 ORA-01017 when connecting to auxiliary database on Standby From Primary (Doc ID 2445873.1). Still, the given solution was not the right one for my case. Therefore, I kept searching, and then I noticed that the password file had a different name than the name of the instance of my auxiliary database on the Standby side. The difference is that my password file had the name orapwtech, and my instance had tech1. Therefore, after I changed the password file copied from the Primary database to the proper name orapwtech1 I could connect successfully to the auxiliary database and continue with the duplicate as below:

[oracle@tech]$ rman

Recovery Manager: Release 19.0.0.0.0 - Production on Fri May 27 21:30:50 2022
Version 19.3.0.0.0

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

RMAN> connect target sys/xxx@tech


connected to target database: tech (DBID=1103567802)

RMAN> connect auxiliary sys/xxx@tech_dr

connected to auxiliary database: tech (not mounted)

RMAN> duplicate target database for standby from active database nofilenamecheck;

Starting Duplicate Db at 27-MAY-22
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=177 device type=DISK

......

So keep in mind to have the password file with the same name of the instance you are using as an auxiliary on the Standby database.

I hope this post helps you!

Related posts

2 Thoughts to “RMAN-04006: error from auxiliary database: ORA-01017: invalid username/password; logon denied when Primary and Standby have the same password for the password file”

  1. Abhishek

    thanks a lot man solution worked

  2. DANIEL NANGAH

    Also depending if this is new standby or old, I also did realized that if you are trying to rebuild and old standby and you haven’t removed the srvctl entries for that standby you will face the same issue too.

    i had a stanby build but had lag so decided to rebuild it all over again but I forgot to remove the registration with srvctl so i kept getting the invalid password error. After i srvctl tremove database -db xxxxxx, shutdown a d start nomount again i was able to run the duplicate.

Leave a Comment