StarQuest Technical Documents

How to Automate StarSQL for Windows Logins

Last Update: 19 July 2010
Product: StarSQL
Version: 5.x
Article ID: SQV00SQ037

Abstract

If you embed your password in the StarSQL DSN configuration, you will not have to enter it every time you connect to the database. With certain third party applications, such as Microsoft SQL Server 2008, it may be necessary to configure the data source with the user credentials.

This document shows you how to automate StarSQL logins by including the DB2 userid and password for the data source in your Windows registry or your file DSN.

Warning: Passwords are not encrypted in either the Windows registry or the ODBC.INI file.

Solution

For a System or User data source:

  1. From the Start button, select Run and start the registry editor by typing "regedit" in the run command field.
  2. Locate your StarSQL data source under the registry key.
32-bit Windows
  • System DSNs: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI
  • User DSNs: HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI
64-bit Windows
  • System DSNs: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\ODBC\ODBC.INI
  • User DSNs: HKEY_CURRENT_USER\Software\ODBC\ODBC.INI\ODBC Data Source
  1. From the Edit Menu, select "New" and then "String Value". Type "PWD" as the name and double-click on the new entry to edit the value. Type in your password and click OK to save.

For a File data source:

  1. Locate your file data source. It will be in the directory specified in the "Look in" field in the ODBC Data Source Administrator.
  2. With a text editor, such as Notepad, add a new line of "PWD" and set it equal to your DB2 password in all upper case.
  3. Save the file, making sure that the file has an extension of .DSN.

DISCLAIMER

The information in technical documents comes without any warranty or applicability for a specific purpose. The author(s) or distributor(s) will not accept responsibility for any damage incurred directly or indirectly through use of the information contained in these documents. The instructions may need to be modified to be appropriate for the hardware and software that has been installed and configured within a particular organization.  The information in technical documents should be considered only as an example and may include information from various sources, including IBM, Microsoft, and other organizations.