2 Replies Latest reply: Jul 3, 2008 11:00 AM by 449374 RSS

    Oracle client -TNSNAMES.ora

    647740
      Hi,

      I am new to db, can any explain the use of oracle client and how to use the TNSNAMES file.

      Thanks,
      VP.
        • 1. Re: Oracle client -TNSNAMES.ora
          523888
          Oracle client does what a client does in Client-Server architecture. So just read about it.

          A tnsnames.ora file maps net service names to connect descriptors. The net service name thus becomes a (most likely shorter and more readable) alias for the somewhat cumbersome net service name. In the following example, the tex after the equal sign is the connect descriptor while the text before the equal sign (net_service_name) is the net service name.
          A client needs a connect descriptor in order to connect to an Oracle instance.
          net_service_name= 
           (DESCRIPTION= 
             (ADDRESS=(protocol_address_information))
             (CONNECT_DATA= 
               (SERVICE_NAME=service_name))) 
          
          For example: 
          ORA10 =
            (DESCRIPTION = (ADDRESS_LIST =
                (ADDRESS = (PROTOCOL = TCP)(HOST = somehost)(PORT = 1521))
              )
              (CONNECT_DATA =
                (SERVICE_NAME=ORA10)
              )
            )
          • 2. Re: Oracle client -TNSNAMES.ora
            449374
            Want to add some more one example provided by Avi...

            ORA10 =
            (DESCRIPTION = (ADDRESS_LIST =
            (ADDRESS = (PROTOCOL = TCP)(HOST = somehost)(PORT = 1521))
            )
            (CONNECT_DATA =
            (SERVICE_NAME=ORA10)
            )
            )


            Here Some host can be the oracle server IP address or it's machine name....