Use the db2cli command to locate and validate the db2dsdriver.cfg file.
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.
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.
$ 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.
Test the database connectivity.