Strange problem with perl-oracle

  • Thread starter alessandro.lagostena
  • Start date
A

alessandro.lagostena

Hello Gents

I have strange problem with a perl script that query a Oracle DB


I have installed Perl 5.005 +CPAN DBI and driver Oracle on 2 Sun BOX
with Solaris 2.7 and Oracle *
Thoericaly the box have the same configuration

Solaris 2.7
Perl 5.005 + CPAN (Same kit copied from a third )server
jdk 1.2.2
Same unix env
Same Db Oracle
If i run a simple program (see below) for access a oracle db on server
A all work fine BUT on server B i see a stranges message realted the
java env (see below)


#----------------------------------------------------------------------------------------------
#Source code
#!/usr/local/bin/perl
use DBI;
use File::Basename;
use URI::Escape;

my $dbh;
#
$OSNAME=lc($^O); # extract O.S name
if ( $OSNAME eq "mswin32" ) {$DRIVER="ODBC";} # Use ODBC
for solve problem with blobs
else {$DRIVER="Oracle";}
#
# Connect to database
#
$istance="GEWTON01";
$username="wtadmin";
$password="xxx";
#
print "DRIVER=$DRIVER ISTANCE=$istance USERNAME=$username
PASSWORD=$password \n";
#
my $dbh = DBI->connect( "dbi:$DRIVER:$istance",
$username,
$password,
{AutoCommit => 0,
RaiseError => 1,
PrintError => 0 ,
LongReadLen=> 512000 } )
#
or die $DBI::errstr;
#
my $cm ="SELECT TNAME FROM TAB";
&debug ( "cm=$cm" );
my $sth = $dbh->prepare($cm);
$sth->execute;
#
while ( $h_ref =$sth->fetchrow_hashref('NAME_uc') )
{

%table=%$h_ref;
print $table{"TNAME"};
}
#
$sth->finish; # Close the query
#
$dbh->disconnect;
#----------------------------------------------------------------------------------------------
#Result

perl /tmp/provadb.pl

DRIVER=Oracle ISTANCE=WCCOE3 USERNAME=wtadmin PASSWORD=xxx

You must install a Solaris patch to run this version of the Java runtime.
Please see the README and release notes for more information.
I think that the errors appears when the program try to connect at the DB

I have compared the 2 box but seams equals , objvius a difference are
present but i not know where find it

Can someone have some sudgestion about this probelm ?

Thanks for the support

Regards LAGO
 
R

Ron Reidy

[snip]
You must install a Solaris patch to run this version of the Java runtime.
Please see the README and release notes for more information.

Did you read the README file(s)? Have you searched metalink (I think
the problem is answered in both places)?
I think that the errors appears when the program try to connect at the DB

Why don't you know? Have you used the bebugger and stepped through the
code?
 
A

alessandro.lagostena

Ron said:
[snip]
You must install a Solaris patch to run this version of the Java runtime.
Please see the README and release notes for more information.


Did you read the README file(s)? Have you searched metalink (I think
the problem is answered in both places)?
The problem is that i not know what is and where is thie file
Why don't you know? Have you used the bebugger and stepped through the
code?
Yes and the message appears the line

my $dbh = DBI->connect( "dbi:$DRIVER:$istance",
$username,
$password,
{AutoCommit => 0,
RaiseError => 1,
PrintError => 0 ,
LongReadLen=> 512000 } )Thanks for the support regards LAGO
 
J

James Willmore

alessandro.lagostena said:
You must install a Solaris patch to run this version of the Java runtime.
Please see the README and release notes for more information.
I think that the errors appears when the program try to connect at the DB

I have compared the 2 box but seams equals , objvius a difference are
present but i not know where find it

Can someone have some sudgestion about this probelm ?

The DBI module provides a 'trace' method to see the communications
between the script and the server.

DBI->(4,'tracefile.txt');

The '4' is the level and 'tracefile.txt' is the file that will hold
the trace - which is very verbose if set to '4' (see the DBI
documentation for more options and settings).

This will aid in troubleshooting the issue - as well as reading the
README.

HTH

Jim
 
M

makbo

It is your Oracle installation. One is installed with optional
security features and the other is not. This is why it works on one
server and not the other.

The error message is confusing because a natural assumption is that you
are supposed to look at some Solaris or Java readme. However the
README.java file that comes with DBD::Oracle distribution describes this
problem.

But Wait!!! You don't have to perform any "major surgery" or the
complicated error prone hacks given in the README.java file. (Not to
mention that some of these will almost certainly prevent you from
getting support from Oracle Corp. under your license.)

Just re-run the Oracle Installer program and when you get to the part
about "Do you want to install optional security support?" (such as
RADIUS) just say no. This does not affect Oracle's basic built-in security.

Alternately, if you are careful to skip log files and various
configuration files, you can even rsync the $ORACLE_HOME directory tree
from one machine to the other (but this too may void your Oracle support).

--Mark Bole

alessandro.lagostena wrote:

Hello Gents

I have strange problem with a perl script that query a Oracle DB


[...]

You must install a Solaris patch to run this version of the Java runtime.
Please see the README and release notes for more information.
I think that the errors appears when the program try to connect at the DB

I have compared the 2 box but seams equals , objvius a difference are
present but i not know where find it

Can someone have some sudgestion about this probelm ?

Thanks for the support

Regards LAG
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,226
Latest member
KristanTal

Latest Threads

Top