ADSM-L

[ADSM-L] SV: How to produce a usable script?

2009-02-25 10:31:00
Subject: [ADSM-L] SV: How to produce a usable script?
From: Daniel Sparrman <daniel.sparrman AT EXIST DOT SE>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 25 Feb 2009 16:25:02 +0100
Put the selected fields togheter, like

select ('upd vol '||volume_name||' acc=readonly') as Command from volumes

Regards

Daniel

________________________________________
Från: ADSM: Dist Stor Manager [ADSM-L AT VM.MARIST DOT EDU] f&#246;r Moyer, 
Joni M [joni.moyer AT HIGHMARK DOT COM]
Skickat: den 25 februari 2009 16:24
Till: ADSM-L AT VM.MARIST DOT EDU
Ämne: Re: How to produce a usable script?

Hi Everyone,

I ran this script and it's not outputing it as I would like.  It's actually 
putting everything in columns as you see below:

Unnamed[1]     VOLUME_NAME            Unnamed[3]
----------     ------------------     --------------
upd vol        N00028                 acc=readonly
upd vol        N00098                 acc=readonly

Is there any way to  have everything output without this type of output and 
just have the commands?

Thanks again!

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of 
Bill Boyer
Sent: Wednesday, February 25, 2009 10:20 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: How to produce a usable script?

Don't forget the spaces.. you need an ending space on UPD VOL and a
beginning for ACC=READONLY or it will all be lumped together.

select 'upd vol ', volume_name, ' acc=readonly' from volumes where
stgpool_name like 'TAPE_NDMP%_OFFSITE'

You also might need to run SET SQLDISPLAYMODE WIDE or the column will wrap
on the display.


Bill Boyer
"There are 10 types of people in the world. Those that understand binary and
those that don't" - ??



-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
Huebschman, George J.
Sent: Wednesday, February 25, 2009 10:03 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: How to produce a usable script?

select 'upd vol', volume_name, 'acc=readonly' from volumes where
stgpool_name like 'TAPE_NDMP%_OFFSITE'

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
Moyer, Joni M
Sent: Wednesday, February 25, 2009 9:58 AM
To: ADSM-L AT VM.MARIST DOT EDU
Subject: [ADSM-L] How to produce a usable script?

Hi Everyone,

I have a script that I have created that provides me with a particular
listing of backup tapes:

select  volume_name from volumes where stgpool_name like
'TAPE_NDMP%_OFFSITE' order by volume_name

I would then like to take the results of this script and create another
script that could be run if needed so that it looks like the following:

upd vol xxxxxx acc=readonly

Does anyone know how I could do this?

Thanks in advance!!!!

Joni Moyer
Storage Administrator III
(717)302-9966
joni.moyer AT highmark DOT com


________________________________
This e-mail and any attachments to it are confidential and are intended
solely for use of the individual or entity to whom they are addressed.
If you have received this e-mail in error, please notify the sender
immediately and then delete it. If you are not the intended recipient,
you must not keep, use, disclose, copy or distribute this e-mail without
the author's prior permission. The views expressed in this e-mail
message do not necessarily represent the views of Highmark Inc., its
subsidiaries, or affiliates.

IMPORTANT: E-mail sent through the Internet is not secure and timely
delivery of Internet mail is not guaranteed. Legg Mason therefore,
recommends that you do not send any  action-oriented or time-sensitive
information to us via electronic mail, or any confidential or sensitive
information including:  social security numbers, account numbers, or
personal identification numbers.

This message is intended for the addressee only and may contain privileged
or confidential information. Unless you are the intended recipient, you may
not use, copy or disclose to anyone any information contained in this
message. If you have received this message in error, please notify the
author by replying to this message and then kindly delete the message. Thank
you.


This e-mail and any attachments to it are confidential and are intended solely 
for use of the individual or entity to whom they are addressed.  If you have 
received this e-mail in error, please notify the sender immediately and then 
delete it.  If you are not the intended recipient, you must not keep, use, 
disclose, copy or distribute this e-mail without the author's prior permission. 
 The views expressed in this e-mail message do not necessarily represent the 
views of Highmark Inc., its subsidiaries, or affiliates.