You can test the embedded SQL database connectivity with the db2dsdriver.cfg file to ensure that the db2dsdriver.cfg file is valid, and that the embedded SQL component is installed correctly.
You must ensure that the IBM® data server client or IBM Data Server Driver Package software is installed and the db2dsdriver.cfg file is created in your environment with a required data source name (DSN) entry. You can use the contents of the db2dsdriver.cfg.sample file to create the db2dsdriver.cfg file.
To test the embedded SQL database connectivity with the db2dsdriver.cfg file:
$ db2cli validate -embedded -dsn sampledsn –connect -user username -passwd password
...
Connection Section :
------------------------------------------------------------------
Connecting to: sampledsn
Connect Status: success
End Connection Section
------------------------------------------------------------------
The validation completed.