I have connected to remote database using DB link. From prod databases it works fine but from test env reporting error invalid username/password. Please help.
ORA02063 error while connecting to remote databse
dblinkoracle
Related Question
- Changing password doesn’t work
- Connecting to remote oracle db
- “ORA-01017: invalid username/password” while connecting to an instance remotely as sysdba
- Postgresql – Issue with Identifiers in Postgres greater than Oracle’s limit while connecting over ODBC (DBLINK)
- ORA-01017 when connecting remotely as sysdba
Best Answer
My Oracle Support Doc ID [456320.1] indicates that the IDENTIFIED BY VALUES clause is only intended to be used by internal utilities (export/import) when used in a database link definition, which may be why the link is not working. Database link passwords are stored in a separate encrypted format starting in Oracle 10.2.
The document indicates because this is the expected and intended behavior of the "IDENTIFIED BY VALUES" clause, using it in a database link definition and then trying to use that link to execute remote SQL statements isn't classified as a bug if you receive an ORA-600 error.
Once created, the database link DDL in the database already stores the remote schema password using the IDENTIFIED BY VALUES encrypted format (for example, when retrieved with DBMS_METADATA.GET_DDL()). Once created using the actual remote schema password, it will be encrypted by Oracle, so unless there is a very good security reason not to use the actual password when creating the link, it seems like this is the best strategy if you are using the database link for normal remote DML operations.