Configuring ODBC Data Sources


Overview

Tasks

Included with

Tivoli Service Desk

Overview

ODBC

ODBC (Open Database Connectivity) is a Microsoft interface for database connectivity. It provides a common interface to a variety of DBMSs. This common interface enables programmers to write a single application to be used with any DBMS system.

ODBC Administrator

The ODBC Administrator is a tool that can be used to configure the ODBC data source to provide connectivity to the database. The 32-bit ODBC Administrator is required for Tivoli Service Desk.

ODBC support in TDT

The standard installation of TDT includes direct database interfaces for all supported database platforms. These direct database interfaces bypass ODBC and contact the database directly. The result is a faster and more stable database connection.

To maintain backward compatibility, ODBC connectivity is still possible. However, ODBC drivers are not included in TDT.

API interaction between TDT and ODBC

The interaction of TDT and ODBC consists of Core, Level 1, and Level 2 Application Programming Interface (API) function calls. Core API function calls provide basic functionality. Level 1 API function calls provide increased functionality. Level 2 API function calls provide the greatest level of functionality.

Most interaction is done on the Core level because of the consistent support of Core functionality among the ODBC drivers. The closer you get to Level 2, the fewer API calls are consistently supported.

The API calls for X/Open are almost exactly the same as the core API calls for ODBC. Therefore, the interaction of TDT and X/Open is very similar to the interaction with ODBC.

Note: X\Open is a standards organization normally associated with UNIX.

When to add the ODBC data source name

If you want to use ODBC, then you must add the ODBC data source name before you create the Tivoli Service Desk database tables with TSDBuild or connect to existing Tivoli product tables.

Be sure to make a note of the name you choose. When you configure the data source name, the name that you specify in the ODBC Administrator must match the ODBC DSN that you specify in the SQL Configuration Editor dialog box. For tips on naming data sources, see Data Source Name Restrictions.

Note: You may use the ODBC Administrator Tool to modify the configuration of any data source name.

How the ODBC data source name is used

The data source name you supply through the ODBC Administrator is used as the ODBC DSN (data source name) parameter in the sai_sql.cfg file to connect to the database.

ODBC common error messages

The following are common error messages and solutions related to ODBC drivers:
  • Error message "Data Source Not Specified" is generated while connecting to the database.
    Solution: Configure the data source and set the ODBC DSN to the ODBC data source name.
    Note: You must add the ODBC data source name with the ODBC Administrator before the ODBC driver can use the data source name.
  • Error message "Data Source Name Not Found" is generated while connecting to the database.
    Solution 1: Update the ODBC DSN in the SQL Configuration Editor to match an ODBC data source in the ODBC Administrator.
    Solution 2: Update the ODBC data source in the ODBC Administrator to match the ODBC DSN in the SQL Configuration Editor.
  • General Protection Faults occur while connecting to the database due to old ODBC support files
    Solution: Update files.

If you have previously installed ODBC files

When establishing any ODBC data source, it is possible that some of the ODBC files may have been previously installed by another application. If this happens, you must validate that the existing files are of the required version or newer. The ODBC files should be located in the Windows/System32 directory.

These are the versions that are required for TDT:

  • odbc.dll 2.00.1510 or higher
  • odbcinst.dll 2.00.1510 or higher

Note: For OS/2, the ODBC support programs used are not normally supplied by other applications, so this installation issue does not apply.


Tasks

ODBC configuration process

If you need help during the configuration process, contact Tivoli Support. In addition, if you encounter database errors, refer to your DBMS documentation.


To configure for ODBC, complete these procedures:

Adding the ODBC data source

The Setup programs for most database products automatically create an ODBC data source for you. If your data source was not automatically created, you can manually add an ODBC data source through the ODBC Administrator utility.

In Windows, this utility is located in the Control Panel if you installed TDT stand-alone or on a file server. In OS/2, an ODBCADM utility can be acquired only through a third party vendor. This utility, or its equivalent, is sometimes provided by the database vendor.

Testing ODBC connectivity

Before attempting to connect through TDT, it is recommended that you check connectivity outside of TDT with a third-party utility, such as MS Query.

Note: This isolates ODBC and database connectivity problems from TDT connectivity and makes it easier to solve them.

Configuring an ODBC data source

Note: Under UNIX, in order to configure an ODBC driver, you must edit the .odbc.ini file. Please refer to your ODBC installation guide for instructions.

To configure an ODBC data source:

  1. In the SQL Configuration Editor dialog box, verify the path for the sai_sql.cfg file in the File box and choose Add.
  2. In the Driver Selection dialog box, select ODBC database driver and choose OK.
  3. In the Source Setup dialog box, in the Source box, type the name of the data source.
  4. In the Qualifier box, type the name of the table qualifier.
    Note: A table qualifier is usually the table creator or owner used to access the data. This should match the qualifier specified when creating your tables in TSDBuild, such as dbo or EXAV. This entry is stored in sai_sql.cfg as "QUAL=xxx".
  5. In the Driver box, type the name of the driver you use to connect to the database.
    Note: This is the name of the driver you use to connect to the database. When you are configuring an ODBC data source, the default is ODBC. You may specify the complete path; the preferred way is to specify just the module name. This entry is stored in sai_sql.cfg as "DRV=xxx". For more information, see TSD Database Drivers.
  6. In the ODBC DSN box, type the ODBC Data Source Name (DSN).
    Note: This entry only applies to ODBC drivers. Do not confuse ODBC data sources with TDT data sources; although similar in concept, they are different, and both are required to be configured when using ODBC drivers from TDT. The ODBC data source does not have to have the same name as the TDT data source. This entry is stored in sai_sql.cfg as "DSN=xxx".
  7. From the DBMS list, select the name of the DBMS application.
    Note: Normally, TDT can infer the DBMS from the driver; however, for ODBC sources, you must inform TDT what the DBMS is. For a complete list of DBMS entries, refer to your TDT manuals. This entry is stored in sai_sql.cfg as "DBMS=xxx".
  8. Under Login, in the UID box, type the user name to be used when logging into the specified database. This is optional.
    Note: Be sure to use the correct case.
  9. Under Login, in the PWD box, type the user password to be used when logging into the specified database. This is optional.
    Note: The password is not displayed on the screen. Use the correct case.
  10. Do one of the following,
    • Select the Default check box to make this data source the default data source. If no source name is given when connecting, the default data source is used. Any previous default source is no longer the default, because you can have only one default source specified at a time.
    • Clear the Default check box to make this a non-default data source.
    • For more information, see Designating a Default Data Source

  11. After you complete the boxes to configure the data source, in the Source Setup dialog box, choose ODBC Setup.
  12. In the ODBC Data Source Administrator dialog box, choose Add.
  13. In the Create New Data Source dialog box, select the driver you want to use and choose Finish.
  14. In the Setup dialog box for the driver you selected, specify the information about the ODBC driver and choose OK.
    Note: Verify that the ODBC data source in the ODBC Administrator matches the ODBC DSN in the SQL Configuration Editor exactly. The information required in this dialog box varies according to the drive you select.
  15. Close any open SQL Configuration Editor dialog boxes.