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: Connection from Workstation to DB in Server. How to?

Re: Connection from Workstation to DB in Server. How to?

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Thu, 1 Jul 2004 14:57:52 +1000
Message-ID: <40e399b0$0$25464$afc38c87@news.optusnet.com.au>

"German Saer" <gsaer_at_cfl.rr.com> wrote in message news:9pMEc.2277$Bv.357003_at_twister.tampabay.rr.com...
> I'm trying to establish a connection with an Oracle 8.1.7 DB. (The one it
> comes with it).
>
> I have installed Oracle in the Server and Oracle Client in my workstation.
> But I don't know how to connect to it using ODBC or whatever I have to in
> order to achive this.
>
> My Server is an Intel 400Mhz, 512MB RAM, 40Gb Windows 2000 Professional
> My Workstation is an Intel 2.4Ghz, 512MB RAM, 80Gb Windows 2000
> Professional.
>
> ...and both installations were successfull. No errors at all.
>
> I've read something about listeners but I can't comprehend exactly what to
> do to connect to the DB from the WS to the server. The use of this
database
> is going to be multiple: Access, Foxpro, VB, Web apps, etc. If I
establish
> a connection to the DB via ODBC I will figure the rest.

ODBC uses a listener, too. So you'd better get the concept of a listener sorted out pretty quickly!

All it is, is a process (service, on Windows) which runs on the server, and to which clients connect requesting that they be forwarded to an instance/database.

You configure a listener by creating a text file called listener.ora in ORACLE_HOME\network\admin that describes three things: what networking protocol it should listen on (invariably TCP); what machine it should run on (invariably the hostname of your server) and the port it should run on (1521 by default, and it makes sense to accept the default).

Clients then need a file in their ORACLE_HOME\network\admin called tnsnames.ora. That file allows a friendly name (call it 'MYDB') to map to the address of the listener -hence, the server name, the network protocol and the listener's port number. Once the client reaches the listener, it then has to ask to be forwarded onto an instance/database, so that's the fourth piece of information required.

ODBC connections simply then reference the 'MYDB' friendly name, just as any other client connections would have to.

So... you need to do some reading in the networking concepts documentation (available at http:\\tahiti.oracle.com). The tool you use to create listener.ora files and tnsnames.ora files is the Network Configuration Assistant, and it's available on your Windows Start-Programs menu. It's wizard-driven, and should therefore be easy to use. There are four options presented to you when you run it. You'll want number 1, which creates the listener; and number 3, which creates the tnsnames.ora. You should also run option number 2 on the client, which creates a file called sqlnet.ora which tells Oracle that you will in fact be using a tnsnames.ora to resolve connection requests (there are other possible mechanisms). That involves selecting the 'Local Names' option from the available resolution methods. You won't want to ever run the fourth option, because that involves setting up complex directory services, which you haven't got and won't want for a long, long time.

I suggest before you try putting any of this into use that you ensure you are not running any firewalls on either machine. Once you've got it running and working, then you can try switching firewalls on and test whether that breaks things.

> As you noticed, I'm very unfamiliar with Oracle. But I have a good enough
> programming, SQL and DB manipulation experience.

You're allowed to be completely unfamiliar with Oracle. But you're not allowed to *remain* that way! Read at least the concepts guide at tahiti.oracle.com. For your specific needs, as I've said already, the networking concepts is useful.

Regards
HJR
> Thanks in advance for your help,
>
> German Saer
> gsaer_at_hotmail.com
> Orlando, FL
>
>
Received on Wed Jun 30 2004 - 23:57:52 CDT

Original text of this message

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