A query for Diskpool of a specific file

Fattire

ADSM.ORG Member
Joined
Jun 5, 2006
Messages
210
Reaction score
0
Points
0
Is there a way to query the diskpool to see if a particular file is still located on it or basically to see just where the file is located, diskpool, tapepool and/or copypool.
Running TSM 5.2.2 on Windows 2003 server
thanks.

Fattire
 
You can use the

select * from contents where volume_name='<DISKPOOL VOLUME>' and node_name='<node_name>' and file_name like '<file_name>'

This should be more precise than a Q CONTENT but if you cant get the select to return anything try the Q CONTENT, dump it to a file, then use a text search.
 
...and go on vacation for a week. Be careful using CONTENTS table. I've had to restart the server a couple times after making the mistake of querying that monster table because it wasn't going to ever finish and was keeping other commands from running.
 
Depends on the utilization of the volume and how well you narrow the search. It can take awhile that is why a dump of the Q CONTENTS might be easier and less of an impact on the server. If you do a select without the volume name and node name then yeah it can hose the system.
 
Am I setting up the select statement properly?
ANR2017I Administrator ADMIN issued command: select * from
contents where volume_name='I:\TSMDATA\SERVER\BACKU-PPOOL3.DSM'
and node_name='RH60' and file_name like
'MAT1033_0M1_W08_Mar31_2256.zip'
ANR2034E SELECT: No match found using this criteria.


Fattire
 
'like's need wildcards. Change it to:

... file_name like '%MAT1033_0M1_W08_Mar31_2256.zip'
 
Back
Top