Hi Ron,

Here is the sqlplus connection:

$ sqlplus [EMAIL PROTECTED]

SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 16 10:58:23 2006

Copyright (c) 1982, 2005, Oracle.  All Rights Reserved.

Enter password: 

Connected to:
Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - 64bit
Production
With the Partitioning, OLAP and Data Mining options

SQL> 

Here is the debug output of the test connection program using Perl DBI.

$ cat testCon.pl
#!/usr/bin/perl -w

use DBI;

my $dbh = DBI->connect("dbi:Oracle:SID_NOT_IN_TNSNAMES", "MY_ID",
"MY_PASSWORD", { RaiseError => 1 });

$dbh->disconnect();

exit;

$ ./testCon.pl            

Loading DB routines from perl5db.pl version 1.23
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(./testCon.pl:5): my $dbh =
DBI->connect("dbi:Oracle:SID_NOT_IN_TNSNAMES", "MY_ID", "MY_PASSWORD", {
RaiseError => 1 });
 
DB<1> s
DBI::connect(/usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/DBI.pm:51
0):
510:        my $class = shift;
 
DB<1> s
DBI::connect(/usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/DBI.pm:51
1):
511:        my ($dsn, $user, $pass, $attr, $old_driver) = my @orig_args
= @_;
 
DB<1> s
DBI::connect(/usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/DBI.pm:51
2):
512:        my $driver;
.
.
.
DB<1> s
DBI::_new_handle(/usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/DBI.p
m:1162):
1162:       $h = bless \%hash, $class;         # ref to outer hash (for
application)
 
DB<1> s
DBI::_new_handle(/usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/DBI.p
m:1165):
1165:       DBI::_setup_handle($h, $imp_class, $parent, $imp_data);
 
DB<1> s
DBI::_new_handle(/usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/DBI.p
m:1167):
1167:       return $h unless wantarray;
 
DB<1> s
DBI::_new_handle(/usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/DBI.p
m:1168):
1168:       ($h, $i);
 
DB<1> s
DBD::Oracle::dr::connect(/usr/local/lib/perl5/site_perl/5.8.3/sun4-solar
is/DBD/Oracle.pm:216):
216:            DBD::Oracle::db::_login($dbh, $dbname, $user, $auth,
$attr)
217:                or return undef;
 
DB<1> s
s
s
s 
THE PROGRAM JUST HANGS HERE, BUT IF I RUN IT WITHOUT DEBUG, I GET THE
FOLLOWING ERROR MESSAGE:

$ ./testCon.pl         
Segmentation Fault(coredump)

Peter  

-----Original Message-----
From: Reidy, Ron [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 15, 2006 5:34 PM
To: Loo, Peter # PHX; DBI-Users
Subject: RE: Using Oracle Internet Directory (OID) instead of TNS Names

Does SQL*Plus do this correctly from the same machine you are running
the Perl scripts?  It should work the same because DBD::Oracle uses the
OCI to perform it's actions.  This means it still uses the O3LOGON
functionality.

Can you write a simple Perl script that will just connect and disconnect
from the database and then perform an strace on it and a SQL*Plus
session to that same database instance?  This might tell you where
things are going wrong.

Also, what happens if you reverse the order of lookup(ldap then
tnsnames)?  Does it work then?  If so, I would post a SR with Oracle
support to clarify this issue.  When/if you get this information, would
you mind posting it back to this group?

rr

-----Original Message-----
From: Loo, Peter # PHX [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 15, 2006 6:18 PM
To: Reidy, Ron; DBI-Users
Subject: RE: Using Oracle Internet Directory (OID) instead of TNS Names


Hi Ron,

According to our *.ora files, everything appears to be set up correctly.
However, whenever Perl DBI attempts to connect to an INSTANCE that is
not defined in tnsnames.ora file, the Perl program is unable to
continue.

What we are hoping that Perl DBI would do for us is to perform somewhat
like sqlplus.  When we issue the following command at shell prompt, even
if the INSTANCE name is not listed in tnsnames.ora file, sqlplus would
find the instance.   

$ sqlplus [EMAIL PROTECTED]

someInstance does not exist in the tnsnames.ora file, but somehow
sqlplus still finds it.
 
Peter

-----Original Message-----
From: Reidy, Ron [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 15, 2006 2:27 PM
To: Loo, Peter # PHX; DBI-Users
Subject: RE: Using Oracle Internet Directory (OID) instead of TNS Names

No.  The list is a search order - tnsnames will be checked first, then
OID.

-----Original Message-----
From: Loo, Peter # PHX [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 15, 2006 3:06 PM
To: Reidy, Ron; DBI-Users
Subject: RE: Using Oracle Internet Directory (OID) instead of TNS Names


Hi Ron,

We currently have the following configuration.  I am assuming that in
order for Perl DBI to use OID, LDAP has to be the first in the list?

NAMES.DIRECTORY_PATH= (tnsnames, ldap) 
 
Peter

-----Original Message-----
From: Reidy, Ron [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 15, 2006 1:28 PM
To: Loo, Peter # PHX; DBI-Users
Subject: RE: Using Oracle Internet Directory (OID) instead of TNS Names

That's right.  You will need:

1.  A sqlnet.ora file which designates the search method:
names.directory_path=(LDAP)
2.  A ldap.ora file that describes the location of your OID instance:
Default_admin_context = "dc=xx,dc=yy,dc=com"
Directory_server=(server.domain.com:non-ssl_port:ssl_port)
Directory_server_type=oid

You can read about this in the OID/LDAP Oracle manuals.

Giddy up.

rr

-----Original Message-----
From: Loo, Peter # PHX [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 15, 2006 12:07 PM
To: Reidy, Ron; DBI-Users
Subject: RE: Using Oracle Internet Directory (OID) instead of TNS Names

Hi Ron,

I meant, not using TNS files and instead using Oracle OLAP. 
 
Peter

-----Original Message-----
From: Reidy, Ron [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 15, 2006 10:54 AM
To: Loo, Peter # PHX; DBI-Users
Subject: RE: Using Oracle Internet Directory (OID) instead of TNS Names

If you mean will it use OID to resolve TNS addresses, then yes  You
don't need to make any changes to the connect string.  The DBI will
connect to the database just like SQL*Plus will.

--
Ron Reidy
Lead DBA
Array BioPharma, Inc.

-----Original Message-----
From: Loo, Peter # PHX [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 15, 2006 11:40 AM
To: DBI-Users
Subject: Using Oracle Internet Directory (OID) instead of TNS Names

Hi All,
 
Does the current Perl DBI support Oracle Internet Directory?  If so,
how/where would I go to find out more on how to use this functionality?
 
Thanks.
 
Peter

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.



This E-mail message is for the sole use of the intended recipient(s) and
may contain confidential and privileged information.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not
the intended recipient, please contact the sender by reply E-mail, and
destroy all copies of the original message.


This E-mail message is for the sole use of the intended recipient(s) and
may contain confidential and privileged information.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not
the intended recipient, please contact the sender by reply E-mail, and
destroy all copies of the original message.


This E-mail message is for the sole use of the intended recipient(s) and
may contain confidential and privileged information.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not
the intended recipient, please contact the sender by reply E-mail, and
destroy all copies of the original message.


This E-mail message is for the sole use of the intended recipient(s) and
may contain confidential and privileged information.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not
the intended recipient, please contact the sender by reply E-mail, and
destroy all copies of the original message.

Reply via email to