PDA

View Full Version : Question about connection to Oracle database in another Server


Turkbear
06-21-2004, 05:50 AM
Ursula Lee <ursula.lee@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 Oracledatabase. This program is running on DBMS (with Oracle database) servercurrently, but we plan to move our database into another server.So the enhancement will be : Pro*C program running on Server A, andOracle 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 amtrying to connect to the remote database in DBMS, the database name isPBLDBMS.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

Ursula Lee
06-22-2004, 05:44 PM
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@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 Oracledatabase. This program is running on DBMS (with Oracle database) servercurrently, but we plan to move our database into another server.So the enhancement will be : Pro*C program running on Server A, andOracle 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 amtrying to connect to the remote database in DBMS, the database name isPBLDBMS.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

Turkbear
06-23-2004, 05:58 AM
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@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@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 Oracledatabase. This program is running on DBMS (with Oracle database) servercurrently, but we plan to move our database into another server.So the enhancement will be : Pro*C program running on Server A, andOracle 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 amtrying to connect to the remote database in DBMS, the database name isPBLDBMS.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


MyLounge.com Site Map
Forum: Cars, Cell Phone, Database, Games, Home Improvement, IT, Music, School, Sports, Web Design, Web Server, Weight Loss

The MyLounge.com forum is intended for informational use only and should not be relied upon and is not a substitute for any advice. The information contained on MyLounge.com are opinions and suggestions of members and is not a representation of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for the accuracy, completeness or usefulness of any postings or the qualifications of any person responding. Please consult a expert or seek the services of an attorney in your area for more accuracy on your specific situation. Please note that our forums also serve as mirrors to Usenet newsgroups. Many posts you see on our forums are made by newsgroup users who may not be members of MyLounge.com Term of Service