Configure Oracle Database Connection

ImportantThe following article uses options that are available starting with the Enterprise edition and project type.

This tutorial uses the predefined SQLConnectionDlg dialog and all the settings will be collected during install time and then passed to the installer. In order to do this public properties will be used.

1. Create project

Launch Advanced Installer, select Enterprise and press the [ Create Project ] button.

Start Page

2. Add SQL connection dialog

Dialogs Page Go to Dialogs Page and select FolderDlg dialog. Select “Add Dialog” toolbar option or “Add Dialog...” context menu option.

The Add Dialog dialog will appear. Select SQLConnectionDlg from the list and press "OK". The new dialog will be added in the chain after the FolderDlg dialog.

In the SQLConnectionDlg dialog select the "ODBC Resource", "Port", "Database" static text controls and from the Properties pane located in the right side, set the Visible attribute to False.

Repeat the same procedure for the edit box controls associated with "ODBC Resource", "Port", "Database".

3. Create the SQL connection

Navigate to SQL Databases Page, Database server and select “New SQL Connection -> Predefined SQL Connection” option from the toolbar or context menu.

NoteThis will change the installation type to "Per-machine only".

Rename the connection to something meaningful. Using the "SQL Connection" properties pane from the right side, write the following settings:

Parameter nameValue
Connection TypeOracle SQL Server
Connection ModeODBC Driver
ODBC DriverMicrosoft ODBC for Oracle
Server[SERVER_PROP]
Portnot required
Username[USERNAME_PROP]
Use a property to set password[PASSWORD_PROP]
Databasenot required

Since we are going to use this connection with Oracle Database Server we will not use a property to set the "ODBC Driver" parameter and we will hard-code it instead.

Oracle Database Server settings

Add all the necessary resources like files and folders to the project, build and run it.

4. Test the installation package

It is wise to test if the package is correctly connecting to your SQL Server before giving it to your customers.

Note The Test SQL Connection How To article shows the steps needed to take in order to test your SQL connection.

Once the installation package is running navigate to the "SQL Database" dialog and enter the following information:

  • Server
  • The name of the SQL Server. The supported format is ServerName:PORT/SID. If the server is hosted on the local machine use localhost:1521/ORCL. By default, Oracle Database Server comes with the Listener configured for port 1521 and with the instance ORCL.
  • Username
  • The username under which the connection will be initiated. This user must have privileges to connect to the SQL Server. By default, for an Oracle database all the users are disabled except the system users. In this tutorial we will use the system user.
  • Password
  • The password associated with the user. This password is set during the SQL Server installation.

Oracle Database connection settings.

5. See also

PostgreSQL Server Connection