Wednesday, January 8, 2020

RMAN-04006: error from auxiliary database: ORA-01017: invalid username/password; logon denied

Scenario: When creating a physical standby database using rman duplication command

bash-4.2$ rman target sys/pwd@primary auxiliary sys/pwd @stby
After running the above command, then the following error shows:
RMAN-04006: error from auxiliary database: 
ORA-01017: invalid username/password; logon denied

Solution:
Case 1:
SQL> show parameter REMOTE_LOGIN_PASSWORD
NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
remote_login_passwordfile            string                            EXCLUSIVE

SQL>show parameter REMOTE_OS_AUTHENT
NAME                                 TYPE                              VALUE
------------------------------------ --------------------------------- ------------------------------
remote_os_authent                    boolean                           FALSE
By default remote_login_passwordfile is EXCLUSIVE and remote_os_authent is FALSE.
If  other than EXCLUSIVE and FALSE then run the following command, which should resolve the problem.
SQL> alter system set REMOTE_LOGIN_PASSWORD= EXCLUSIVE
SQL> alter system set REMOTE_OS_AUTHENT = FALSE


Case 2:
I have such problem where I never explicitly set a password for the SYS user in the newly created database and I could still connect locally. I have fixed that by the following way:
1.      Execute the following command in primary/target database.
SQL>ALTER USER SYS IDENTIFIED BY pwd;
2.      The command update the password file automatically $ORACLE_HOME/dbs/orapwORACLE_SID
3.      Copy password file to standby server

No comments:

Post a Comment