This page allows you to configure SQL scripts that will be executed during installation. You might use this page if the application you are installing depends on certain database content and configuration. This page eliminates the need to require end users to configure databases manually.
Add a New Predefined SQL Connection
Use the
toolbar button, the “New
Predefined SQL Connection” context menu item or press the
Insert key while the “SQL Scripts”
panel is focused.
Add a New Custom SQL Connection
Use the
toolbar button, the “New
Custom SQL Connection” context menu item.
Add a New SQLite 3 Connection
Use the
toolbar button, the “New
SQLite 3 Connection” context menu item.
Add a New SQL Script
Use the toolbar button, the “New SQL Script”
context menu item or press the + key while the
“SQL Script” panel is focused.
Only the following formats are supported:
- ASCII
- UTF8 with BOM
- UTF16 (UCS-2 Little Endian and UCS-2 Big Endian)
SQL Transactions
To
create a new transaction use the
toolbar button or the “New Transaction” context menu
item.
By default an ODBC driver is in auto-commit mode; that means each statement is committed immediately after it is executed. Advanced Installer allows you to configure transaction isolation units. You can group one or several SQL script files in a single transaction unit, hence ensuring the query changes will be atomically committed. At the beginning of each transaction unit, the ODBC driver is put in manual commit mode, and at the end of the unit the changes are committed (if everything went OK), otherwise all changes from the isolation unit are rolled back. After exiting a transaction unit, the ODBC driver is put back in auto-commit mode, so that your following, non-isolated, batch files will execute/commit automatically.
For details about SQL transactions and Advanced Installer implementation
behaviour, please see this article.
Renaming an SQL Connection or SQL Script
Use the “Rename” context menu item or press the F2 key while a SQL connection or SQL script is selected.
Deleting an SQL Connections or Scripts
Use the
toolbar button, the “Delete”
context menu item or press the Delete key while a
SQL connection or SQL script is selected.
Impersonate installing user
Use the “Impersonate installing user” context menu item while "Database Server" is selected in the tree control. You can check this option if you want to run all SQL scripts as the user installing the application, not under the Local System account (this applies only to Trusted SQL Connections that use Windows integrated authentication).
You can set the order of execution for SQL connections and scripts
by drag & drop in the tree.
Topics
- Predefined SQL Connection
Configure a predefined SQL connection. - Custom SQL Connection
Configure a custom SQL connection. - SQLite 3 Connection
Configure an SQLite database connection. - SQL Script
Configure SQL scripts