Select Queries In TSM DB2 Database Return Nothing

thelok

Newcomer
Joined
Jan 26, 2012
Messages
1
Reaction score
0
Points
0
Hi,

When I run certain queries directly in DB2 I always get 0 results back. For example:

db2 connect to TSMDB1
db2 set schema TSMDB1
db2 "select volume_name from volumes"

VOLUME_NAME
---------------

0 record(s) selected.


However if I run the same query in TSM...

tsm: TSM_SERVER>select volume_name from volumes

VOLUME_NAME: /opt/app/ibm/product/tivoli/sp1/lanfree_backup/00000000.BFS

VOLUME_NAME: /opt/app/ibm/product/tivoli/ssp1/lanfree_archive/00000000.BFS

VOLUME_NAME: 961EEEL3


Even weirder is if I now run the same db2 query I actually get results:

db2 => select volume_name from volumes

VOLUME_NAME
---------------
/opt/app/ibm/product/tivoli/sp1/lanfree_backup/00000000.BFS
/opt/app/ibm/product/tivoli/ssp1/lanfree_archive/00000000.BFS
961EEEL3

3 record(s) selected.


It looks like the db2 database is caching the results from the TSM query? I know that "volumes" is a view in db2 but I don't know what else I'm missing to be able to extract the data from the db2 database without using TSM directly.

I am using TSM server 6.2.1.

Can anyone provide some advice? Thanks
 
Last edited:
You dont run TSM SQLs on the DB2 database, its a different structure. You just run them in TSM. Why do you want to run them directly on the DB2 ? but yes its very weird. You could use DB2 control centre GUI to get a look at the table/field layout etc and it has a nice query tab, I dont see why though.
 
When I run certain queries directly in DB2 I always get 0 results back.
<snip>
However if I run the same query in TSM...
<snip>
Even weirder is if I now run the same db2 query I actually get results:
<snip>

We've just noticed the same thing. This is really bad because our monitoring system uses DB2 to get information about TSM, which essentially means this is useless. We're using version 6.3.4.300, but we've seen this with a few older versions as well. Any idea how to solve this? Is there a magical setting to have TSM update the DB2 tables regularly?
 
IBM pointed me to this technote which basically says that the ODBC driver is not supported from version 6.1 onwards and that our only option is to issue the queries through dsmadmc and parse the output. :(
 
Back
Top