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: Question about connecting to Oracle database from another server

Re: Question about connecting to Oracle database from another server

From: Frank Langelage <frank_at_lafr.de>
Date: Sat, 19 Jun 2004 20:08:50 +0200
Message-ID: <2jjdpjF12cf31U1@uni-berlin.de>


Ursula Lee wrote:
> Hi,
>
> (FYI.. Oracle 9.2.0.1.0 running on HP-UX11)
> I have a Oracle Pro*C program used for loading data file into Oracle
> database. This program is running on DBMS (with Oracle database) server
> currently, but we plan to move our database into another server.
>
> So the enhancement will be : Pro*C program running on Server A, and
> Oracle database running on Server B.
>
> With this set up, I believe remote database connection string will help.
> Please confirm.
>
> My current Pro*C structure has syntax like:
>
> EXEC SQL CONNECT :username IDENTIFIED BY :password;
>
> And after the change, should I use the syntax like:
>
> EXEC SQL CONNECT :username IDENTIFIED BY :password at :db_name using
> :db_string;
>
> If yes, can you please tell me what the 'AT' parameter and 'USING'
> parameter is for ?
>
> I am wondering where we have to give the machine name, database name,
> protocol to use to connect, and IP, port etc??
>
> The machine name on which i am working (with Pro*C) is PBL1 and i am
> trying to connect to the remote database in DBMS, the database name is
> PBLDBMS.
>
> P.S. I believe this has nothing related to DB Link, correct?
>

"AT :db_name" is only useful if you want more than 1 database connect from your app.
With "USING :db_string" you have to give the tnsnames entry for the remote database (most often the SID of the remote server).

The relevant data for connection is commonly put in tnsnames.ora. With this data the client will connect to the listener on the remote machine.
Conult the manual for setting up the proper configuration. Received on Sat Jun 19 2004 - 13:08:50 CDT

Original text of this message

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