• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to execute pl/sql procedure using ant.

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello everyone,

i am writing an ant target to execute pl/sql procedure which is as follows



running the ant target throwing below error

exportSizeRatio:
[sql] Executing commands
[sql] Failed to execute: exec plandatacsv
[sql] java.sql.SQLSyntaxErrorException: ORA-00900: invalid SQL statement
[sql] 0 of 1 SQL statements executed successfully

can anyone please help?

thanks,
pratz
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oracle doesn't like the SQL statement (line 08) that you are passing to it. Have you tried running that command using Oracle command line SQL interpreter?
 
prateek sharmaa
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hey peter,

Peter Johnson wrote:Oracle doesn't like the SQL statement (line 08) that you are passing to it. Have you tried running that command using Oracle command line SQL interpreter?



i tried running exec plandatacsv; using sqlplus and it executed successfully. may be there is some other way to do it using ant. do you have any idea?

thanks,
pratz
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, I do not know if there are any special ways of calling 'exec' via the JDBC driver (which is what is happening with this Ant task). Perhaps the Oracle JDBC driver docs will provide some clues.

Another thought: is there anything in the Oracle error log? Or could you turn on request logging within Oracle to see exactly what is being passed to Oracle?
 
I found a beautiful pie. And a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic