problem with DBI oracle access with activstate perl
- From: "surf" <surfunbear@xxxxxxxxx>
- Date: 16 Nov 2005 14:30:52 -0800
I am having trouble setting someone else up to use my perl scripts.
I have activstate perl 5.8.6 installed as well as DBI and DBD::Oracle
from
ftp.esoftmatic.com. We can both ping the host machine. I can run my
perl script
which is able to access the oracle database using connect in this form:
my $dbh = DBI->connect("dbi:Oracle:host=${host};sid=${db};port=1521",
$usr,$pw)
or die ("connect failed $DBI::errstr\n");
it works fine and I can run queries, but below is the error she gets
followed by a dbi trace when she runs the exact same script.
I am not sure that the ORACLE_HOME message makes any sense. None of the
DBI
examples from my book or the internet say anything about ORACLE_HOME,
and the
database is on another machine accessed remotely. My 300 page Orielly
Perl DBI book says nothing about these or any other environment
variables. I do not have ORACLE_HOME or any NLS environment variable
set on my machine and I can access the database fine.
I'm not sure what I should try or where to look. Are there any good in
depth discussions of internal DBI/DBD::Oracle, or similar relating to
perhaps activstate perl I can look to (websites, books etc) ? What else
can I try ?
Error she gets:
C:\Data\Perl>extract.pl
connecting ...
DBI connect('host=cnote;sid=pro;port=1521','pro',...) failed: ERROR OC
IInitialize. Check ORACLE_HOME and NLS settings etc. at
C:\Data\Perl\extract.pl
line 20
connect failed ERROR OCIInitialize. Check ORACLE_HOME and NLS settings
etc.
Trace of her error:
DBI 1.45-ithread default trace level set to 0x0/4 (pid 860)
-> DBI->connect(dbi:Oracle:host=cnote;sid=pro;port=1521, pro, ****)
-> DBI->install_driver(Oracle) for MSWin32 perl=5.008007 pid=860
ruid=0 euid=0
install_driver: DBD::Oracle version 1.16 loaded from
C:/Perl/site/lib/DBD/Oracle.pm
New DBI::dr (for DBD::Oracle::dr, parent=, id=)
dbih_setup_handle(DBI::dr=HASH(0x19bed9c)=>DBI::dr=HASH(0x1a8861c),
DBD::Oracle::dr, 0, Null!)
dbih_make_com(Null!, 0, DBD::Oracle::dr, 108, 0) thr#224014
-> STORE in DBD::_::common for DBD::Oracle::dr
(DBI::dr=HASH(0x19bed9c)~0x1a8861c 'ShowErrorStatement' 1) thr#224014
STORE DBI::dr=HASH(0x1a8861c) 'ShowErrorStatement' => 1
<- STORE= 1 at Oracle.pm line 61
<- install_driver= DBI::dr=HASH(0x19bed9c)
-> connect for DBD::Oracle::dr (DBI::dr=HASH(0x19bed9c)~0x1a8861c
'host=cnote;sid=pro;port=1521' 'pro' **** HASH(0x1a88c70)) thr#224014
connect using
'(DESCRIPTION=(ADDRESS=(HOST=cnote)(PROTOCOL=tcp)(PORT=1521))(CONNECT_DATA=(SID=pro)))'
New DBI::db (for DBD::Oracle::db, parent=DBI::dr=HASH(0x1a8861c),
id=)
dbih_setup_handle(DBI::db=HASH(0x1a885ec)=>DBI::db=HASH(0x1a88d0c),
DBD::Oracle::db, 19beaf0, Null!)
dbih_make_com(DBI::dr=HASH(0x1a8861c), 182d624, DBD::Oracle::db,
140, 0) thr#224014
<> DESTROY(DBI::db=HASH(0x1a885ec)) ignored for outer handle (inner
DBI::db=HASH(0x1a88d0c) has ref cnt 1)
-> DESTROY for DBD::Oracle::db (DBI::db=HASH(0x1a88d0c)~INNER)
thr#224014
DESTROY for DBI::db=HASH(0x1a88d0c) ignored - handle not
initialised
ERROR: '-1' 'ERROR OCIInitialize. Check ORACLE_HOME and NLS
settings etc.' (err#1)
<- DESTROY= undef at DBI.pm line 594 via C:\Data\Perl\extract.pl
line 22
dbih_clearcom 0x1a885ec (com 0x1a8e34c, type 2) done.
!! ERROR: '-1' 'ERROR OCIInitialize. Check ORACLE_HOME and NLS
settings etc.' (err#0)
<- connect= undef at DBI.pm line 594
-> $DBI::errstr (&) FETCH from lasth=HASH
>> DBD::Oracle::dr::errstr
<- $DBI::errstr= 'ERROR OCIInitialize. Check ORACLE_HOME and NLS
settings etc.'
DBI connect('host=cnote;sid=pro;port=1521','pro',...) failed:
ERROR OCIInitialize. Check ORACLE_HOME and NLS settings etc.
DBI connect('host=cnote;sid=pro;port=1521','pro',...) failed: ERROR
OCIInitialize. Check ORACLE_HOME and NLS settings etc. at
C:\Data\Perl\extract.pl line 22
-> $DBI::errstr (&) FETCH from lasth=HASH
>> DBD::Oracle::dr::errstr
<- $DBI::errstr= 'ERROR OCIInitialize. Check ORACLE_HOME and NLS
settings etc.'
connect failed ERROR OCIInitialize. Check ORACLE_HOME and NLS settings
etc.
-- DBI::END
!! ERROR: '-1' CLEARED by call to disconnect_all method
-> disconnect_all for DBD::Oracle::dr
(DBI::dr=HASH(0x19bed9c)~0x1a8861c) thr#224014
<- disconnect_all= (not implemented) at DBI.pm line 673 via
C:\Data\Perl\extract.pl line 0
! -> DESTROY in DBD::_::common for DBD::Oracle::dr
(DBI::dr=HASH(0x1a8861c)~INNER) thr#224014
! <- DESTROY= undef during global destruction
dbih_clearcom 0x19bed9c (com 0x182d624, type 1) done.
! <> DESTROY for DBI::dr=HASH(0x19bed9c) ignored (inner handle gone)
.
- Prev by Date: Re: anyway to determine # rows before fetch loop ends and without seperate count(*)
- Next by Date: Re: anyway to determine # rows before fetch loop ends and without seperate count(*)
- Previous by thread: anyway to determine # rows before fetch loop ends and without seperate count(*)
- Next by thread: ANNOUNCE: Rose::DB::Object 0.50 released
- Index(es):
Relevant Pages
|