Error received when running a select statement for a Tivoli Storage Manager table through the DB2 CLI - Command Line Interface.
Errors are reported when running a select statement in the DB2 command window similar to the following:
SQL1024N A database connection does not exist. SQLSTATE=08003
SQL1013N The database alias name or database name "TSMDB1" could not be found. SQLSTATE=42705
Resolving The Problem
To correctly run a select statement in the DB2 command window for a Tivoli Storage Manager server table, be sure to perform the following steps.
The following example is based on the default "Server1" instance name and default database name of "TSMDB1". Replace the Instance name or the database name if yours are different than the defaults:
Open a DB2 Command Window. This should automatically resolve to the following path:
Run the following commands:
>db2 connect to tsmdb1
>db2 set schema tsmdb1 (this sets the schema to tsmdb1 so that the table names do not need to be prefixed with the schema name. NOTE: This step can be skipped if the schema name is prefixed to the table name as shown in example #2 below)
>db2 select * from activity_log (when the schema has been set)
>db2 select * from tsmdb1.activity_log (when the schema has not been set)
TSM ADSM ITSM IBM Spectrum Protect
17 June 2018