ORAPERL and Networked Databases... 
Author Message
 ORAPERL and Networked Databases...

...I'm trying to pinpoint just where this experiment is breaking down --
in oraperl, our Oracle setup, or both.

...basically, I'm trying to open an Oracle database on another machine
using a database name of (for example)

        T:oit.itd.umich.edu:db_name

On the Mac side (according to person in the office most familiar with
Oracle, and that's mostly on the Mac-client end), this expression needs
to be written as

        T:141.211.162.10:db_name

for things to work. oraperl kept giving me messages about "141..." not
being a valid name, so I added the "true" name and IP address to
/etc/hosts (on the machine on which I was testing), which gave me a
different error -- that "orasrv" was probably not in /etc/services.

It is. And other TCP/IP clients seem to be working fine.

I haven't found in the docs whether oraperl even supports the "T:..."
construct, but I haven't found any indication that it doesn't. And we
sadly don't have the UNIX Pro*C docs in the office, which is leaving me
stymied. :-feh

So...any advice/samples/pointers that other oraperl developers can offer
would be greatly appreciated!

Roger
(SunOS 4.1.3, oraperl v2.4, ORACLE 6.x...)



Sat, 19 Jul 1997 08:04:37 GMT  
 ORAPERL and Networked Databases...
Hello,


Quote:

>...I'm trying to pinpoint just where this experiment is breaking down --
>in oraperl, our Oracle setup, or both.
>...basically, I'm trying to open an Oracle database on another machine
>using a database name of (for example)

>        T:oit.itd.umich.edu:db_name

>On the Mac side (according to person in the office most familiar with
>Oracle, and that's mostly on the Mac-client end), this expression needs
>to be written as

>        T:141.211.162.10:db_name

>for things to work. oraperl kept giving me messages about "141..." not
>being a valid name, so I added the "true" name and IP address to
>/etc/hosts (on the machine on which I was testing), which gave me a
>different error -- that "orasrv" was probably not in /etc/services.

>It is. And other TCP/IP clients seem to be working fine.

>I haven't found in the docs whether oraperl even supports the "T:..."
>construct, but I haven't found any indication that it doesn't. And we
>sadly don't have the UNIX Pro*C docs in the office, which is leaving me
>stymied. :-feh

>So...any advice/samples/pointers that other oraperl developers can offer
>would be greatly appreciated!

>Roger
>(SunOS 4.1.3, oraperl v2.4, ORACLE 6.x...)

The solution is pretty simple: just set the following environment variables:

 setenv TWO_TASK T:oit.itd.umich.edu:db_name
 setenv ORACLE_SID db_name
 setenv ORACLE_HOME /usr/local/oracle

The last one should point to the oracle home directory at your site. Then to
login to the (remote) database you simply call:

 $DB = &ora_login('', $DBUser, $DBPassword);

where $DBUser holds the oracle username and $DBPassword the corresponding
password.

Hope this helps.

Cheers,

Informatiseringscentrum                     | phone: +31-20-525 2302
Universiteit van Amsterdam                  |        +31-20-525 2741
Turfdraagsterpad 9, NL-1012 XT  AMSTERDAM   | fax  : +31-20-525 2084
*** PGP Public Key available on servers *** | home : +31-20-675 0989



Sat, 19 Jul 1997 19:07:25 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Win32::ODBC - problems accessing database on network

2. Integrating MySQL database across a network...w/ perl. :)

3. Odbc won't work for database on network

4. Win32::ODBC - problems accessing database on network

5. RFC: Network Database

6. OraPerl - oracle database objects ?

7. Oraperl persistent database connections

8. Any Perl database extensions for an NT platform (as in Oraperl..etc)

9. oraperl-v2 - Extensions to Perl to access Oracle database, Patch02

10. oraperl - Extensions to Perl to access Oracle databases, Patch05

11. ORAPERL - Perl access to Oracle databases

12. OraPERL, Trapping if database is active

 

 
Powered by phpBB® Forum Software