Recent Posts

Wednesday, 25 December 2013

Most Select Commands used in TSM

select sum(100-(free_space_mb*100) / tot_file_system_mb) as PCT_UTILIZED from db select cast ( (last_backup_date) as date ) as Last_DBB fr... thumbnail 1 summary
select sum(100-(free_space_mb*100) / tot_file_system_mb) as PCT_UTILIZED from db
select cast ( (last_backup_date) as date ) as Last_DBB from db
select STGPOOL_NAME,PCT_MIGR  from stgpools
select count(*) as RO_TAPES from volumes where access='READONLY'
select count(*) from libvolumes where status='Scratch'
select count(*) from sessions
select count(*) from drives WHERE NOT online='YES'
select count(*) from paths where online='NO'
select count(*) from sessions where state='MediaW' and wait_seconds>10000
select count(*) from sessions where state='IdleW' and wait_seconds>30000
select session_id,client_name from sessions where state='MediaW' and wait_seconds>18000
select session_id,client_name from sessions where state='IdleW' and wait_seconds>18000
select session_id,start_time from sessions where OUTPUT_VOL_ACCESS like '%bac%'
select session_id,start_time from sessions where OUTPUT_VOL_WAIT like '%abc%'
SELECT client_name, session_id, start_time, state, mount_point_wait, input_mount_wait, input_vol_wait FROM sessions where OUTPUT_VOL_WAIT like '%abc%'
select session_id,client_name,date(start_time) from sessions where OUTPUT_VOL_WAIT like '%abc%'
select SESSION_ID from sessions where OUTPUT_VOL_ACCESS like '%abc%'
SELECT count(*) FROM actlog WHERE message LIKE 'ANR0522W%' AND date_time>=current_timestamp-18 hours
SELECT count(*) FROM actlog WHERE message LIKE 'ANR0522W%' AND  date_time>timestamp(current_date)-(1)days
select SESSION_ID,INPUT_VOL_ACCESS,date(start_time),OUTPUT_VOL_ACCESS,state from sessions where state='MediaW'
select SESSION_ID,INPUT_VOL_ACCESS,OUTPUT_VOL_ACCESS,state from sessions where state='MediaW'
select drive_name,library_name from drives where not online='YES'
select count(*)  from volumes where status='EMPTY' and stgpool_name='abc'
select session_id,state,client_name,date(start_time) from sessions where OUTPUT_VOL_WAIT like '%123%' or OUTPUT_VOL_ACCESS like '%abc%' or OUTPUT_MOUNT_WAIT like '%12345%'
select session_id from sessions where client_name='abc'
select session_id,client_name, state,CAST(bytes_received/1024/1024/1024 AS DEC(8,2)) AS "GB_Rcvd" from sessions where client_name='abc'

No comments

Post a Comment