SQL Script Errors Not Reported in MSI Log - 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!

CMCollins
Posts: 2
Joined: Wed Oct 08, 2008 7:56 pm

SQL Script Errors Not Reported in MSI Log

I noticed that errors that occur from running a SQL script are not reported in the MSI log, even with the option "Connections and all sql scripts verbose", even with this option checked.

I tested a sample script and intentionally left a bug in the sql script so it reported a level 16 error. The MSI log did not show this at all.

Is there any way at all to obtain the verbose output from running the sql script? I need to capture everything after running the SQL script, all output. I'm looking for something similar to output from executing the sqlcmd.exe command.

Please let me know,
Thanks
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: SQL Script Errors Not Reported in MSI Log

Hi,

Please note that the SQL Scripts feature is specific to Advanced Installer and it has no support from Windows Installer. Also, the errors received during the install process are shown by the ODBC driver or SQL Server, and not by the actual installation. Therefore, these errors will not be written in the log created by Windows Installer.
Is there any way at all to obtain the verbose output from running the sql script?
This can be done by using sqlcmd.exe as a custom action to create the connection and run the scripts. This way, you can obtain the output file you mentioned.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
CMCollins
Posts: 2
Joined: Wed Oct 08, 2008 7:56 pm

Re: SQL Script Errors Not Reported in MSI Log

Hi Cosmin,

Thanks for your reply. To run the sqlcmd.exe, do I have to install it or can I just install it and include it with my application?

Thanks
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: SQL Script Errors Not Reported in MSI Log

Hi,

Please note that "sqlcmd.exe" is installed by SQL Server, therefore it needs to be present on the target machine when the MSI package runs. If there is a possibility that the target machine will not have SQL Server installed, you can add it as a Prerequisite (it a predefined prerequisite, so you can add it with the "Add" button).

Note that "sqlcmd.exe" should be in the PATH environment variable, therefore it can be launched directly ("Launch file or open URL" custom action).

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”