Documente Academic
Documente Profesional
Documente Cultură
(Some of these can run very long, and can be resource intensive. Use at your own risk.)
(The description follows the select statement.)
select distinct node_name,volume_name,stgpool_name from volumeusage where
node_name='xxxxx'
* To find what tapes are used by a node (needed for restore)
select node_name, sum(logical_mb) as Data_In_MB, sum(num_files) as Num_of_files
from occupancy group by node_name order by node_name
* To identify # and space of data files on all node
select node_name,sum(logical_mb) as Logical_MB,sum(physical_mb) as Physical_MB,
sum(num_files) as Num_of_files from occupancy where node_name='xxxxxxxxxxxxxx'
group by node_name
* To identify # and space of data files on a single node
select node_name,count(ll_name) as Num_Active_files from backups where
node_name='xxxxxxxxxxxxx' and STATE='ACTIVE_VERSION' group by node_name
* To identify # of ACTIVE data files on a node (for restore) (This query can take a very
long time.)
select client_name,input_vol_access,output_vol_access from sessions where
(input_vol_access is not NULL) or (output_vol_access is not NULL)
* To identify clients reading from or writing to tape.
select
domain_name,tcp_name,nodes.node_name,filespace_name,stgpool_name,logical_mb
from nodes,occupancy where nodes.node_name=occupancy.node_name
* Billing Information (Occupancy by node)
all:select server_name,count(volume_name) as "# of Pending Vols" from volumes,status
where status like '%%PEND%%' group by server_name
* To identify # of volumes in "pending" status per server
all:select count(volume_name) as "# of vols" from volumes where status='PENDING' and
pending_date between '2009-10-26 00:00:00.000000' and '2009-10-27 00:00:00.000000'
* To identify total # of tapes in pending status for date (forcast tapes going scratch)
all:select stgpool_name,count(volume_name) as "# of vols" from volumes where
status='PENDING' and stgpool_name='OFFSITE' and pending_date between '2010-01-27
00:00:00.000000' and '2010-01-28 00:00:00.000000' group by stgpool_name
* To identify # of tapes in pending status for date in the offsite pool (forcast tapes returning
from Iron Mountain)
select node_name from nodes where substr(char(reg_time), 1, 10) >='2009-12-01' and
node_name not like '%%_LT%%'and node_name not like '%%EXP20%%'
* To identify nodes registered since date
all:select server_name,node_name,reg_time from nodes,status where reg_time>'2009-0815 00:00:00.000000'
* To identify nodes registered since date
select node_name,sum(capacity) as MB_Capacity,sum(capacity*(pct_util/100)) as
MB_Used_Space from filespaces group by node_name order by MB_Used_Space
* To identify FS space and used capacity on all clients (not TSM occupancy)
select node_name,sum(capacity) as MB_Capacity,sum(capacity*(pct_util/100)) as
MB_Used_Space from filespaces where node_name='xxxxxxxxxxx' group by node_name
* To identify FS space and used capacity on the client for a specific node (not TSM
occupancy)
all:select server_name,volume_name,type,date_time from volhistory,status where
volume_name='xxxxxx'
* To find volume history for a tape (V5)
all:select volume_name,type,date_time from volhistory where volume_name='xxxxxx'
* To find volume history for a tape (V6)
select node_name,substr(char(LASTACC_TIME), 1, 10) as LASTACC_DATE from nodes
where node_name not like '%%EXP20%%' and substr(char(LASTACC_TIME), 1, 10)
<='2010-01-01'
* To list nodes with last access date less than/greater than date (change date and lt/gt
symbol)
select count(node_name) from nodes where node_name not like '%%EXP20%%' and
substr(char(LASTACC_TIME), 1, 10) <='2010-01-20'
* To count # of nodes with last access date less than/greater than date (change date and lt/gt
symbol)
select count(ll_name) from backups where STATE<>'ACTIVE_VERSION' and
substr(char(BACKUP_DATE), 1, 10)<substr(char(current_date - interval '45' day), 1, 10)
* To identify # of files expired if retention policy is changed (change interval day)
select date_time,volume_name,location from volhistory where date_time between '2010-0316 14:00:00.000000' and '2010-03-16 23:00:00.000000'
* Search for volumes on library manager created today
select assoc_object,object_name from prof_associations where profile_name='xxxxxxxxx'
* Show profile associations for profiles
Select admin_name,client_access from admins where CLIENT_ACCESS like '%
%node_name%%' group by client_access,admin_name
* show admins who have client access on these nodes (change node_name)
Select distinct nodename,count(nodename) from actlog where msgno=0480 group by
nodename
* Show severed sessions by nodename
select date_time,server_name,message from actlog,status where msgno=0314 and
date_time>(current_timestamp - interval '6' minute)
* Show ANR0314W errors within the last 6 minutes.
select entity,activity,sum(bytes),sum(end_timestart_time),sum(affected),sum(failed),sum(mediaw) from summary where entity in (select
node_name from filespaces where filespace_type like '%API%' group by node_name) and
start_time between '2010-06-01 17:00:00' and '2010-06-09 17:00:00' group by
entity,activity
* show TDP backup activity