IBM Books

DB2 Connect User's Guide


Additional Hints and Tips

The CLISCHEMA keyword has to be added to the db2cli.ini file within a section for the DSN name or the common section. A section is text in square brackets. The COMMON section is indicated by the text "COMMON" in square brackets. Note that keywords and section names are not case-sensitive.

At connect, each possible keyword is checked for first under the DSN name, then if not found, under the COMMON section. This allows for both DSN specific keywords and global (client) keywords.

Also, the DBALIAS keyword can be used to create different DSN (ODBC Data Sources) that map to the same database. (A DSN name can be up to 255 characters in length, and it is mapped to the 8 char dbname).

In the example below, any time a user connects to TESTDB or any DSN that is not listed in the file, they will use clischema=ODBCCAT. If they connect to TestDBcar2, they will use clischema=odbccat2, but still connect to the testdb database.

Example db2cli.ini file:

   [TESTDB]
 
   [COMMON]
   clischema=odbccat
 
   [TestDBcat1]
   DBALIAS=testdb
   clischema=odbccat1
 
   [TestDBcat2]
   DBALIAS=testdb
   clischema=odbccat2


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]