Re: Pro*c communication to database across machines
Date: 1995/09/04
Message-ID: <42f56e$4b1_at_ixnews5.ix.netcom.com>#1/1
In <427du5$6mv_at_cardinal.fs.com> skannan_at_cardinal.fs.com ( S. Kannan) writes:
>
>Ken Lang (klang_at_hostara.att.com) wrote:
>: Hello. A recent project I've been assigned to requires that I write a
>: Pro*C program that runs on one HP-UX machine and accesses a database
on
>: another HP-UX machine. Given that SQL*Net is running on both
machines, is
>: this viable ? Are there SQL*NET library calls I can use in my PRO*C
>: program to access the remote database ?
>: Thanks,
>: Ken
>: klang_at_hostare.att.com
Ken, you do not mention if you are using a local DB or not...if not, then the first call your pro*c application must make is to connect to the remote database (the same as logging into a local DB, but you must include the service name to log into (assuming sql*net v2.x)). After that, it is much the same as talking to a local Db (using EXEC SQL... stmts).
I am assuming you have a listener set up on both sides and communication is possible between the two machines oracle-wise.
Good luck.
>
>If you are using ORACLE7 with the distributed option, you can achieve
you
>objective in the following two ways:
>
>1. Create a database link to the remote database and perform DML
statements.
> DML statements are transparent to the location of the database. Only
the
> database link would need the SQL*NET string to connect to the remote
> database.
>2. Use an AT Clause to connect and perform DML statements to the remote
> database. Here the SQL*NET string would be necessary to connect to
the
> remote database.
>
>If you are using Oracle 6, you can only perform SELECT statements on
the
>remote database.
>
>If you are using any version earlier the 6, such an operation is not
possible.
>
>Hope this answers your question.
>
>--
>-----------------------------------------------------------------------
>Kannan
>Email: skannan_at_fs.com
>Mastech Systems Corporation
>
>The above are my own comments and opinion. They do not purport that of
>anybody else.
>-----------------------------------------------------------------------
>
Received on Mon Sep 04 1995 - 00:00:00 CEST