Database Installation

For all your non-technical questions.
GraemeAU
Posts: 8
Joined: Mon Nov 14, 2005 10:23 pm

Database Installation

Postby GraemeAU » Mon Nov 14, 2005 10:28 pm

I am trying to create a complete installer package for a .NET website including MS SQL database.
The issue I have is that I need to allow the installer to type in the servername, database name as well as username and password rather than preset in via the MSSQL plugin. I don't see how I can do this with the MSSQL plug in and thought that creating a new dialog page might be the right way to go but surely I'm not the only one wanting to do this. Has anyone solved this problem already or can provide me with some guidance here?

Thanks
Graeme

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Tue Nov 15, 2005 8:17 am

That is definitely the right thing to do here. I'd refer you to this article first to find out how easy it is to build custom dialogs that capture this sort of information from users at install time:

http://www.installaware.com/installaware_extreme.pdf

Then, you can use variables in the SQL plug-in, so you can actually pass the captured information to the server instance(s).

Hope that helps!

GraemeAU
Posts: 8
Joined: Mon Nov 14, 2005 10:23 pm

Database installation

Postby GraemeAU » Wed Nov 16, 2005 1:36 am

Thanks for the help. I have now been able to create the custom dialog and create a simple database to test that it works OK. I am now having issues when attempting to create the 'real' database which has over 2000 objects in it as well as additional data that I have scripted as well. The issue is that Installaware seems to hang when it hits the line in the code where it creates the databse and consumes 100% of CPU time. Is this normal and how can I debug this?

Thanks
Graeme

sinan
Site Admin
Posts: 1020
Joined: Sat Nov 13, 2004 8:12 am
Contact:

Postby sinan » Wed Nov 16, 2005 9:18 am

Glad to hear you were able to create the dialog box and hook it to your script.

As for your other question, I'm glad you raised that here. If you have long scripts, and you paste the script into the command box directly, InstallAware will consume an inordinate amount of CPU and appear to hang. The solution is to not include your script as-is, but instead do the following:

1) Add your script as a Support File
2) Load the script at runtime using this procedure, as copied from the help file:

Code: Select all

If you wish to load your SQL Script from a file at runtime, use the special #FILESCRIPT# value to indicate this. This option is especially useful for very long scripts that contain tens of thousands of lines. If your script has the value #FILESCRIPT# at the first position in the first line of the SQL Script field, the script will be read from the file following the value. For instance, if you enter the value #FILESCRIPT#$SUPPORTDIR$\\sqlscript.sql into the SQL Script field, the plug-in will load the file sqlscript.sql from the installer's support files (creatives) folder at run-time, and execute the script contained within that file.


Let me know if that helps! Remember to have an empty script box in the SQL plug-in window, except for the one liner mentioned above.


Return to “Non-Technical”

Who is online

Users browsing this forum: No registered users and 35 guests