Install with huge database SQL script - Advanced Installer Community
tusmester
Posts: 1
Joined: Tue Jan 22, 2013 2:53 pm

Install with huge database SQL script

Hi, I'm trying to create an installer for a web application (IIS 7.5) that needs a huge database.

Until now I used the IIS Web Deployment Tool to distribute my package, but now I am evaluating Advanced Installer. The problem is that I have some really huge install scripts that insert a lot of binaries into the database. There are 3 SQL scripts, around 200 MBs together. Web deployment tool can handle them (able to execute the scripts in around 1 minute), but Advanced Installer hangs up in the SQL script execution phase. No error messages, no crash, it just hangs up, and I cannot close the dialog either.
(another problem is that the package became 350 MBs after adding my scripts, is there a way to somehow compress the scripts...?)

I know that the package itself works, because I am able to complete the installer with a small SQL script. And of course the warning comes when I add my huge scripts that they are too big and mybe I'll have performance problems during installation, big suprise :).

Do you have any suggestions? Should I try to break down the script into smaller pieces? Or is there a way to restore a full database from a backup? The problem with that is that I have'nt found a way to do that In Advanced Installer and even if I found it, I'm not sure I can use it: I need my package to be compatible with different versions of SQL server, e.g. 2008 R2, 2012 Express, etc. Not sure if I can provide a unified database backup file for them to restore.

Thanks
Miklós
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Install with huge database SQL script

Hello Miklós and welcome to Advanced Installer frums,

Thank you for your interest in Advanced Installer.
The problem is that I have some really huge install scripts that insert a lot of binaries into the database. There are 3 SQL scripts, around 200 MBs together. Web deployment tool can handle them (able to execute the scripts in around 1 minute), but Advanced Installer hangs up in the SQL script execution phase. No error messages, no crash, it just hangs up, and I cannot close the dialog either.
This may happen because we process the script file for expanding any formatted references which might be used by our "SQL Scripts Replacement" support. We have planned for the near future to have this processing made optional, so you can disable it if you are not using our "SQL Scripts Replacement" support or if no formatted references (e.g. installer properties) are used in the replacements. Until then, in order to disable this processing you can use this modified version of our SQL.dll which disable the SQL Scripts Replacement support. Just replace the SQL.dll from Advanced Installer installation folder (e.g. C:\Program Files (x86)\Caphyon\Advanced Installer 9.8\custact\x86) with the above one, restart Advanced Installer and then force a rebuild on your project.

So, can you rebuild your project using the above dll and see if the behavior still persist?
(another problem is that the package became 350 MBs after adding my scripts, is there a way to somehow compress the scripts...?)
I'm afraid we don't have support for this.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Install with huge database SQL script

Hello,

Starting with version 10.1 of Advanced Installer, if our "SQL Scripts Replacement" feature is not used, we have added support to automatically skip at install time the processing of SQL Scripts for expanding any formatted references which might be used by our "SQL Scripts Replacement" support. However, if you are using our "SQL Scripts Replacement" support, then this processing will be always executed at install time.

If you have large SQL scripts (added on our "SQL Scripts" page) containing SQL scripts replacements, then as a workaround, if the added replacements are used only for a small portion of your script you can proceed like this:
- split your SQL script into two (or multiple) scripts: one (or more) small scripts containing the SQL replacements and one script which doesn't contain any replacement
- in this way at install time only the related script processing will be executed only for the scripts containing replacements

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”