Results 1 to 3 of 3
-
12-12-2008, 08:33 AM #1Member
- Join Date
- Jan 2008
- Posts
- 82
- Thanks
- 0
- Thanked 0 Times in 0 Posts
Command to check Filespace in a particular volume
Hi Team,
I am looking for a select command which can tell the name of the volume in which a particular file(filespace) is stored.
-
12-12-2008, 10:41 AM #2
The easiest way to do this is to query the contents table.
SELECT NODE_NAME, VOLUME_NAME, FILESPACE_NAME, FILE_NAME, FILE_SIZE FROM CONTENTS WHERE NODE_NAME='<NAME HERE>' AND FILESPACE_NAME='<NAME HERE>' and FILE_NAME='<NAME_HERE>'
You can play with this and use different filters, but this is going to take awhile to return data if you don't narrow it down as much as possible. You can narrow it down even more if you know which node you are querying, then you can run a SELECT VOLUMEUSAGE sub-query on it and get the volume names the client uses and filter the select even more.
SELECT NODE_NAME, VOLUME_NAME, FILESPACE_NAME, FILE_NAME, FILE_SIZE FROM CONTENTS WHERE VOLUME_NAME IN (SELECT VOLUME_NAME FROM VOLUMEUSAGE WHERE NODE_NAME='<NAME HERE>') and NODE_NAME='<NAME HERE>' AND FILESPACE_NAME='<NAME HERE>' and FILE_NAME='<NAME_HERE>'
Now if all you need is the volumes with specific filespaces stored on them you can easily get that from the VOLUMEUSAGE table. (Note: I always identify filespaces using the FSID, it's just a lot easier.)
SELECT * FROM VOLUMEUSAGE WHERE NODE_NAME='<NAME HERE>' AND FILESPACE_ID=<NUMBER HERE NO QUOTES>Last edited by chad_small; 12-12-2008 at 10:52 AM.
-
12-12-2008, 10:44 AM #3Member
- Join Date
- Sep 2008
- Posts
- 21
- Thanks
- 0
- Thanked 0 Times in 0 Posts
I found an example here: http://www.lascon.co.uk/d005104.htm#sqlfvol
But be warned, I ran it on a test server and it was slow to return.
Similar Threads
-
command to check particular folder or file that are not getting backup
By nikki in forum Administrative ClientReplies: 3Last Post: 11-18-2008, 08:22 AM -
volume expiration/check out/check in
By td3201 in forum Tape / Media LibraryReplies: 13Last Post: 06-01-2007, 10:22 AM -
Q Filespace command
By rpask in forum TSM Reporting & MonitoringReplies: 3Last Post: 01-14-2004, 07:25 PM -
Can't check volume in
By jmcallis in forum Backup / Archive DiscussionReplies: 1Last Post: 09-30-2003, 02:49 PM -
Need Select command to check on db2 data
By bcollins in forum TDP/Application Layer BackupReplies: 0Last Post: 05-29-2003, 08:41 AM


Reply With Quote
