1. Forum Rules (PLEASE CLICK HERE TO READ BEFORE POSTING) Click the link 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 message will disappear after you have made at least 12 posts. Thank you for your cooperation.

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

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

  1. schuhb

    schuhb New 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 Member

    Joined:
    Oct 2, 2003
    Messages:
    24
    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 New Member

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

    CoMaboy Member

    Joined:
    Jun 4, 2012
    Messages:
    65
    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