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: SQL Net client on WinNT Oracle Server

Re: SQL Net client on WinNT Oracle Server

From: Billy Verreynne <vslabs_at_onwe.co.za>
Date: 1998/01/23
Message-ID: <6a9l4e$c7m$1@hermes.is.co.za>#1/1

Nicola Di Nisio wrote in message <6a7p95$kkg$1_at_proxy.rgn.it>...
>I installed Oracle server 7.1 on Windows NT 4.0 Server.
>I installed both the SQL Net client and server, together with
>the TCP interface and what is need to make up an Oracle server.
>
>My application makes use of the Borland Database Engine (BDE), so I prepare
>an alias in the BDE, called tryOralce, which should

<snip>
>"Unknown network error. ORA-12154: TNS: Could not resolve
>service name. Alias: tryOracle."

Your TNSNAMES.ORA should look like this:

--
tryoralce.world =
  (DESCRIPTION =
    (ADDRESS_LIST =
        (ADDRESS =
          (COMMUNITY = tcp.world)
          (PROTOCOL = TCP)
          (Host = myserver)
          (Port = 1521)
        )
    )
    (CONNECT_DATA = (SID = ORCL)
    )
  )
---

First, I'm not sure if there are size limitations to TNS aliases (anyone?).
Why not just call the alias "tryoracle.world", "orcl.world"? Note that the
HOST entry can either contain your server's ip address or hostname. Also
make sure that the listener listens on the specified PORT (see LISTENER.ORA
file).

When you configure BDE, the BDE server name must match the TNS alias. The
BDE Net Protocol must be TNS. And you need to point the BDE Vendor Init DLL
the correct Oracle DLLs (e.g. ORA71.DLL for Oracle 7.1).

[going a little bit off-topic from comp.databases.oracle.server ...]
Also, instead of hardcoding BDE aliases, let your application dynamically
make use of the correct TNS alias by using the BDE Oracle driver directly.
Create a TDATABASE object where the DRIVERNAME quals ORACLE and give the
object a name (DATABASENAME property).

Before opening this object, prompt the user for the Oracle userid, password
and TNS alias. Add these as parameters to the PARAMS property of the
database object, e.g.
MyDatabase.Params.Add('SERVER NAME='+TNSAlias);
MyDatabase.Params.Add('USER NAME='+OraUserName);
MyDatabase.Params.Add('PASSWORD='+OraPassword);

Then activate the database object. As you can see, this method works well as
the user does not need to create a new BDE alias for every single TNS alias
he/she adds to TNSNAMES.ORA.

regards,
Billy
Received on Fri Jan 23 1998 - 00:00:00 CST

Original text of this message

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