shell - Checking availability of DB2 database via db2cli -



shell - Checking availability of DB2 database via db2cli -

i seek check availability of db2 instance via db2cli-utility, follows

db2cli execsql -user user -passwd passwd -connstring database:host:port

(with actual values uppercased text). expect connect host:port, using credentials user , passwd, , switch database database.

as result get

sqlerror: rc = 0 (sql_success) sqlgetdiagrec: sqlstate : 08001 fnativeerror : -1024 szerrormsg : [ibm][cli driver] sql1024n database connection not exist. sqlstate=08003 cberrormsg : 82

but: these values work, on same machine, if utilize them credentials in applications connect db2, expect connection given command.

my question is: using db2cli wrong?

you can seek validate connect below(it create sure if connection successful)

db2cli validate -dsn sample -connect

db2cli.ini :

[sample]

hostname=host

pwd=password

port=portnumber

protocol=tcpip

database=dbname

uid=username

shell db2

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -