If you are already connected to a database, what does running the following statement do?
Db2 CONNECT -
If you are already connected to a database, what does running the following statement do?
Db2 CONNECT -
Running the statement 'Db2 CONNECT' without specifying a database name or alias when you are already connected to a database will return an error. The DB2 command requires that if you are connecting or reconnecting to a database, you must provide the database name or alias. Without this information, the command cannot proceed and will result in an error.
Answer is B. Question specifies "If you are already connected to a database" .
Answer is B if you are connected then [db2inst2@vbox1 ~]$ db2 connect Database Connection Information Database server = DB2/LINUXX8664 11.5.5.0 SQL authorization ID = XXXXXXX Local database alias = XXXXXXX
Answer should be D: db2 CONNECT SQL1024N A database connection does not exist. SQLSTATE=08003