søndag 22. mai 2011

Database link between Oracle 9i and 11g

Creating a database link between Oracle 9i and 11g can surface as an unexpected problem. Either your connection times out, or you get an invalid username/password message when you try to connect. The remedies are easy:

  1. Don't use a connection string in your CREATE DATABASE LINK statement; instead add it to your TNS file and reference it, otherwise you might just timeout when connecting. Why this is the case I have no idea.
  2. Use uppercase in your 11g password or turn off case sensitivity. The latter can either be done at installation or by executing ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE.

Tested successfully on 9.2.0.8.0 (64 bit) against 11.2.0.1.0 (64 bit), using both SQL and PL/SQL.