ORA02063 error while connecting to remote databse

dblinkoracle

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.

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 only valid value to be passed in the "IDENTIFIED BY VALUES" clause is an encrypted dblink password identifier (note - this is different from the user password identifier stored in the PASSWORD column of USER$).

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.