DBAlias CLI/ODBC configuration keyword
Specifies the database alias for a data source name (DSN) that is greater than 8 characters.
- db2cli.ini keyword syntax:
- DBAlias = dbalias
- Default setting:
- Use the Db2® database alias as the ODBC Data Source Name.
- Usage notes:
The DSN is the name, enclosed in square brackets, that
denotes the section header in the
db2cli.ini
file.
Typically, this section header is the database alias name that has
a maximum length of 8 bytes. If you want to use a longer, more meaningful
name, you can place the longer name in the section header, and set
this keyword value to the database alias that is used on the CATALOGcommand. Here is an example:
; The much longer name maps to an 8 single byte character dbalias
[MyMeaningfulName]
DBAlias=DB2DBT10
You can specify [MyMeaningfulName]
as
the name of the data source on connect while the actual database alias
is DB2DBT10
.
If you specify a value in the DBAlias keyword with the database keyword in the db2cli.ini file, applications that try to connect to the database or DSN that matches this value do not receive an error.