Page 1 of 1

SQL Scrip and Installer Build Automation

Posted: Wed Aug 20, 2014 8:33 am
by jcassidy
Hello,

I looked through the plug in area and did some searching of the web but have not found anything that appears to do what I would like to do. I would like to set up my SQL Script objects so that I can fill out all of the fields except for the Script area. Instead this area can be pointed at a file path and name during build. When automating builds this would allow the developers to drop the appropriate script into a folder for the Installer build to use during the automated build process.

If the developer is already in the program to update the scripts then it defeats the purpose of automating the build.

Is there a feature that I do not know about or a plugin available that will do what I would like to do?

Thanks
James

Re: SQL Scrip and Installer Build Automation

Posted: Thu Aug 21, 2014 8:44 am
by FrancescoT
Dear James,

if I haven't missed your question, you could proceed as follow via script;

- use the IA "File Bag" command to integrate your SQL script with your package. The command allows to include a collection of files (and folders) with the setup. The included files are available only while setup is running and are not permanently installed on the target system. This command is typically used when a collection of files are temporarily required at (un)install time, but not by the installed application itself.

- use a direct call to SQLCMD.EXE (MS SQL command line tool) to execute your script file via "Run Program" (IA command). To pass the temporary location of your SQL script file with "Run Program", use a custom variable to hold the value returned of the previous "File Bag" command (see IA documentation for more details).

Obviously with the above approach, your sql script file must keep the same identical file name each time is updated in your shared folder.

Hope this helps you.

Regards