ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Stewart" <MStew...@mgtplc.com>
Subject ANT and SQLPlus
Date Wed, 23 Apr 2008 10:43:21 GMT
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@DEMODB AS SYSDBA" @\newuser.sql


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@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message