Home » Open Source » Programming Interfaces » Oracle SQL parallel query within PERL (Oracle 10g )
Oracle SQL parallel query within PERL [message #449868] Thu, 01 April 2010 14:20 Go to next message
jbrizu2
Messages: 2
Registered: April 2010
Junior Member
Hello - I am trying to run an oracle parallel query within a perl script but it will not work. I am getting the following error: ORA-24373: invalid length specified for statement (DBD ERROR: OCIStmtPrepare)
I would appreciate any sugguestions on what to try in order to get this to work.


sub cre_mob_arch_tmp {
print " (*) Creating Base of Mobility Trouble_Ticket_Archive Tickets ...\n";
$sql_statement = `
Create table mob_arch_tmp as select /*+ PARALLEL(a Cool */ * from trouble_ticket_archive@mobility a where to_char((TO_DATE('1970-01-01 00:00:00', 'yyyy-mm-dd hh24:mi:ss')+NUMTODSINTERVAL("CLOSED_TIME"-14400,'second')), 'DD-MON-YY') = to_char(sysdate-1, 'DD-MON-YY')
/
`;

unless ($rows = $dbh->do("$sql_statement")) {
&programError("Could not create table MOB_ARCH_TMP", "$sql_statement", "$DBI::errstr", "dba", "jbriz");
$dbh->rollback;
&logoffOracle($dbh);
exit;
}
} # sub cre_mob_arch_tmp
Re: Oracle SQL parallel query within PERL [message #449870 is a reply to message #449868] Thu, 01 April 2010 14:33 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Parallel hint through network is useless as you have only one network connection, so it is serial.

Regards
Michel
Re: Oracle SQL parallel query within PERL [message #449876 is a reply to message #449870] Thu, 01 April 2010 15:52 Go to previous messageGo to next message
jbrizu2
Messages: 2
Registered: April 2010
Junior Member
The parallel query works when I run it from sqlplus command line. It does not work within my perl script.
Re: Oracle SQL parallel query within PERL [message #449886 is a reply to message #449876] Thu, 01 April 2010 23:51 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
It does not matter as it is useless, just remove it.

Regards
Michel
Previous Topic: show incorrect result
Next Topic: My Fast Connection Failover problem in JDBC
Goto Forum:
  


Current Time: Thu Mar 28 16:43:06 CDT 2024