ADSM-L

Re: Select Statement

2001-09-26 08:31:03
Subject: Re: Select Statement
From: Alan Davenport <Alan.Davenport AT SELECTIVE DOT COM>
Date: Wed, 26 Sep 2001 08:25:46 -0400
I use this script to list DB backups for the current day:

Name           Line       Command

               Number
----------     ------
------------------------------------------------------------
------------------------------------------------------------
DBTAPELIS-     10         select volume_name from volhistory where
DBTAPELIS-     10         select volume_name from volhistory where
day(current_date) =
 TTODAY                    day(date_time) and type='BACKUPFULL' order by
volume_name

To list the previous day's you would use day(current_date - 1 day) instead
of day(current_date).

I just threw together a quick and dirty example. Look at this below:

Name           Line       Command

               Number
----------     ------
------------------------------------------------------------
------------------------------------------------------------
BACKUP_CH-     1          select distinct(entity),bytes,successful from
BACKUP_CH-     1          select distinct(entity),bytes,successful from
summary where
 ECK                       activity='BACKUP' and day(start_time) =
day(current_date -
                           1 day) order by entity


Good luck!

 Al

Alan Davenport
Senior Storage Administrator
Selective Insurance
alan.davenport AT selective DOT com
(973)948-1306


+ -----Original Message-----
+ From: Marc Levitan [mailto:marc.levitan AT PFPC DOT COM]
+ Sent: Tuesday, September 25, 2001 1:00 PM
+ To: ADSM-L AT VM.MARIST DOT EDU
+ Subject: Select Statement
+
+
+ I am looking for a script that will list the clients that
+ backed up and how
+ much data was backed up for the previous night and if they
+ were successful.
+
+ This is what I have:
+
+ select ENTITY as Node_Name, BYTES as Bytes_Transferred,
+ SUCCESSFUL from
+ summary where activity='BACKUP' and start_time>='2001-09-23
+ 00:00:00.000000' and bytes>0 order by entity
+
+ The problem is that I have to change the Day/Time stamp
+ before I run it.
+ Is there a way to put a variable like today-1?  I have tried
+ but am not
+ successful.
+
+ Does anyone have a better script?
+
+
+ Marc Levitan
+ Storage Manager
+ PFPC Global Fund Services
+
<Prev in Thread] Current Thread [Next in Thread>