(Fwd) Just a quick question on the DBI perl mod
(Fwd) Just a quick question on the DBI perl mod
am 24.05.2006 16:34:45 von Tim.Bunce
----- Forwarded message from Joe McTigue -----
Subject: Just a quick question on the DBI perl mod
Date: Wed, 17 May 2006 14:22:38 -0400
From: Joe McTigue
To: timbo@cvs.perl.org
X-Virus-Checked: Checked
Hi Tim,
I am currently getting the following error message and was wondering if you could help?
If you can, here's the scenario: The code below is what I'm trying to accomplish reading a file
consisting of insert, update and delete statements. But I've been getting the following error now
for the past several days now and can't seem to figure it out:
######### ERROR FOLLOWS:
starting file: DELETE.sql
DBI connect('databasename','username',...) failed: ORA-24315: illegal attribute type (DBD ERROR:
OCIAttrGet OCI_ATTR_ENV_CHARSET_ID) at perlscript.pl line 463
Can't connect to database:ORA-24315: illegal attribute type (DBD ERROR: OCIAttrGet
OCI_ATTR_ENV_CHARSET_ID) at perlscript.pl line 463.
######### END OF ERROR ###########
######### CODE SEGMENT FOLLOWS #########
my $INPUT_SQL = FileHandle->new("cat ${working_file} |") or die ("Can not open ${working_file}:
$!\n");
next line is line : 463
my $dbc = DBI->connect( "dbi:Oracle:$nameofdb", "$username", "$password" ) || die "Can't connect to
database:" . DBI->errstr();
while ( my $line = $INPUT_SQL->getline() )
{
chomp( $line );
my $sth = $dbc->prepare( $line ) or die "Can't prepare SQL statement.\n";
$sth->execute() or die "Can't execute SQL statement.\n";
}
$INPUT_SQL->close();
$dbc->disconnect() or warn "Error disconnecting: \n";
######### END CODE SEGMENT ##################
Any help would be incredibly wonderful at this point.
Regards,
Joseph P. McTigue
CBC Innovis, QA Department
[1]Joe.McTigue@CBC-Companies.com
(614) 538-6032
References
Visible links
1. mailto:Joe.McTigue@cbc-companies.com
----- End forwarded message -----
RE: (Fwd) Just a quick question on the DBI perl mod
am 24.05.2006 16:38:08 von Ron.Reidy
Joe,
What OS and version, version of DBI, version of DBD::Oracle?
--
Ron Reidy
Lead DBA
Array BioPharma, Inc.
-----Original Message-----
From: Tim Bunce [mailto:Tim.Bunce@pobox.com]=20
Sent: Wednesday, May 24, 2006 8:35 AM
To: dbi-users@perl.org
Cc: Joe.McTigue@CBC-Companies.com
Subject: (Fwd) Just a quick question on the DBI perl mod
----- Forwarded message from Joe McTigue
-----
Subject: Just a quick question on the DBI perl mod
Date: Wed, 17 May 2006 14:22:38 -0400
From: Joe McTigue
To: timbo@cvs.perl.org
X-Virus-Checked: Checked
Hi Tim,
I am currently getting the following error message and was wondering
if you could help?
If you can, here's the scenario: The code below is what I'm trying
to accomplish reading a file
consisting of insert, update and delete statements. But I've been
getting the following error now
for the past several days now and can't seem to figure it out:
######### ERROR FOLLOWS:
starting file: DELETE.sql
DBI connect('databasename','username',...) failed: ORA-24315: illegal
attribute type (DBD ERROR:
OCIAttrGet OCI_ATTR_ENV_CHARSET_ID) at perlscript.pl line 463
Can't connect to database:ORA-24315: illegal attribute type (DBD
ERROR: OCIAttrGet
OCI_ATTR_ENV_CHARSET_ID) at perlscript.pl line 463.
######### END OF ERROR ###########
######### CODE SEGMENT FOLLOWS #########
my $INPUT_SQL =3D FileHandle->new("cat ${working_file} |") or die
("Can not open ${working_file}:
$!\n");
next line is line : 463
my $dbc =3D DBI->connect( "dbi:Oracle:$nameofdb", "$username",
"$password" ) || die "Can't connect to
database:" . DBI->errstr();
while ( my $line =3D $INPUT_SQL->getline() )
{
chomp( $line );
my $sth =3D $dbc->prepare( $line ) or die "Can't prepare =
SQL
statement.\n";
$sth->execute() or die "Can't execute SQL statement.\n";
}
$INPUT_SQL->close();
$dbc->disconnect() or warn "Error disconnecting: \n";
######### END CODE SEGMENT ##################
Any help would be incredibly wonderful at this point.
Regards,
Joseph P. McTigue
CBC Innovis, QA Department
[1]Joe.McTigue@CBC-Companies.com
(614) 538-6032
References
Visible links
1. mailto:Joe.McTigue@cbc-companies.com
----- End forwarded message -----
This electronic message transmission is a PRIVATE communication which =
contains
information which may be confidential or privileged. The information is =
intended=20
to be for the use of the individual or entity named above. If you are =
not the=20
intended recipient, please be aware that any disclosure, copying, =
distribution=20
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.
Re: (Fwd) Just a quick question on the DBI perl mod
am 24.05.2006 17:18:58 von scoles
ORA-24315 is a tricky one.
Seems this has cropped up the odd time with a number of different system
(seen the same in PHP). It could be that your session is timing out so
DBD::Oracle cannot get a handle or it could have something to do with the
oracle language settings. Check with you DBA and see if you have any
special features set on you DB.
I have seen this most often with people trying to log in as the "SYS" user
you may want to try a different user.
cheers
John Scoles
----- Original Message -----
From: "Tim Bunce"
To:
Cc:
Sent: Wednesday, May 24, 2006 10:34 AM
Subject: (Fwd) Just a quick question on the DBI perl mod
> ----- Forwarded message from Joe McTigue
-----
>
> Subject: Just a quick question on the DBI perl mod
> Date: Wed, 17 May 2006 14:22:38 -0400
> From: Joe McTigue
> To: timbo@cvs.perl.org
> X-Virus-Checked: Checked
>
> Hi Tim,
>
>
>
> I am currently getting the following error message and was wondering if
you could help?
>
> If you can, here's the scenario: The code below is what I'm trying to
accomplish reading a file
>
> consisting of insert, update and delete statements. But I've been
getting the following error now
>
> for the past several days now and can't seem to figure it out:
>
> ######### ERROR FOLLOWS:
>
> starting file: DELETE.sql
>
> DBI connect('databasename','username',...) failed: ORA-24315: illegal
attribute type (DBD ERROR:
> OCIAttrGet OCI_ATTR_ENV_CHARSET_ID) at perlscript.pl line 463
>
> Can't connect to database:ORA-24315: illegal attribute type (DBD ERROR:
OCIAttrGet
> OCI_ATTR_ENV_CHARSET_ID) at perlscript.pl line 463.
>
> ######### END OF ERROR ###########
>
>
>
> ######### CODE SEGMENT FOLLOWS #########
>
> my $INPUT_SQL = FileHandle->new("cat ${working_file} |") or die
("Can not open ${working_file}:
> $!\n");
>
>
>
> next line is line : 463
>
> my $dbc = DBI->connect( "dbi:Oracle:$nameofdb", "$username",
"$password" ) || die "Can't connect to
> database:" . DBI->errstr();
>
>
>
> while ( my $line = $INPUT_SQL->getline() )
>
> {
>
> chomp( $line );
>
>
>
> my $sth = $dbc->prepare( $line ) or die "Can't prepare SQL
statement.\n";
>
>
>
> $sth->execute() or die "Can't execute SQL statement.\n";
>
>
>
> }
>
> $INPUT_SQL->close();
>
>
>
> $dbc->disconnect() or warn "Error disconnecting: \n";
>
>
>
> ######### END CODE SEGMENT ##################
>
>
>
> Any help would be incredibly wonderful at this point.
>
>
>
>
>
> Regards,
>
> Joseph P. McTigue
>
> CBC Innovis, QA Department
>
> [1]Joe.McTigue@CBC-Companies.com
>
> (614) 538-6032
>
>
>
> References
>
> Visible links
> 1. mailto:Joe.McTigue@cbc-companies.com
>
> ----- End forwarded message -----
>
Re: (Fwd) Just a quick question on the DBI perl mod
am 24.05.2006 17:52:31 von cj10
John Scoles wrote:
> ORA-24315 is a tricky one.
> Seems this has cropped up the odd time with a number of different system
> (seen the same in PHP). It could be that your session is timing out so
> DBD::Oracle cannot get a handle or it could have something to do with the
> oracle language settings. Check with you DBA and see if you have any
> special features set on you DB.
Incomprehensible errors at connect time can be cause by version
mismatches. The following three things should be the same.
1. The version of the Oracle client which was used in the
compilation of DBD::Oracle.
2. The version of of libclntsh.so which is dynamically linked
when DBD::Oracle is loaded at run-time.
3. The version of the Oracle client pointed to by ORACLE_HOME
at run-time.
(3) is not relevant for Instant Clients, as they do not fetch
auxiliary files via ORACLE_HOME.
A possible explanation of the OP's problem is that the Oracle
client installation he is using has been upgraded since his
DBD::Oracle was compiled. Other possibilities are that the
DBD::Oracle was compiled using a different ORACLE_HOME than
tha used at run-time, or that dynamic linking is being done
wrongly.
--
Charles Jardine - Computing Service, University of Cambridge
cj10@cam.ac.uk Tel: +44 1223 334506, Fax: +44 1223 334679