1. Community Tip: Please Give Thanks to Those Sharing Their Knowledge.
    If you receive helpful answer on this forum, please show thanks to the poster by clicking "LIKE" link for the answer that you found helpful.
  2. Community Tip: Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING)
    Click the link above to access ADSM.ORG Acceptable Use Policy and forum rules which should be observed when using this website. Violators may be banned from this website. This notice will disappear after you have made at least 3 posts.

Script doesn't work since TSM V6.2 is used

Discussion in 'Scripting' started by schuhb, Jul 3, 2012.

  1. schuhb

    schuhb ADSM.ORG Member

    Joined:
    Apr 14, 2004
    Messages:
    17
    Likes Received:
    0
    Location:
    Vienna
    /* -----------------------------------------------------------------*/
    /* Script Name: back_single */
    /* Parameter: script <hours> <Nodename> */
    /* Description: Displays nodes and their amount of files and MBs. */
    /* -----------------------------------------------------------------*/
    select Entity,Successful,Bytes/1024/1024 as "MBs",date(start_time)as "START Date",time(START_TIME) as "Time",Date(END_TIME) as "END DATE",time(end_time) as "Time",Examined,Affected,Failed from summary -
    where activity in ('BACKUP','ARCHIVE') and cast((current_timestamp-start_time)hours as decimal(8,0)) < $1 and entity='$2' order by Entity



    This showed me the backups of node ($2) in the last ($1) hours.
    No it shows me ALL backups instead of the last $1 hours.
    Any idea
    Thx, Hannes
     
  2.  
  3. cilesiz

    cilesiz ADSM.ORG Member

    Joined:
    Oct 2, 2003
    Messages:
    26
    Likes Received:
    5
    Location:
    Grevenbroich / Germany
    Hi schuhb,

    try this :

    select Entity,Successful,Bytes/1024/1024 as "MBs",date(start_time)as "START Date",time(START_TIME) as "Time",Date(END_TIME) as "END DATE",time(end_time) as "Time",Examined,Affected,Failed from summary where activity in ('BACKUP','ARCHIVE') and cast(hour(current_timestamp-start_time) as decimal(8,0)) < $1 and entity='$2' order by Entity

    regards

    Ugur
     
  4. schuhb

    schuhb ADSM.ORG Member

    Joined:
    Apr 14, 2004
    Messages:
    17
    Likes Received:
    0
    Location:
    Vienna
    Sorry, for the long delay....same outcome :(
     
  5. CoMaboy

    CoMaboy ADSM.ORG Senior Member

    Joined:
    Jun 4, 2012
    Messages:
    66
    Likes Received:
    10
    select -
    entity, -
    date(start_time) -
    from -
    summary -
    where -
    activity in ('BACKUP','ARCHIVE') -
    and entity='$2' -
    and start_time>current_timestamp-$1 hours
     

Share This Page