Re: Question about connection to Oracle database in another Server

From: Turkbear <john.g_at_dot.spamfree.com>
Date: Wed, 23 Jun 2004 08:58:10 -0500
Message-ID: <ri2jd0543ga1n5pvuvrq91ouacqqlmht87_at_4ax.com>


Hi,
Hi,
Maybe I'm confused ( not a rare thing) but that statement ( on further reflection) does not look like a ProC statement, rather a PL/Sql one..

I see nothing in the ProC docs about using that construction.

Ursula Lee <ursula.lee_at_thales-is.com> wrote:

>But am I using the correct statement for remote connection in Pro*C?
>
>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??
>
>Turkbear wrote:
>> Ursula Lee <ursula.lee_at_thales-is.com> 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?
>>
>>
>> Correct...Database Links are used for database to database communication..
>>
>> What you will have is a fairly standard Client/Server relationship ( even though the client is a server)..
>>
>> Install the correct version of the Oracle client on PBL1 and, in its tnsnames.ora file add an entry for
>> the Oracle instance .
>>
>> hth
Received on Wed Jun 23 2004 - 15:58:10 CEST

Original text of this message