SQL Select for System State Occupancy

Andrew21210

ADSM.ORG Member
Joined
Apr 10, 2008
Messages
97
Reaction score
2
Points
0
PREDATAR Control23

I am trying to determine total occupancy of only the Windows System State backups for one of my TSM servers. Is there an SQL Select that can parse this without killing my server?
 
PREDATAR Control23

You don't need any SQL, you just need to do:
Code:
query occupancy {nodename}
 
PREDATAR Control23

Oh, you would not get the total though.

You could try:
Code:
select sum(physical_mb) as PHYSICAL, sum(logical_mb) as LOGICAL, sum(reporting_MB) as REPORTING from occupancy where node_name='NODENAME' and filespace_name='HOSTNAME\SystemState\NULL\System State\SystemState'

Replace NODENAME with the node name
Replace HOSTNAME with the machine name or hostname
 
PREDATAR Control23

Oh, you would not get the total though.

You could try:
Code:
select sum(physical_mb) as PHYSICAL, sum(logical_mb) as LOGICAL, sum(reporting_MB) as REPORTING from occupancy where node_name='NODENAME' and filespace_name='HOSTNAME\SystemState\NULL\System State\SystemState'

Replace NODENAME with the node name
Replace HOSTNAME with the machine name or hostname


That's sort of what I'm looking for but I don't want to do it one node at a time. I was hoping to be able to get the info from all nodes and a grand total.
 
PREDATAR Control23

Try this to get a listing for all nodes:

Code:
select node_name,sum(physical_mb) as PHYSICAL, sum(logical_mb) as LOGICAL, sum(reporting_MB) as REPORTING from occupancy where filespace_name like '%\SystemState\NULL\System State\SystemState' GROUP BY node_name

Here is the select statement for the grand total:

Code:
select sum(physical_mb) as PHYSICAL, sum(logical_mb) as LOGICAL, sum(reporting_MB) as REPORTING from occupancy where filespace_name like '%\SystemState\NULL\System State\SystemState'
 
PREDATAR Control23

Try this to get a listing for all nodes:

Code:
select node_name,sum(physical_mb) as PHYSICAL, sum(logical_mb) as LOGICAL, sum(reporting_MB) as REPORTING from occupancy where filespace_name like '%\SystemState\NULL\System State\SystemState' GROUP BY node_name

Here is the select statement for the grand total:

Code:
select sum(physical_mb) as PHYSICAL, sum(logical_mb) as LOGICAL, sum(reporting_MB) as REPORTING from occupancy where filespace_name like '%\SystemState\NULL\System State\SystemState'


That's what I wanted right there. Thank you very much.
 
Top