Alex99
Posts: 42
Joined: Thu Feb 14, 2013 9:28 am

Change SQL user in case of error

Hello guys,
In developing my installer via advanced installer I faced the problem.
Description -
In install process I have sql scripts, and for connection to DB I'm using Windows Integrated Authentication. It's OK when windows user has all rights to do all operations.
But what about such case - Windows User has rights to connect to DB, so TestConnection is successful, but he hasn't rights to do some operations with DB.
In this scenario error can occurs. So I would like to do the following - connect as Windows User, but if error - show some dialog with proposal to user enter other sql account to do sql operations.
And the question is - Is it possible to do this through advanced installer, and if yes - how can I do this?

Thanks in advance
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Change SQL user in case of error

Hello,

Unfortunately, we don't have predefined support for this. We'll consider your suggestion for adding this feature in a future version of Advanced Installer. Thank you for your suggestion.

However, in order to achieve what you want you can create your own custom action. You can add the custom action after "Test SQL Connection" in the installation UI. Also, you can take a look on "Database level permissions for SQL Server 2005 and 2008" article which could be useful for you.

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

Return to “Building Installers”