Even if the password (orapwSID) file in the primary database is copied to the standby database side and the you can connect to the primary database using current password, you can receive this error when you try to connect to the standby database with the current password. The reason for the error is that the password file becomes stale when connected with sqlplus as sysdba. When you create this file manually on both sides, the connection will be provided without problems.
The error received when connecting to the standby database on the primary database server is as follows.
1 2 3 4 5 6 7 8 | -bash-4.3$ sqlplus sys/your_password@ORCLDR as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Tue Sep 18 10:02:13 2018 Copyright (c) 1982, 2013, Oracle. All rights reserved. ERROR: ORA-01017: invalid username/password; logon denied |
In this case, it is necessary to recreate the password file on the primary and standby(target/auxiliary) database server as follows. The file name must be specified appropriately for the database SID. It is “SID = ORCL” in the following example.
1 2 | -bash-4.3$ cd $ORACLE_HOME/dbs -bash-4.3$ orapwd file=orapwORCL password=your_password entries=10 force=y |
Then you can connect to standby with current password successfully.
1 2 3 4 5 6 7 8 9 10 11 12 13 | -bash-4.3$ sqlplus sys/your_password@ORCLDR as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Tue Sep 18 10:03:15 2018 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options SQL> |
If you continue to have problems, restart the listener service on the target side.