Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: PERL DBI connection to Remote Oracle Database
DBI and DBD::Oracle are nothing more than Pro*C programs (libraries.
actually). They do nothing magic during the connection - it's just like
making a connection in SQL*Plus.
So, do you have a tnsnames.ora file, or are you using OID for TNS resolution?
Ron Reidy
Lead DBA
From: Sanjay Mishra [mailto:smishra_97_at_yahoo.com]
Sent: Tuesday, August 28, 2007 11:33 AM
To: Reidy, Ron; oracle-l_at_freelists.org
Subject: RE: PERL DBI connection to Remote Oracle Database
Ron
It is working and I am trying to understand as how it is making connection even the Port is not defined. On Remote DB server, I am running two listener. How this program use SID defined in Perl to connect to correct instance.
"Reidy, Ron" <Ron.Reidy_at_arraybiopharma.com> wrote:
My guess is it won't make a connection except for the default ports. What happens if you try it yourself with a small program?
Ron Reidy Lead DBADBI to connect to Remote Database . The string used to connect the Remote database doesn't have PORT. Connection is going fine. Remote database is listening on PORT 1523 and not the Default 1521.
________________________________
From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Sanjay Mishra Sent: Tuesday, August 28, 2007 8:42 AM To: oracle-l_at_freelists.org Subject: PERL DBI connection to Remote Oracle Database Hi I am working on exsiting Perl program and found that it is usinf
I checked the Manual and it says the following but still not clear as if it only check on 1521 and 1526 or others. Any ideas as how it will work if Port is not specified like even shown below in the Doc statement
Connecting without environment variables or tnsname.ora file
If you use the host=$host;sid=$sid style syntax, for example: $dbh = DBI->connect("dbi:Oracle:host=myhost.com;sid=ORCL", $user, $passwd); then DBD::Oracle will construct a full connection descriptorstring for you and Oracle will not need to consult the tnsname.ora file.
If a port number is not specified then the descriptor will try both 1526 and 1521 in that order (e.g., new then old). You can check which port(s) are in use by typing "$ORACLE_HOME/bin/lsnrctl stat" on the server.
Sanjay
Sick sense of humor? Visit Yahoo! TV's Comedy with an Edge <http://us.rd.yahoo.com/evt=47093/*http://tv.yahoo.com/collections/222> to see what's on, when.
This electronic message transmission is a PRIVATE communication which
contains information which may be confidential or privileged. The
information is intended to be for the use of the individual or entity
named above. If you are not the intended recipient, please be aware that
any disclosure, copying, distribution or use of the contents of this
information is prohibited. Please notify the sender of the delivery
error by replying to this message, or notify us by telephone (877-633-2436, ext. 0), and then delete it from your system.
________________________________
Be a better Globetrotter. Get better travel answers
<http://us.rd.yahoo.com/evt=48254/*http://answers.yahoo.com/dir/_ylc=X3o
DMTI5MGx2aThyBF9TAzIxMTU1MDAzNTIEX3MDMzk2NTQ1MTAzBHNlYwNCQUJwaWxsYXJfTkl
fMzYwBHNsawNQcm9kdWN0X3F1ZXN0aW9uX3BhZ2U-?link=list&sid=396545469> from
someone who knows.
Yahoo! Answers - Check it out.
This electronic message transmission is a PRIVATE communication which contains information which may be confidential or privileged. The information is intended to be for the use of the individual or entity named above. If you are not the intended recipient, please be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. Please notify the sender of the delivery error by replying to this message, or notify us by telephone (877-633-2436, ext. 0), and then delete it from your system.
-- http://www.freelists.org/webpage/oracle-lReceived on Tue Aug 28 2007 - 12:48:19 CDT
![]() |
![]() |