Logging SQL Output - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

tgillitzer
Posts: 36
Joined: Tue Dec 13, 2011 12:12 am

Logging SQL Output

Any way this can be done?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Logging SQL Output

I'm afraid Advanced Installer has not support for this. However, from what I know the log should be created by default by the server, which already exists on the user's machine when it installs the package.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tgillitzer
Posts: 36
Joined: Tue Dec 13, 2011 12:12 am

Re: Logging SQL Output

the log should be created by default by the server
What do you mean by this? Some log created by SQL Server?

Is there any way to get something added? Logging to the MSI install file would be fine or a separate file would be fine as well. Would be a really beneficial feature for troubleshooting SQL issues run into by the installer.

Thanks
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Logging SQL Output

Some log created by SQL Server?
Exactly, but Advanced Installer has not access to it and also no support to add its own information in it.
Logging to the MSI install file would be fine or a separate file would be fine as well.
You can use custom actions to write in the verbose log of the package, but I don't see how would this be useful as you would need to retrieve somehow the output from the SQL server that executes your script.

For testing the SQL scripts included in a package we recommend a first series of tests outside the package, directly using the SQL tools you have. Only after the scripts were tested and you are sure they work you should included them in the package. This is a division of the development package that will allow you to easily debug problem from the scripts and the package.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jjones
Posts: 68
Joined: Wed Jun 29, 2011 3:30 pm

Re: Logging SQL Output

I recently ran into the same issue. We install SQL Express 2008 R2 using a .ini file with an unattended install. This is great because the user is not required to enter anything in but not so great because an unattended install does not halt on error and your AdvancedInstaller setup has no idea this occurred.

What I did was write CustomActions in C# (using VS2010 and WiX) that:

1. Look for the newest install attempt in the \Microsoft SQL Server\100\Bootstrap Setup\Logs\ directory
2. Once I find the directory, look for the Summary_<machine name>.txt file and parse it to look for the ExitCode
3. If the ExitCode is not 0, then that means there was an error during installation so I grab some more values related to the error
4. Also look for the details.txt file and parse it for any registry keys where the Access was Denied.

Hope this helps.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: Logging SQL Output

We appreciate your contribution, I'm sure it will make someone's life easier :)

Return to “Common Problems”