Java Mailing List Archive

http://www.ant-tasks.com/

Home » Ant Users List »

Re: ANT and SQLPlus

david

2008-04-23

Replies: Find Java Web Hosting

Author LoginPost Reply
Hello, if u don't get a better answer from one of the ant gurus u might want to try: expect. it appears from the script file extension (.bat) u r using windows so get expect for windows. HTH.

Mike Stewart wrote ..
> I am trying to execute a SQLPlus script from ANT and have been unable to
> get this to work when the SQLPlus script requires user input as in the
> example below:
>
>
>
> If I execute the ANT target Create:
>
> <target name="Create" >    
>  <exec executable="cmd" >
>    <arg value="/K" />    Note have also tried the
> /C, /c, /k value here but have the same result
>    <arg value="Create.bat" />
>  </exec>
> </target>
>
>
> Where Create.bat contains the following line:
>
>
> SQLPlus "SYS/sys@(protected)
>
>
> Everything is ok until the newuser.sql requires an input, at this point
> SQLPlus exits without waiting for the prompt:
>
>    [exec] Please input spool name. No file extension required (i.e.
> DBC_SCR12345)  >> Disconnected from Oracle9i Ente
> rprise Edition Release 9.2.0.6.0 - Production
>
>
>
>
> If the Create.bat is run from the command line it waits for the input
> and executes as expected.
>
> I've tried various combinations including running SQLPlus in place of
> the cmd executable in ANT and had the same effect.
> Any ideas?
>
>
> Mike S.
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.