develooper Front page | | Postings from February 2009

Help on Calling external Perl script from Oracle DB

Thread Next
Assis Guerreiro
February 12, 2009 00:56
Help on Calling external Perl script from Oracle DB
Message ID:

I've got you email address from a presentation called "Perl for Oracle -
Tools and Technologies, by Tim Bunce (Jan 2002)", and I really hope you
can help me on a issue that I'm trying hard to solve, but with no
positive result.
The thing is:
 I used to have the database on a single machine and everything was ok,
until last week, when we changed to new machines.
 now I have a Oracle Standard Edition Database on a two nodes
(RAC) Linux X86-64.
And I'm trying to run a perl script (external procedure)  from the Database.
Everything works fine but with a problem. My language is Portuguese and
there are some Unicode characters, like "ç ã õ é è í ì" that we use here.

So when I call the perl script from the database those Unicode
characters don't work, instead they are replaced by the "?" character.

I've installed the DBI module, the DBD Driver  and I'm using a library and the osutil.RunOsCmd procedure to call external
procedures, like it was before when everything was ok.

Even if ask to run the linux command "echo mão" (in English is "echo
hand") the output is wrong.

cmdoutput varchar2(32767);
cmd varchar2(32767);
cmd := 'echo *mão*';
osutil.RunOsCmd(cmd, cmdoutput);
dbms_output.put_line (cmdoutput);

the ouput is:

19:38:12  Start SQL Editor Execution ...
19:38:12  Processing ...
19:38:12  *** SCRIPT END :  Session:WFCCN@FCCN(1)   10-02-2009 19:38:12 ***
19:38:12  End SQL Editor Execution

Can you give any idea how to solve this problem?

Thanks in advance from Portugal :)
Assis Guerreiro
FCCN - Fundação para a Computação Científica Nacional | DNS.PT
Apartado 50366 | 1708-001 Lisboa | Portugal
Tel.: +351 218 440 140 | Fax.: +351 218 440 157
Email: <>

[ Antes de imprimir esta mensagem pense no ambiente. Before printing
this message, think about environment ]

NOTA DE CONFIDENCIALIDADE: Esta mensagem poderá conter informação
privilegiada e confidencial. Se não é o destinatário da presente
comunicação, agradecemos que nos informe e elimine a mensagem sem que a
mesma seja divulgada, distribuída ou copiada.
CONFIDENTIALITY NOTICE: This e-mail and any attachments are confidential
and may be privileged. If you are not a named recipient, please notify
the sender immediately and do not disclose the contents to another
person, use it for any purpose or store or copy the information in any

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About