ADSM-L

Re: [ADSM-L] SQL statement

2016-01-29 10:47:00
Subject: Re: [ADSM-L] SQL statement
From: "Rhodes, Richard L." <rrhodes AT FIRSTENERGYCORP DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 29 Jan 2016 15:43:24 +0000
If you get to a definitive sql statement, would love to see it!

Rick



-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of 
Skylar Thompson
Sent: Friday, January 29, 2016 10:14 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: SQL statement

You could get a bit more complicated in the archive case, and exclude
filespaces where o.type='Arch'

On Fri, Jan 29, 2016 at 03:09:22PM +0000, Loon, EJ van (ITOPT3) - KLM wrote:
> Hi Erwann!
> As a matter of fact this one requires a little more care. Null can be the 
> result of a filespace backup which is interrupted and never restarted (i.e. 
> because it has been excluded from the backup) but you will also see null when 
> the filespace is only used for archiving. Creating an archive will not set 
> the "Last Backup Completion Date/Time" field.
> In the first case you can delete the filespace, in the second case you most 
> likely don't want to...
> Kind regards,
> Eric van Loon
> AF/KLM Storage Engineering
> 
> -----Original Message-----
> From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf 
> Of Erwann SIMON
> Sent: donderdag 28 januari 2016 16:46
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: Re: SQL statement
> 
> Hi Eric,
> 
> You maybe should add a condition if backup_end is null
> 
> --
> Best regards / Cordialement / ???? ????????????
> Erwann SIMON
> 
> ----- Mail original -----
> De: "EJ van Loon (ITOPT3) - KLM" <Eric-van.Loon AT KLM DOT COM>
> À: ADSM-L AT VM.MARIST DOT EDU
> Envoyé: Jeudi 28 Janvier 2016 16:20:57
> Objet: Re: [ADSM-L] SQL statement
> 
> Hi Skylar!
> This is exactly what I was looking for. Thank you very much for your help!!!
> Kind regards,
> Eric van Loon
> AF/KLM Storage Engineering
> 
> -----Original Message-----
> From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf 
> Of Skylar Thompson
> Sent: donderdag 28 januari 2016 15:59
> To: ADSM-L AT VM.MARIST DOT EDU
> Subject: Re: SQL statement
> 
> Hi EJ,
> 
> I think this will do the trick:
> 
> SELECT -
>    f.node_name, -
>    f.filespace_name, -
>    f.backup_end, -
>    CAST(ROUND(o.physical_mb/1024) as int) as "GB Stored" - FROM -
>    filespaces f, -
>    occupancy o -
> WHERE -
>    o.node_name=f.node_name -
>    AND o.filespace_name=f.filespace_name -
>    AND days(f.backup_end)<(days(current_date)-30) - ORDER BY o.physical_mb 
> DESC
> 
> On Thu, Jan 28, 2016 at 02:43:54PM +0000, Loon, EJ van (ITOPT3) - KLM wrote:
> > Hi guys!
> > I'm trying to join the filespaces and occupancy tables in one SQL 
> > statement, but I get stuck on the point where I want to calculate with the 
> > amount of days...
> > I would like to create a list of filespaces (node_name, 
> > filespace_name,backup_end) which are not backed up for more than 30 days, 
> > along with the amount of data stored for them in GB 
> > (cast(round(physical_mb/1024) as int) as "GB Stored"), sorted on size, the 
> > largest first.
> > Can anybody help me out here? Thank you very much for your help in advance!
> > Kind regards,
> > Eric van Loon
> > AF/KLM Storage Engineering
> > ********************************************************
> > For information, services and offers, please visit our web site: 
> > http://www.klm.com. This e-mail and any attachment may contain confidential 
> > and privileged material intended for the addressee only. If you are not the 
> > addressee, you are notified that no part of the e-mail or any attachment 
> > may be disclosed, copied or distributed, and that any other action related 
> > to this e-mail or attachment is strictly prohibited, and may be unlawful. 
> > If you have received this e-mail by error, please notify the sender 
> > immediately by return e-mail, and delete this message.
> >
> > Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its 
> > employees shall not be liable for the incorrect or incomplete transmission 
> > of this e-mail or any attachments, nor responsible for any delay in receipt.
> > Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal 
> > Dutch Airlines) is registered in Amstelveen, The Netherlands, with 
> > registered number 33014286
> > ********************************************************
> 
> --
> -- Skylar Thompson (skylar2 AT u.washington DOT edu)
> -- Genome Sciences Department, System Administrator
> -- Foege Building S046, (206)-685-7354
> -- University of Washington School of Medicine
> ********************************************************
> For information, services and offers, please visit our web site: 
> http://www.klm.com. This e-mail and any attachment may contain confidential 
> and privileged material intended for the addressee only. If you are not the 
> addressee, you are notified that no part of the e-mail or any attachment may 
> be disclosed, copied or distributed, and that any other action related to 
> this e-mail or attachment is strictly prohibited, and may be unlawful. If you 
> have received this e-mail by error, please notify the sender immediately by 
> return e-mail, and delete this message. 
> 
> Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its 
> employees shall not be liable for the incorrect or incomplete transmission of 
> this e-mail or any attachments, nor responsible for any delay in receipt. 
> Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal Dutch 
> Airlines) is registered in Amstelveen, The Netherlands, with registered 
> number 33014286
> ********************************************************
>                       
> ********************************************************
> For information, services and offers, please visit our web site: 
> http://www.klm.com. This e-mail and any attachment may contain confidential 
> and privileged material intended for the addressee only. If you are not the 
> addressee, you are notified that no part of the e-mail or any attachment may 
> be disclosed, copied or distributed, and that any other action related to 
> this e-mail or attachment is strictly prohibited, and may be unlawful. If you 
> have received this e-mail by error, please notify the sender immediately by 
> return e-mail, and delete this message. 
> 
> Koninklijke Luchtvaart Maatschappij NV (KLM), its subsidiaries and/or its 
> employees shall not be liable for the incorrect or incomplete transmission of 
> this e-mail or any attachments, nor responsible for any delay in receipt. 
> Koninklijke Luchtvaart Maatschappij N.V. (also known as KLM Royal Dutch 
> Airlines) is registered in Amstelveen, The Netherlands, with registered 
> number 33014286
> ********************************************************
>                       

-- 
-- Skylar Thompson (skylar2 AT u.washington DOT edu)
-- Genome Sciences Department, System Administrator
-- Foege Building S046, (206)-685-7354
-- University of Washington School of Medicine


-----------------------------------------
The information contained in this message is intended only for the personal and 
confidential use of the recipient(s) named above. If the reader of this message 
is not the intended recipient or an agent responsible for delivering it to the 
intended recipient, you are hereby notified that you have received this 
document in error and that any review, dissemination, distribution, or copying 
of this message is strictly prohibited. If you have received this communication 
in error, please notify us immediately, and delete the original message.
<Prev in Thread] Current Thread [Next in Thread>