ADSM-L

Re: SQL Query for monthly backups

2006-10-11 06:45:42
Subject: Re: SQL Query for monthly backups
From: "Smith, I (Ian)" <Ian.Smith AT RABOBANK DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 11 Oct 2006 11:44:32 +0100
 
Thanks- that is perfect...

I ended up chopping my original and creating some cowboy sql:

select distinct(backup_date) from backups where node_name='NODE_MONTHLY'
order by backup_date



_____________________________
Ian Smith
SAN/TSM Specialist



-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
Leigh Reed
Sent: 11 October 2006 11:34
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: [ADSM-L] SQL Query for monthly backups

Ian

I think that this might to do what you are looking for.

select
        distinct date(backup_date) as backup_date,
        node_name,hl_name, ll_name from backups
        where node_name='NODE_MONTHLY'
        order by Backup_date


Leigh

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
Smith, I (Ian)
Sent: 11 October 2006 10:39
To: ADSM-L AT VM.MARIST DOT EDU
Subject: [SPAM: 4.700] [ADSM-L] SQL Query for monthly backups

Hi

I am trying to find out all the successful backups for a monthly node -
going back for years.

I am using the following select:

select node_name,hl_name,ll_name,backup_date from backups where
node_name='NODE_MONTHLY' order by backup_date

Is there anyway to get a DISTINCT on the backup date? So I can just get
an idea of dates where backups ocurred, as the above output is just too
much.


Is there any better way of doing this?

_____________________________
Ian Smith
SAN/TSM Specialist
Hitachi Data Systems Certified Professional IBM Tivoli Storage Manager
Certified Consultant IT Infrastructure Rabobank International Thames
Court, One Queenhithe London EC4V 3RL
t: +44 (0)20 7809 3046
f: +44 (0)20 7809 3599
m: +44 (0)7843 689914
Mailto: ian.smith AT rabobank DOT com



_____________________________________________________________

This email (including any attachments to it) is confidential, legally
privileged, subject to copyright and is sent for the personal attention
of the intended recipient only. If you have received this email in
error, please advise us immediately and delete it. You are notified that
disclosing, copying, distributing or taking any action in reliance on
the contents of this information is strictly prohibited. Although we
have taken reasonable precautions to ensure no viruses are present in
this email, we cannot accept responsibility for any loss or damage
arising from the viruses in this email or attachments. We exclude any
liability for the content of this email, or for the consequences of any
actions taken on the basis of the information provided in this email or
its attachments, unless that information is subsequently confirmed in
writing. If this email contains an offer, that should be considered as
an invitation to treat.
_____________________________________________________________

<Prev in Thread] Current Thread [Next in Thread>