You are root user so you must have the "db2 environment" or log into the instance user (usually "db2inst1").
To log into the instance user :
su - db2inst1
To have the environment (supposed the instance owner was "db2inst1") :
. /home/db2inst1/sqllib/db2profile (n.b. blank after the initial dot)
As we see the error
SQL10007N, I think you must first start the database software itself(with "db2start" com
mand) and then, probably, create the TESTDB database (db2 "CREATE DATABASE TESTDB").
------------------------------
Adriano Mari
------------------------------
Original Message:
Sent: Tue December 24, 2019 03:24 PM
From: a b
Subject: Where is db2 command?
First of all I want to say that I'm relatively new to DB2, but I thought that 'db2' command is the basic one.
I logged into container and tried to execute it:
[root@90e1ff109b01 /]# db2 connect to testdb
bash: db2: command not found
I searched for it, found it and executed it without success:
[root@90e1ff109b01 /]# /opt/ibm/db2/V11.5/bin/db2 connect to testdb
SQL10007N Message "-1390" could not be retrieved. Reason code: "3".
When I type "db2" and press TAB only 2 commands are displayed - db2greg and db2ls
Don't I understand something or is the image not well prepared?
------------------------------
a b
------------------------------
#Db2