StarQuest Technical Documents

How to Automate StarSQL Logins

Last Update: 26 June 2008
Product: StarSQL
Version: 5.x
Article ID: SQV00SQ037

Abstract

If you would like to embed your password so that you do not have to enter it every time you use StarSQL, you may automate the process. 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.
    • If it is a System data source, the registry will be under: HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI.
    • If it is a User data source, the registry will be under: HKEY_CURRENT_USER\SOFTWARE\ODBC\ODBC.INI.
  3. Add a new string value of "PWD" and set it equal to your DB2 password. (From the Edit Menu, select "New | String Value". Type in the "PWD" and double-click on it to edit the string value).

For a File data source:

  1. Find 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. 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 information in technical documents may be gathered from various sources, including IBM, Microsoft, and other organizations.