These may also be useful /* SQL Script: */ /* */ /* backup_volume_last_24hours.sql */ /* Date Description */ /* 2002-06-10 PDS Created */
/* Create Report of total MBs per each session */ select entity as "Node Name ", cast(bytes/1024/1024 as decimal(10,3)) as "Total MB ", substr(cast(start_time as char(26)),1,19) as "Date/Time " from summary where start_time>=current_timestamp - 1 day and activity='BACKUP' /* Create Report of total MBs and length of backup for each node */ select entity as "Node Name ", cast(sum(bytes/1024/1024) as decimal(10,3)) as "Total MB", substr(cast(min(start_time) as char(26)),1,19) as "Date/Time ", cast(substr(cast(max(end_time)-min(start_time) as char(20)),3,8) as char(8)) as "Length " from summary where start_time>=current_timestamp - 22 hours and activity='BACKUP' group by entity /* Create Report of total backed up*/ select sum(cast(bytes/1024/1024/1024 as decimal(6,3))) "Total GB Backup" from summary where start_time>=current_timestamp - 1 day and activity='BACKUP' /* Create Report of Storage Pool Copies */ select entity as "Storage Pool ", cast(bytes/1024/1024 as decimal(10,3)) as " Total MB ", ' ' as " ", substr(cast(start_time as char(26)),1,19) as "Date/Time ", cast(substr(cast(end_time-start_time as char(20)),3,8) as char(8)) as "Length " from summary where start_time>=current_timestamp - 22 hours and activity='STGPOOL BACKUP' order by 3, entity /* Create Summary Report for each Storage Pool */ select entity as "Storage Pool ", cast(sum(bytes/1024/1024) as decimal(10,3)) as " Total MB ", ' ' as " ", substr(cast(min(start_time) as char(26)),1,19) as "Start Date/Time ", substr(cast(max(end_time) as char(26)),1,19) as "End Date/Time " from summary where start_time>=current_timestamp - 22 hours and activity='STGPOOL BACKUP' group by entity /* Create Report of Total Storage Pool GB copied */ select sum(cast(bytes/1024/1024/1024 as decimal(6,3))) "Total STG Pool GB Backup" from summary where start_time>=current_timestamp - 1 day and activity='STGPOOL BACKUP' Paul D. Seay, Jr. Technical Specialist Naptheon, INC 757-688-8180 -----Original Message----- From: Jolliff, Dale [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 23, 2002 7:37 AM To: [EMAIL PROTECTED] Subject: Re: Occupancy comparison script I need to restate that - I'm looking for a way to produce output that lines up primary and copy storage pools occupancy side by side -- I just need a sanity check on the numbers before pulling tapes from the vault for a DR exercise. -----Original Message----- From: Mike Crawford [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 11:05 PM To: [EMAIL PROTECTED] Subject: Re: Occupancy comparison script Simple: backup stgpool primarypool copypool preview=yes Check the activity log, it will show which volumes would need to be mounted for a backup, if any. Mike. Jolliff, Dale wrote: >I know someone has already invented this wheel... > >I need to create a script to compare occupancy of primary sequential >pools to copypools to verify a complete stgpool backup. > >Anyone got one handy that won't bring a server to it's knees? >