Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: What's wrong with tnsnames.ora?

Re: What's wrong with tnsnames.ora?

From: <buckeye714_at_my-deja.com>
Date: 2000/04/01
Message-ID: <8c3g00$fe$1@nnrp1.deja.com>#1/1

In article <954480583.29480.1.pluto.d4ee154e_at_news.demon.nl>, "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote:
>
> Jim Lewis <pojpl_at_ais.ucla.edu> wrote in message
> news:8c0k7v$oas$1_at_carroll.library.ucla.edu...
> > RedHat 6.1
> > Oracle8i 8.1.5
> > Problem: Getting error 12514 TNS: listener could not resolve
> > SERVICE_NAME given in connect description.
> >
> >
> > Oracle8i is installed. The sample database is installed and working
> > -- I can connect as scott/tiger on the RedHat machine and run sql
> > against the emp table.
> >
> > I have used Net8 Assistant to create listener.ora, tnsnames.ora and
> > sqlnet.ora files on the RedHat server and on the NT4.0 client
 machine.
> >
> > Something is wrong with one or more of these configuration files I
> > guess, but the Oracle documentation I've read seems to show examples
> > of these files that are a mix of 8.0 and 8i parameters -- at least
> > they managed to confuse me!
> >
> > Here is the listener.ora file that was generated by Net8 Assistant
 on
> > the RedHat/Oracle box: (I've only changed the HOST address here)
> >
> > # LISTENER.ORA Configuration
> > File:/apps/oracle/8i/u01/app/oracle/product/8.1.5/n
> > etwork/admin/listener.ora
> > # Generated by Oracle Net8 Assistant
> >
> > LISTENER =
> > (DESCRIPTION =
> > (ADDRESS = (PROTOCOL = TCP)(HOST = <IP address>)(PORT = 1521))
> > (PROTOCOL_STACK =
> > (PRESENTATION = TTC)
> > (SESSION = NS)
> > )
> > )
> >
> >
> > I thought I would only need an ADDRESS entry for TCP. Is that
> > incorrect?
> >
>
> Yes, you'll also need an address for IPC
>

Also, you need to specify the sid that the listener is listening for.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =

       (GLOBAL_DBNAME = or8iDB)
       (ORACLE_HOME = /opt/oracle/product/8.1.5)
       (SID_NAME = or8iDB)
     )

   )

Adding this section with the correct Oracle home should solve your problem.

> > Here is the tnsnames.ora file generated by Net8 Assistant on the
> > RedHat/Oracle box. or8iDB is the global database name for this
> > database:
> >
> > # TNSNAMES.ORA Configuration
> > File:/apps/oracle/8i/u01/app/oracle/product/8.1.5/n
> > etwork/admin/tnsnames.ora
> > # Generated by Oracle Net8 Assistant
> >
> > or8iDB =
> > (DESCRIPTION =
> > (ADDRESS_LIST =
> > (ADDRESS = (PROTOCOL = TCP)(HOST = <IP address>(PORT = 1521))
> > )
> > (CONNECT_DATA =
> > (SERVICE_NAME = or8iDB)
> > )
> > )
> >
> > I'm sure I've managed to wedge this somehow. What have I done wrong?
> >
> A bracket is missing after the IP address. You're also advised NOT to
 use
> hardcoded IP-addresses.
> If you don't have proper DNS, you can always use the hosts or the
 lmhosts
> file on the client machine.
>
> Hth,
> Sybrand Bakker, Oracle DBA
>

 Hope this helps.

Patrick

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sat Apr 01 2000 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US