RE: Perl-Oracle DBI module

2005-09-20 Thread Mitchell, Louise M
Oracle has some environment variables that are critical, such as
ORACLE_HOME, NLS_LANG, etc.  It appears that these are not set for the
user that is doing the install.  Check with your Oracle DBA if you're
not familiar with these.

L 

-Original Message-
From: Trivedi, Dhirendra [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, September 20, 2005 8:07 AM
To: dbi-users@perl.org
Subject: Perl-Oracle DBI module

Hi, 

Trying to install Oracle Driver for Perl I get the error message 

UNKNOWN OCI STATUS 24322) OCIInitialize. Check ORACLE_HOME  and NLS
settings etc. at t/general.t line 21

Are you able to advise a work around for this ? 

t/base..ok
t/general...DBI->connect failed: (UNKNOWN OCI STATUS 24322)
OCIInitialize. Check ORACLE_HOME  and NLS settings etc. at t/general.t
line 21 Unable to connect to Oracle ((UNKNOWN OCI STATUS 24322)
OCIInitialize. Check ORACLE_HOME and NLS set tings etc.) Tests skiped.
skipping test on this platform
t/long..Unable to connect to Oracle ((UNKNOWN OCI STATUS
24322) OCIInitialize. Check ORA CLE_HOME and NLS settings etc.) Tests
skiped.
skipping test on this platform
t/plsql.Unable to connect to Oracle ((UNKNOWN OCI STATUS
24322) OCIInitialize. Check ORA CLE_HOME and NLS settings etc.) Tests
skiped.
skipping test on this platform
t/reauthskipping test on this platform All tests successful,
4 tests skipped.

Files=5,  Tests=5,  1 wallclock secs ( 1.20 cusr +  0.27 csys =  1.47
CPU)
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib
-I/usr/local/lib/perl5/5.00503/aix -I
/usr/local/lib/perl5/5.00503 test.pl
Oraperl test application $Revision: 1.2 $

Oraperl emulation interface version 1.39 DBD::Oracle 1.06 using OCI8 by
Tim Bunce DBI 1.10 by Tim Bunce

ata sources:
dbi:Oracle:CATDB
dbi:Oracle:EIBTC1
dbi:Oracle:eibtc1
dbi:Oracle:extproc_connection_data
dbi:Oracle:grommit_catdb
dbi:Oracle:grommit_eibtc1
dbi:Oracle:grommit_nolog
dbi:Oracle:tsmrman
dbi:Oracle:wallace_eibtc1


Connecting
 to 'eibtc1' (from command line, else uses ORACLE_SID or TWO_TASK -
recommended)  as 'scott/[EMAIL PROTECTED]' (via ORACLE_USERID env var or
default - recommend name/[EMAIL PROTECTED]) (ORACLE_SID='EIBTC1',
TWO_TASK='')
ora_login: 24322: (UNKNOWN OCI STATUS 24322) OCIInitialize. Check
ORACLE_HOME and NLS settings etc.

Generally set TWO_TASK or ORACLE_SID but not both at the same time.
Try to connect to the database using an oracle tool like sqlplus only if
that works should you suspect problems with DBD::Oracle.
Try leaving dbname value empty and set dbuser to name/[EMAIL PROTECTED]

Test aborted.
make: 1254-004 The error code from the last command is 255.


Stop.





Regards
Dhirendra Trivedi
Tel: 01733 417828
Mob: 07733411458




Thomas Cook - The ultimate expert in leisure travel, visit us at 

www.thomascook.com or tune in to Thomas Cook TV on Sky
Digital Channel 645 or ntl:home channel 857 or visit us at...

www.jmc.com www.tcsignature.com www.style-holidays.co.uk
www.neilson.co.uk www.club18-30.com www.flythomascook.com
www.flexibletrips.com www.sunset-holidays.com 
www.roomsandhotels.com www.thomascooksport.com

This email is confidential, may be legally privileged, and is for
the intended recipient only. Access, disclosure, copying, 
distribution or reliance on any of it by anyone else is prohibited
and may be a criminal offence. Please delete if obtained in error.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be 
the views of Thomas Cook UK Ltd. 


**



Re: Perl-Oracle DBI module

2005-09-20 Thread Jonathan Leffler
So, which part of the README file did you have difficulty understanding?

On 9/20/05, Trivedi, Dhirendra <[EMAIL PROTECTED]> wrote:
> 
> Trying to install Oracle Driver for Perl I get the error message
> 
> UNKNOWN OCI STATUS 24322) OCIInitialize. Check ORACLE_HOME
> and NLS settings etc. at t/general.t line 21
> 
> Are you able to advise a work around for this ?
> 
> t/base..ok
> t/general...DBI->connect failed: (UNKNOWN OCI STATUS 24322) 
> OCIInitialize. Check ORACLE_HOME
> and NLS settings etc. at t/general.t line 21
> Unable to connect to Oracle ((UNKNOWN OCI STATUS 24322) OCIInitialize. 
> Check ORACLE_HOME and NLS set
> tings etc.)
> Tests skiped.
> skipping test on this platform
> t/long..Unable to connect to Oracle ((UNKNOWN OCI STATUS 
> 24322) OCIInitialize. Check ORA
> CLE_HOME and NLS settings etc.)
> Tests skiped.
> skipping test on this platform
> t/plsql.Unable to connect to Oracle ((UNKNOWN OCI STATUS 
> 24322) OCIInitialize. Check ORA
> CLE_HOME and NLS settings etc.)
> Tests skiped.
> skipping test on this platform
> t/reauthskipping test on this platform
> All tests successful, 4 tests skipped.
> 
> Files=5, Tests=5, 1 wallclock secs ( 1.20 cusr + 0.27 csys = 1.47 CPU)
> PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib 
> -I/usr/local/lib/perl5/5.00503/aix -I
> /usr/local/lib/perl5/5.00503 test.pl
> Oraperl test application $Revision: 1.2 $
> 
> Oraperl emulation interface version 1.39
> DBD::Oracle 1.06 using OCI8 by Tim Bunce
> DBI 1.10 by Tim Bunce
> 
> ata sources:
> dbi:Oracle:CATDB
> dbi:Oracle:EIBTC1
> dbi:Oracle:eibtc1
> dbi:Oracle:extproc_connection_data
> dbi:Oracle:grommit_catdb
> dbi:Oracle:grommit_eibtc1
> dbi:Oracle:grommit_nolog
> dbi:Oracle:tsmrman
> dbi:Oracle:wallace_eibtc1
> 
> 
> Connecting
> to 'eibtc1' (from command line, else uses ORACLE_SID or TWO_TASK - 
> recommended)
> as 'scott/[EMAIL PROTECTED]' (via ORACLE_USERID env var or default - 
> recommend 
> name/[EMAIL PROTECTED])
> (ORACLE_SID='EIBTC1', TWO_TASK='')
> ora_login: 24322: (UNKNOWN OCI STATUS 24322) OCIInitialize. Check 
> ORACLE_HOME and NLS settings etc.
> 
> Generally set TWO_TASK or ORACLE_SID but not both at the same time.
> Try to connect to the database using an oracle tool like sqlplus
> only if that works should you suspect problems with DBD::Oracle.
> Try leaving dbname value empty and set dbuser to name/[EMAIL PROTECTED]
> 
> Test aborted.
> make: 1254-004 The error code from the last command is 255.
> 
> 
> Stop.
> 
> 
> 
> 
> 
> Regards
> Dhirendra Trivedi
> Tel: 01733 417828
> Mob: 07733411458
> 
> 
> 
> 
> Thomas Cook - The ultimate expert in leisure travel, visit us at
> 
> www.thomascook.com  or tune in to Thomas Cook 
> TV on Sky
> Digital Channel 645 or ntl:home channel 857 or visit us at...
> 
> www.jmc.com  
> www.tcsignature.com 
> www.style-holidays.co.uk 
> www.neilson.co.uk  
> www.club18-30.com 
> www.flythomascook.com 
> www.flexibletrips.com  
> www.sunset-holidays.com 
> www.roomsandhotels.com  
> www.thomascooksport.com 
> 
> This email is confidential, may be legally privileged, and is for
> the intended recipient only. Access, disclosure, copying,
> distribution or reliance on any of it by anyone else is prohibited
> and may be a criminal offence. Please delete if obtained in error.
> Any views expressed in this message are those of the individual
> sender, except where the sender specifically states them to be
> the views of Thomas Cook UK Ltd.
> 
> **
> 
> 


-- 
Jonathan Leffler <[EMAIL PROTECTED]> #include 
Guardian of DBD::Informix - v2005.02 - http://dbi.perl.org
"I don't suffer from insanity - I enjoy every minute of it."


Perl-Oracle DBI module

2005-09-20 Thread Trivedi, Dhirendra
Hi, 

Trying to install Oracle Driver for Perl I get the error message 

UNKNOWN OCI STATUS 24322) OCIInitialize. Check ORACLE_HOME
 and NLS settings etc. at t/general.t line 21

Are you able to advise a work around for this ? 

t/base..ok
t/general...DBI->connect failed: (UNKNOWN OCI STATUS 24322) 
OCIInitialize. Check ORACLE_HOME
 and NLS settings etc. at t/general.t line 21
Unable to connect to Oracle ((UNKNOWN OCI STATUS 24322) OCIInitialize. Check 
ORACLE_HOME and NLS set
tings etc.)
Tests skiped.
skipping test on this platform
t/long..Unable to connect to Oracle ((UNKNOWN OCI STATUS 24322) 
OCIInitialize. Check ORA
CLE_HOME and NLS settings etc.)
Tests skiped.
skipping test on this platform
t/plsql.Unable to connect to Oracle ((UNKNOWN OCI STATUS 24322) 
OCIInitialize. Check ORA
CLE_HOME and NLS settings etc.)
Tests skiped.
skipping test on this platform
t/reauthskipping test on this platform
All tests successful, 4 tests skipped.

Files=5,  Tests=5,  1 wallclock secs ( 1.20 cusr +  0.27 csys =  1.47 CPU)
PERL_DL_NONLAZY=1 /usr/bin/perl -Iblib/arch -Iblib/lib 
-I/usr/local/lib/perl5/5.00503/aix -I
/usr/local/lib/perl5/5.00503 test.pl
Oraperl test application $Revision: 1.2 $

Oraperl emulation interface version 1.39
DBD::Oracle 1.06 using OCI8 by Tim Bunce
DBI 1.10 by Tim Bunce

ata sources:
dbi:Oracle:CATDB
dbi:Oracle:EIBTC1
dbi:Oracle:eibtc1
dbi:Oracle:extproc_connection_data
dbi:Oracle:grommit_catdb
dbi:Oracle:grommit_eibtc1
dbi:Oracle:grommit_nolog
dbi:Oracle:tsmrman
dbi:Oracle:wallace_eibtc1


Connecting
 to 'eibtc1' (from command line, else uses ORACLE_SID or TWO_TASK - recommended)
 as 'scott/[EMAIL PROTECTED]' (via ORACLE_USERID env var or default - recommend 
name/[EMAIL PROTECTED])
(ORACLE_SID='EIBTC1', TWO_TASK='')
ora_login: 24322: (UNKNOWN OCI STATUS 24322) OCIInitialize. Check ORACLE_HOME 
and NLS settings etc.

Generally set TWO_TASK or ORACLE_SID but not both at the same time.
Try to connect to the database using an oracle tool like sqlplus
only if that works should you suspect problems with DBD::Oracle.
Try leaving dbname value empty and set dbuser to name/[EMAIL PROTECTED]

Test aborted.
make: 1254-004 The error code from the last command is 255.


Stop.





Regards
Dhirendra Trivedi 
Tel: 01733 417828
Mob: 07733411458




Thomas Cook - The ultimate expert in leisure travel, visit us at 

www.thomascook.com or tune in to Thomas Cook TV on Sky
Digital Channel 645 or ntl:home channel 857 or visit us at...

www.jmc.com www.tcsignature.com www.style-holidays.co.uk
www.neilson.co.uk www.club18-30.com www.flythomascook.com
www.flexibletrips.com www.sunset-holidays.com 
www.roomsandhotels.com www.thomascooksport.com

This email is confidential, may be legally privileged, and is for
the intended recipient only. Access, disclosure, copying, 
distribution or reliance on any of it by anyone else is prohibited
and may be a criminal offence. Please delete if obtained in error.
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be 
the views of Thomas Cook UK Ltd. 

**



Re: DB2 Err Handling

2005-09-20 Thread Dan Scott

Tim Bunce wrote:

On Fri, Sep 02, 2005 at 05:37:57PM -0500, johnn wrote:


Capacio, Paula J wrote:



my $stmt = 'select count(*) from sysibm.badTblnm ';
my $sth = $dbh->prepare($stmt) or die "Prepare Failed\n";


DBD::DB2 doesn't seem to return false values for failures.



If that's true then it's broken.

It may just be that the prepare() doesn't send the sql to the server
until it's execute()'d - so any sql errors won't be noticed till then.


Tim -- that's exactly the case. We're using deferred prepare by default 
in the DBD::DB2 driver.



That's quite common across many drivers (as it saves round-trips to the
server) and is, I think, mentioned in the DBI docs from prepare().


If you want to disable deferred prepare, you can:
* set the db2_deferred_prepare statement attribute to false
* or set "DeferredPrepare = 0" in your db2cli.ini file

Thanks,
Dan

P.S. Sorry for the delay -- just sold our house and have been focused on 
life outside of computers for the last month or so :)


Error writing to double using ODBC

2005-09-20 Thread Wim Livens

I'm having trouble writing to columns of type DOUBLE using ODBC (to
Pervasive.SQL)

  $dbh = DBI->connect('dbi:ODBC:DEMODATA','','',{RaiseError => 1, PrintError 
=>1}) or die $DBI::errstr;
  $sth=$dbh->prepare("update mytable set mycolumn=? where id=123") || die 
$DBI::errstr;
  $value=3/2;
  $sth->execute($value)  || die $DBI::errstr;

Yields:

  DBD::ODBC::st execute failed: [Pervasive][ODBC Client 
Interface][LNA][Pervasive][ODBC Engine Interface]Error converting to numeric 
type: Parameter #1. (SQL-22018)(DBD: st_execute/SQLExecute err=-1)

My platform:

  perl, v5.8.7 built for cygwin-thread-multi-64int
  DBI version 1.48
  DBD::ODBC vesrion 1.13
  Pervasive.SQL 08.60.0192 030

$dbh->column_info correctly gives SQL_DOUBLE

I also tried these but they don't make any difference.

  $sth->bind_param(1, $value, SQL_DOUBLE);
  $dbh->{odbc_default_bind_type}=SQL_DOUBLE;
  $dbh->do("set decimalseparatorcomma=OFF");

Any hints ?

Thanks,

Wim.