14 Replies Latest reply: Aug 26, 2011 5:38 PM by Gary Graham-Oracle RSS

    Error executing a query using a DB-Link

    360454
      Hi all,

      I'm trying to execute a query on a DB using a connection. I created a DB-LINK on the DB. executing the select:

      select sysdate from dual@lnk_db_prod;

      I get the following error:

      Error starting at line 1 in command:
      select sysdate from dual@lnk_db_prod
      Error at Command Line:1 Column:19
      Error report:
      SQL Error: ORA-01882: timezone region not found
      ORA-02063: preceding line from lnk_db_prod

      The error will be return executing any query on a db-link.
      It appens if I create a db-link using syntax referencing the SID and using the sintax with the complete connection string. Below the two example of db-link DDL commands:

      1.
      CREATE DATABASE LINK lnk_db_prod
      CONNECT TO prod IDENTIFIED BY prod
      USING 'DBPROD';
      2.
      create database link lnk_db_prod2
      connect to prod
      identified by prod
      using '(DESCRIPTION =
      (ADDRESS_LIST =
      (ADDRESS =
      (PROTOCOL = TCP)
      (Host = 10.41.54.156)
      (Port = 1521)
      )
      )
      (CONNECT_DATA = (SID = DBPROD)
      )
      )';

      Can you help me, please?
      bye,
      Ivan