I never thought this is possible...
I decided (in the end), I need to upgrade the DBI +
DBD::Oracle. And since I am doing upgrading, I decided
to upgrade Perl as well.
But since, I just have a normal user account, I can
not write to /usr/local/ for my perl. So, I decided to
put entire Perl into my home directory. (I never did
this before, I guess I was desparate...)
Anyway, the installation went smoothly. (To my
surprise), I
manage to install Perl 5.6.1 + DBI 1.21 + DBD::Oracle
1.12
Now, I get a different set of error messages:
-------------------------------------------
NOTE Connection OK
Prepare OK
Bind OK
DBD::Oracle::st execute failed: ORA-06550: line 3,
column 3:
PLS-00553: character set name is not recognized
ORA-06550: line 0, column 0:
PL/SQL: Compilation unit analysis terminated (DBD
ERROR: OCIStmtExecute) at ./test1.pl line 47.
ERROR: DBD::Oracle::st execute failed: ORA-06550: line
3, column 3:
PLS-00553: character set name is not recognized
ORA-06550: line 0, column 0:
PL/SQL: Compilation unit analysis terminated (DBD
ERROR: OCIStmtExecute) at ./test1.pl line 47.
Close DBI
----------------------------------------------
I read through the Oracle page, these seems to point
to some problem with the PL/SQL that I am using.
Nothing related to perl.
Again, SELECT and retrieve from table is OK with the
new installation.
The Perl code:
====================================
sub Do_query
{
my $dbi = shift;
my $dbh = $dbi->{DBI};
my $result = "";
my $sth;
eval {
$sth = $dbh->prepare( q{
BEGIN
:aa := check_sms_book_request('11');
END;
} );
print "Prepare OK\n";
$sth->bind_param_inout(":aa",
\$result, 30);
print "Bind OK\n";
$sth->execute;
print "Execute OK\n";
};
if( $@ ){
print "ERROR: $@\n";
} else{
print "Result is $result\n";
}
$sth->finish;
return;
}
================================
PL/SQL and SQL function is done by another person. I
am suppose to access the PL/SQL and SQL function only.
We actually tested the PL/SQL statement above. Is
working in the Oracle SQL command console. So, not
sure what went wrong.
NOTE: This is interesting, the idea I can by pass
administratior and install the entire Perl into my own
directory set whatever control that /I/ want is
*fun*...
Still trying to figure out what is going on...
--- Sei Heng Ang <[EMAIL PROTECTED]> wrote:
> I still can't figure out how this problem occur. Is
> very
> strange. I can execute SELECT and retrieve records
> from the table. But, whenever I try to run PL/SQL or
> SQL function, errors will occur. There are other
> errors from the
> error code stated below.
>
> Is there something I need to do with this
> DBD::Oracle
> thing before I can PL/SQL or SQL functions?
>
> The perl version 5.005_03. DBD::Oracle version 1.06.
> Oracle database: 8.x
>
> The network setup:
>
> 1) The Web server (Solaris), communicate with Oracle
> DB server.
> 2) I suggested to use Perl + DBD::Oracle for the
> database connection. (Since is already installed
> into
> the system)
> 3) Web server and the Oracle DB server is at two
> different machines. Same network.
>
> I am going nuts about this problem. Can't figure out
> what went wrong...
>
> Note: I don't have the root access to the webserver,
> thus may not be able to install a new/updated Perl +
> DBI + DBD::Oracle. Unless I can prove that an
> upgrade
> will solved all the problem.
>
> Anyone can suggest anything?
>
> Regard,
> Sei Heng
>
>
> --- Sei Heng Ang <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > I have a function in the Oracle database, already
> > created, which take in no input value, out put a
> > status that is varchar2(6).
> >
> > However, when I try to execute the following SQL
> in
> > DBD::Oracle, there was error appear.
> >
> > The SQL code:
> >
> > ==================
> > BEGIN
> > :t := test_func;
> > END;
> > ===================
> >
> >
> >
> > The perl code:
> >
> > ===================
> > my $tb_csr;
> > my $result = "";
> >
> > $tb_csr = $dbi->{DBI}->prepare(q{
> > BEGIN
> > :t := test_func;
> > END;
> > });
> >
> > print "prepare OK\n";
> >
> > $tb_csr->bind_param_inout(":t", \$result, 20);
> >
> > print "bind OK\n";
> >
> > $tb_csr->execute;
> >
> > print "EXEC OK\n";
> >
> > print "Status: $result\n";
> >
> > ========================================
> >
> >
> > When I execute the code, I get the following
> error:
> >
> > --------------------------
> > prepare OK
> > bind OK
> > DBD::Oracle::st execute failed: ORA-24365: error
> in
> > character conversion (DBD ERROR: OCIStmtExecute)
> > at....
> > ---------------------------
> >
> > It seems there is an execution error. But, I just
> > can't understand what went wrong. Check over at
> > Oracle
> > site, it stated:
> >
> > ==================================
> > ORA-24365 error in character conversion
> >
> > Cause: This usually occurs during conversion
> of
> > a
> > multibyte character data when the source data is
> > abnormally terminated in the middle of a multibyte
> > character.
> >
> > Action: Make sure that all multibyte character
> > data is properly terminated.
> > =================================
> >
> > Any idea what exactly went wrong?
> >
> > Thanks,
> >
> > Sei Heng
> > ps: I am using DBD::Oracle-1.06. Do I need to
> > upgrade
> > to a newer version.
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Sports - sign up for Fantasy Baseball
> > http://sports.yahoo.com
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Sports - sign up for Fantasy Baseball
> http://sports.yahoo.com
__________________________________________________
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com