ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Sumit.Srivast...@ubs.com>
Subject SQL scripts in ANT
Date Wed, 12 Mar 2008 19:30:52 GMT

Hi Experts..

	I need to run multiple SQL scripts thru ANT...Following is my
code snippet :


			<sql
			    driver="oracle.jdbc.driver.OracleDriver"
			    url="jdbc:oracle:thin:@server.com:DATABASE"
			    userid="${uid}"
			    password="${passwd}"
			    print="yes"
			    onerror="continue"
 
output="${build.output.root}/output/sql/outputfile.txt"
    			    >				
    			    	<classpath>
			        <pathelement
location="/path/to/jdbc.jar"/>
			 	</classpath>
    			    <transaction
src="${PLSQL_ROOT}\DropTables.sql" />
			    <transaction
src="${PLSQL_ROOT}\createTables.sql" />
				    
			 </sql>


I tried putting all the *.sql scripts inside one and call that like 

<src="${PLSQL_ROOT}\MasterScript.sql" />

MasterScript.sql contains following :

@DropTables

@createTables

But , ANT is not able to recognise "@" exits..


Is there a way to accomplish this ?? This would be lot easier to manage,
as we can comment/uncomment depending on the scenario instead of
changing the build script everytime.


Please suggest something..

Thanks,
Sumit

Mime
View raw message