While running ora_cleansp to clean up the previous environment ORA-01017 occurs as follows:
$ ora_cleansp <username>/<password>@SID
SQL*Plus: Release 10.2.0.4.0 - Production on Thu Jul 10 23:02:23 2008
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: ERROR:
ORA-01017: invalid username/password; logon denied
Enter user-name: SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where <logon> ::= <username>[/<password>][@<connect_identifier>] | /
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
Unable to log into Oracle.
Incorrect username and/or password may have been specified when running ora_cleansp
Check to make sure that the username and password for Shareplex user in the database are specified correctly. If in doubt about the username, you can query the contents of the paramdb file located in /vardir/data directory that has the username and encrypted password.
The username is given by the field:
SP_ORD_OWNER_O.<YOUR_SID> <username>
The password is given by the field:
SP_ORD_LOGIN_O.<YOUR_SID> <encrypted password>
There could be other reasons that may cause this error as explained below:
1. The user was dropped from the database by the DBA without the knowledge of Shareplex admin. If so, it would require re-running ora_setup to establish the Shareplex user once again in the database.
2. As a part of password rotation policy followed for security purpose, the password for Shareplex user in the database was changed by administrators. This renders entry in the paramdb file invalid. A Shareplex process makes connection to database using the username and password from paramdb file. When Shareplex process attempts to make connection to the database using the invalid values for username/password from paramdb, it errors out with ORA-01017. The changes to password for Shareplex user should be done via ora_chpwd utility located in /proddir/bin directory and not directly by DBA users. This ensures that the paramdb file is updated with the value for password. The changes to username or password can also be done by running ora_setup.
3. Incorrect setting of the environment variables ORACLE_SID and ORACLE_HOME can also cause Shareplex to report this error. One should set the variables ORACLE_HOME, ORACLE_SID, SP_COP_UPORT, SP_COP_TPORT, SP_SYS_VARDIR, etc.
4. Duplicate entry for username in paramdb can cause this problem. Examine the paramdb file and comment out the redundant entries if any.
After correcting the problem as above, one should be able to re-run ora_cleansp.