Another option you might consider is spooling your sql files to a set of
sql scripts such as storeProcedures.sql , Views.sql, Types.sql,
Triggers.sql etc.  during your build process... then during deployment
you can organize in logical order on what you want to upload first (eg.
Data Types, views, procedures etc) by simply calling the script

 

For example:

<exec failonerror="true" program="YourExePath"
workingdir="${dist.path}/SomeDirOutThere">

<arg line='-S ${db.server} -d ${db.name} -X1 -b -i Views.sql -o
log/Views.log'/>

</exe>

 

In addition you can also pass additional parameters that you might have
in the sql scripts using the -v flag for example:

-v plandataDB=${plandata.db}

 

Now this would take into assumption that you have structured your
directories in vss in certain order or have a naming convention for your
.sql files

 

Cheers,  rk~

 

 

+++++++++++++++++++++++++++
Robert Earl-Kolev
Senior CM Engineer
Adaptis Inc.
(206) 971-7342 | [EMAIL PROTECTED]

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bevan
Arps
Sent: Tuesday, April 03, 2007 12:49 PM
To: NANT Mailing List
Subject: Re: [NAnt-users] Regarding DB Build Using NANT

 

Hello Deepak.

 

I've done exactly what you describe - check out the <foreach> task and
use it to loop over your SQL files, running each in turn.

 

My scripts have to be run in proper sequence, so I've numbered them.

 

Hope this helps,

Bevan.

 

 

________________________________

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Deepak
Surendran
Sent: Tuesday, 3 April 2007 8:29 p.m.
To: NANT Mailing List
Subject: [NAnt-users] Regarding DB Build Using NANT

 

Dear All,

We have automated the database build. The script will get the script
from VSS.Then i will execute the script if it is Table..it will update
in the table..if it is stored procedure...then ti will update the stored
procedure.

 

I am finding some problem while using SQLCMD command for execute the
script in my DB script folder in VSS...i have 10 DB script. But when the
nant script start execution it is not executing more than one script..i
have to enter the file name manually ....is there is any way to run the
enitre database scriipt at a time. So tht all my DB script will be
updated.....Please find the script

 

.5 <!-- Executing the Script and updating in SQL Database -->
<target name="Execute">
<exec failonerror="false" program="C:FilesSQL Server90.EXE" commandline
=' -i "${script}_solicitorContact_update.sql" -S "${server}" -d
"${database}"'/>
</target>

 

Regards,

Deepak S

 

************************************************************************
******

"This message (and any files transmitted with it) are confidential and 

may be legally privileged. If you are not the intended recipient please

notify the sender immediately and delete this message from your system.

 

This message does not necessarily reflect the views of the

Reserve Bank of New Zealand. If the recipient has any concerns about

the content of this message they should seek alternative confirmation

from the Reserve Bank of New Zealand."

************************************************************************
******

 


Confidentiality Notice: This e-mail message, including any attachments, is for 
the sole use of the intended recipient(s) and may contain information that is 
confidential privileged and/or exempt from disclosure under applicable law.  
Any unauthorized review, use, disclosure or distribution is prohibited.  If you 
are not the intended recipient, please contact the sender by reply e-mail and 
destroy all copies of the original message.



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to