ADSM-L

AW: [ADSM-L] SQL syntax

2006-03-27 09:52:35
Subject: AW: [ADSM-L] SQL syntax
From: Thomas Rupp <Thomas.Rupp AT ILLWERKE DOT AT>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Mon, 27 Mar 2006 16:51:26 +0200
Richard Sims great TSM Quickfacts say:

>      Redirection character in the server
       administrative command line interface,
       if at least one space on each side of
       it, saying to replace the specified
       output file.  There is no "escape"
       character to render this character
       "un-special", as a backslash does in
       Unix.  Thus, you should avoid coding
       " > " in an SQL statement: eliminate at
       least one space on either side of it.
       Note that redirection cannot be used in
       Server Scripts.
       Ref: Admin Ref "Redirecting Command
       Output"
       See also: "(CLIB_OPT)/>" for Netware
       redirection

Redirection of command output
       The ADSM server allows command output to
       be redirected, as in capturing output in
       a file.  Use ' > ' to create a file
       afresh or ' >> ' to append to a file.
       Be sure have spaces around the
       angle-brackets.  Be aware that ADSM
       tends to inflate the width of such
       redirected output, way beyond what you
       are accustomed to in terminal display.
       For narrower output, use the
       "-OUTfile=SomeFilename" option on the
       dsmadmc invocation.  Examples:
          'q cont vol27 > temp'
          'q cont vol28 >> temp'
       Note that you can't redirect output from
       an administrative schedule, however.
       Ref: Admin Ref

HTH
Thomas Rupp


-----Ursprüngliche Nachricht-----
Von: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] Im Auftrag 
von Joni Moyer
Gesendet: Montag, 27. März 2006 16:15
An: ADSM-L AT VM.MARIST DOT EDU
Betreff: [ADSM-L] SQL syntax


Hello Everyone,

I have run the following select statement, but I would like to run it from
the command-line and as tabdelimited so that I can import it into a
spreadsheet.  How can I format the last_write_date column so that I can see
the date & time?  When I do run this as tabdelimited it cuts off a majority
of the last_write_date information.  Any suggestions would be appreciated.
Thanks!

select
volumeusage.node_name,volumeusage.filespace_name,volumeusage.stgpool_name,volumeusage.volume_name,volumes.last_write_date
 from volumeusage,volumes where node_name='NAS_SERVER_2_OFFSITE' and
last_write_date > current_timestamp - 2 days order by
filespace_name,volume_name

      NODE_NAME: NAS_SERVER_2_OFFSITE
 FILESPACE_NAME: /
   STGPOOL_NAME: TAPE_NDMP_OFFSITE
    VOLUME_NAME: N00020
LAST_WRITE_DATE: 2005-11-27 01:30:25.000000

      NODE_NAME: NAS_SERVER_2_OFFSITE
 FILESPACE_NAME: /
   STGPOOL_NAME: TAPE_NDMP_OFFSITE
    VOLUME_NAME: N00020
LAST_WRITE_DATE: 2005-12-11 09:19:33.000000


********************************
Joni Moyer
Highmark
Storage Systems, Senior Systems Programmer
Phone Number: (717)302-9966
Fax: (717) 302-9826
joni.moyer AT highmark DOT com
********************************

<Prev in Thread] Current Thread [Next in Thread>
  • AW: [ADSM-L] SQL syntax, Thomas Rupp <=