ADSM-L

Re: select statement: help!

2005-01-19 09:02:47
Subject: Re: select statement: help!
From: Eivind Birkeland <eibi AT STATOIL DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 19 Jan 2005 15:02:06 +0100
Hi.
Use "-tabdelimited" to get selectresult on one line with TAB between each
column.
See this example:

[root@st-log tmp]# dsmadmc -server=AAAA  -id=BBBB  -password=CCCC
-tabdelimited andycap:select '*' from libraries
IBM Tivoli Storage Manager
Command Line Administrative Interface - Version 5, Release 2, Level 3.0
(c) Copyright by IBM Corporation and other(s) 1990, 2004. All Rights
Reserved.

Session established with server DSM0B: AIX-RS/6000
  Server Version 5, Release 1, Level 9.3
  Server date/time: 19-01-2005 14:58:45  Last access: 19-01-2005 14:50:01

ANS8000I Server command: 'AAAA:select * from libraries'
ANR1699I Resolved AAAA to 1 server(s) - issuing command SELECT  against
server(s).
ANR1687I Output for command 'SELECT ' issued against server AAAA follows:
ACS_9940B       ACSLS   0                               NO
OOF  2004-07-19 13:11:08.000000
ANR1688I Output for command 'SELECT ' issued against server AAAA completed.
ANR1694I Server AAAA processed command 'SELECT ' and completed
successfully.
ANR1697I Command 'SELECT ' processed by 1 server(s):  1 successful, 0 with
warnings, and 0 with errors.

ANS8002I Highest return code was 0.
|-----------------------------+-----------------------------------------|
|                             |                                         |
|  Eivind Birkeland           |  E-mail: EIBI AT statoil DOT com               |
|  Unix/DBA Manager           |  Phone: +47 55 14 00 00 / 22 51         |
|  Statoil Norway             |  Mobile: +47 907 76 942                 |
|                             |                                         |
|-----------------------------+-----------------------------------------|






                    Joni Moyer
                    <joni.moyer@HIG        To:     ADSM-L AT VM.MARIST DOT EDU
                    HMARK.COM>             cc:     (bcc: Eivind Birkeland)
                    Sent by: "ADSM:        Subject:     Re: select statement: 
help!
                    Dist Stor
                    Manager"
                    <ADSM-L AT VM DOT MARI
                    ST.EDU>


                    19.01.2005
                    14:54
                    Please respond
                    to "ADSM: Dist
                    Stor Manager"






Hello,

I went out and tried the following:

dsmadmc -servername=server -displaymode=table select statement and it
didn't work.  Do you have to put the statement within single quotes?
Thanks!

********************************
Joni Moyer
Highmark
Storage Systems
Work:(717)302-6603
Fax:(717)302-5974
joni.moyer AT highmark DOT com
********************************



             "PAC Brion
             Arnaud"
             <Arnaud.Brion@PAN                                          To
             ALPINA.COM>               ADSM-L AT VM.MARIST DOT EDU
             Sent by: "ADSM:                                            cc
             Dist Stor
             Manager"                                              Subject
             <[email protected]         Re: select statement: help!
             .EDU>


             01/19/2005 08:16
             AM


             Please respond to
             "ADSM: Dist Stor
                 Manager"
             <[email protected]
                   .EDU>






Joni,

Maybe this http://msgs.adsm.org/cgi-bin/get/adsm0109/730.html will help
you !
Cheers.


Arnaud

************************************************************************
******
Panalpina Management Ltd., Basle, Switzerland, CIT Department
Viadukstrasse 42, P.O. Box 4002 Basel/CH
Phone:  +41 (61) 226 11 11, FAX: +41 (61) 226 17 01
Direct: +41 (61) 226 19 78
e-mail: arnaud.brion AT panalpina DOT com
************************************************************************
******

-----Original Message-----
From: ADSM: Dist Stor Manager [mailto:ADSM-L AT VM.MARIST DOT EDU] On Behalf Of
Joni Moyer
Sent: Wednesday, 19 January, 2005 14:00
To: ADSM-L AT VM.MARIST DOT EDU
Subject: Re: select statement: help!

Hey!

I have one other simple question.  Is there a way that the output of
this select statement will be able to go on one line so that it isn't so
hard to read?  The output currently looks like this, but I would rather
have it all fit on one line.  Thanks!

NODE_NAME: VMSNW05
      DATE: 2005-01-18
  ACTIVITY: BACKUP
     START: 10:31:15
       END: 12:05:51
 MEGABYTES: 12
     FILES: 140
SUCCESSFUL: NO

********************************
Joni Moyer
Highmark
Storage Systems
Work:(717)302-6603
Fax:(717)302-5974
joni.moyer AT highmark DOT com
********************************



             "Andrew Raibeck"
             <storman AT US DOT IBM.C
             OM>
To
             Sent by: "ADSM:           ADSM-L AT VM.MARIST DOT EDU
             Dist Stor
cc
             Manager"
             <[email protected]
Subject
             .EDU>                     Re: select statement: help!


             01/18/2005 12:42
             PM


             Please respond to
             "ADSM: Dist Stor
                 Manager"
             <[email protected]
                   .EDU>






Maybe something like:

select entity as node_name, date(start_time) as date, cast(activity as -
varchar(10)) as activity, time(start_time) as start, time(end_time) as
end, -
cast(bytes/1024/1024 as decimal(6,0)) as megabytes, cast(affected as -
decimal(7,0)) as files, successful -
        from summary -
      where date(start_time)> date(current_timestamp - 1 day) -
      and (entity like 'HM%' or entity like 'GEO%') -
      order by successful

Andy Raibeck
IBM Software Group
Tivoli Storage Manager Client Development Internal Notes e-mail: Andrew
Raibeck/Tucson/IBM@IBMUS Internet e-mail: storman AT us.ibm DOT com

The only dumb question is the one that goes unasked.
The command line is your friend.
"Good enough" is the enemy of excellence.

"ADSM: Dist Stor Manager" <ADSM-L AT VM.MARIST DOT EDU> wrote on 01/18/2005
10:33:11:

> Hello All!
>
> I have been trying, what seems like forever, to get this select
statement
> to work and I am just not sure what I am doing wrong... Any
suggestions?
 I
> am trying to get a list of the backups of all of the servers that
> begin with hm* and geo* within the past 24 hours and if they were
> successful, missed or failed.  Thank you in advance!  Here is what I
> have so far,
but
> it doesn't seem to work:
>
> select entity as node_name, date(start_time) as date, cast(activity as
> varchar(10)) as activity, time(start_time) as start, time(end_time) as
end,
> cast(bytes/1024/1024 as decimal(6,0)) as megabytes, cast(affected as
> decimal(7,0)) as files, successful
>         from summary
>       where date(start_time) > current_timestamp - 1 day
>       and entity like 'hm*,geo*'
>        group by entity
>       order by successful
>
> ********************************
> Joni Moyer
> Highmark
> Storage Systems
> Work:(717)302-6603
> Fax:(717)302-5974
> joni.moyer AT highmark DOT com
> ********************************




-------------------------------------------------------------------
The information contained in this message may be CONFIDENTIAL and is
intended for the addressee only. Any unauthorised use, dissemination of the
information or copying of this message is prohibited. If you are not the
addressee, please notify the sender immediately by return e-mail and delete
this message.
Thank you.

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