Tips for Using the SQLBrowse Dialog

Here’s a great tip for using the SQLBrowse Dialog:

When you add connections in the SQL Scripts view in InstallShield, your installation displays the SQLLogin dialog at run-time. When end users click the Browse button next to the target server field on the dialog, the SQLBrowse dialog opens; this dialog provides a list of available servers on local and network machines. Sometimes the SQLBrowse dialog provides a shorter list of servers than other database client tools such as Microsoft SQL Server Management Studio do. This is because installations that are created in InstallShield create the list using the browse method of the ODBC driver manager, and the result relies on the performance and discoverability of an ODBC driver. Installations that are created in InstallShield use the SQL Server ODBC driver by default to create a list of Microsoft SQL Server instances. If you switch to use a newer release of the driver or a different technology such as the SQL Native Client ODBC driver by following the steps below, the SQLBrowse dialog may provide more available servers.

1.  Open your InstallShield installation project.
2.  In the View List under Additional Tools, open the Direct Editor.
3.  In the Tables explorer, click the ISSQLDBMetaData table.
4.  Find the MSSQLServer record.
5.  The default value of the DsnODBCName field is “{SQL Server}”. Change it to the following value:
    “{SQL Native Client}”
6.  Rebuild your installation.

The SQL Server Native Client ODBC driver may not be installed on target systems. Therefore, you may want to use the Redistributables view to add the InstallShield prerequisite for the SQL Server Native Client to your installation in order to ensure that the SQLBrowse dialog works properly.

Note that in some cases, the SQLBrowse dialog  may not list all of the available servers. Only servers that are on the same network are listed. The list may even be different on consecutive calls because of timeouts and high network traffic. Another factor that may determine whether a server is listed is the network infrastructure itself, since broadcast packets do not usually traverse routers.

Microsoft SQL Server uses the SQL Server Browser service to enumerate instances of the database engine that are installed on the computer. The ODBC driver manager requests the information by sending a UDP message to the SQL Server Browser service through port 1434. If the SQL Server Browser service is not running or UDP port 1434 is blocked by a firewall, instances are not listed in the SQLBrowse dialog.

In addition, some instances may be marked as hidden. Such instances are not listed in the SQLBrowse dialog. For example, for Microsoft SQL Server 2005 and later, the HideInstance flag might be set, or the HideServer option (the SQL Server 2000 style of hiding instances) may be set through the server network utility.

As always, if you have comments or suggestions – please let us know!

2 comments on “Tips for Using the SQLBrowse Dialog

  1. Sriram on

    Where the default sql server host value is stored? In the Registry? When the user changes the SQL Server host name, ONSQLLogin ignores it and uses the Default value while establishing connection. Any suggestions to overwrite this with the User input values, please?

  2. Flexera on

    It sounds like you may be working with an InstallScript MSI project. If so, the name of the target server instance is stored in IS_SQLSERVER_SERVER. This property is the default value for the Target Server Property Name setting on the Advanced tab for the selected SQL connection. Did you make changes to the OnSQLLogin function that may be causing the problem? To start troubleshooting the problem, see if the problem is reproducible when you create a new InstallScript MSI project from scratch, and just add a connection in the SQL Scripts view without making any changes to your InstallScript code. For additional help, consider contacting Support. (


Leave a Reply

Your email address will not be published.