Validating the db2dsdriver.cfg file
Use the db2cli command to locate and validate the db2dsdriver.cfg file.
Before you begin
Ensure that the db2dsdriver.cfg file is created in your environment. You can use the contents of the db2dsdriver.cfg.sample file to create the db2dsdriver.cfg file.
About this task
Procedure
To verify the presence of the db2dsdriver.cfg file
and validate the DSN entries in the db2dsdriver.cfg file,
issue the db2cli validate -dsn <dsn_name> command
or the db2cli validate -all command. The <dsn_name> can
be any DSN. If you specify the -all option for the db2cli
validate command, every database and DSN entries present
in the db2dsdriver.cfg file is validated.
Results
The db2dsdriver.cfg file location is displayed in the command output after the db2dsdriver.cfg Pathtext.
All specified IBM® data server driver configuration keywords and associated values for the DSN are displayed under each DSN entry.
Example
$ db2cli validate -dsn sampledsn
IBM DATABASE 2 Interactive CLI Sample Program
(C) COPYRIGHT International Business Machines Corp. 1993,1996
All Rights Reserved
Licensed Materials - Property of IBM
US Government Users Restricted Rights - Use, duplication or
disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
---------------------------------------------------------------------------
[ CLI Driver Version : 10.0X.XXXX ]
[ Informational Tokens: "Db2 v10.X.X.X","sXXXXXX","IPXXXXX","Fixpack X" ]
[ CLI Driver Type : IBM Data Server Driver Package ]
[ db2diag.log Path : /home/usr1/sqllib/db2dump/db2diag.log ]
---------------------------------------------------------------------------
db2dsdriver.cfg Schema Validation :
Success: The schema validation operation completed successfully.
The configuration file /home/usr1/sqllib/cfg/db2dsdriver.cfg is valid
db2cli.ini Validation :
Note: The validation operation utility could not find the
configuration file named db2cli.ini.
The file is searched at /home/usr1u/sqllib/cfg/db2cli.ini
db2dsdriver.cfg Validation :
---------------------------------------------------------------------------
[ DB2DSDRIVER_CFG_PATH env var : unset ]
[ db2dsdriver.cfg Path : /home/usr1/sqllib/cfg/db2dsdriver.cfg ]
---------------------------------------------------------------------------
[ List of keywords used for DSN : sampledsn ]
Keywords Valid For Value
-------------------------------------------------------
DATABASE CLI,.NET,ESQL sample
HOSTNAME CLI,.NET,ESQL samplehost.domain.com
PORT CLI,.NET,ESQL 19766
---------------------------------------------------------------------------
The validation completed.
What to do next
Test the database connectivity.