2 Replies Latest reply on Sep 20, 2010 7:30 AM by 798716

    dblink usage in 11g on linux server.

    798716
      Hello All,

      Please note that i have two oracle 11g db instances in linux server; now i just want to make communication through dblinks; i am able to create dblink using the following command;

      create database link link1 connect to <other db user name> identified by <other db password> using '<other db name>';

      Using above command the dblink is created successfuly; but when i gave the follwoing command it is giving the error.

      desc <some table name from other db>@link1;

      ORA-12154 TNS:could not resolve the connect identifier specified.

      I searched in google about the error code; and the solution is talking about check for tnsnames.ora and sqlnet.ora files.

      When i started looked into these files in my linux server i observed the following.

      1. The two db instanecs entries are not available in tnsnames.ora file.
      2. There is no sqlnet.ora file; there are only sample files of tnsnames.ora and sqlnet.ora files.

      When further i googled; i came to know that in oracle 11g by default when we create db instances it would not make entries in tnsnames.ora files. Is this info correct?

      Now please suggest me the solution for the above problem.

      I am just guessing that if we manually add those two db entries in tnsnames.ora it would solve the problem. Is this understanding correct? please suggest.

      Thanks in advance.

      Hafeez.
        • 1. Re: dblink usage in 11g on linux server.
          729036
          add the entry of second database in ur tnsnames.ora and try to tnsping the other database
          RACDB1 =
          (DESCRIPTION =
          (ADDRESS = (PROTOCOL = TCP)(HOST = #hostname)(PORT = 1521))
          (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME =#servicename)
          )
          )

          vxnode1-> tnsping racdb1

          TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 18-SEP-2010 23:40:28

          Copyright (c) 1997, 2009, Oracle. All rights reserved.

          Used parameter files:


          Used TNSNAMES adapter to resolve the alias
          Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = scan.rac.example.com)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = racdb1.rac.example.com)))

          Edited by: shaiffy on Sep 18, 2010 8:40 PM
          • 2. Re: dblink usage in 11g on linux server.
            798716
            Thanks for the reply.

            Actually i added both the entries and it is working now.

            Regards,
            Hafeez.