Results 1 to 2 of 2
  1. #1

    Default SQL "cast" rounding for tsm v 5 vs v6

    Hello ,
    I am running the following script to get the nodes throughput within a time interval

    SELECT cast(a.entity AS varchar(9)) AS "Node name", -
    CAST(sum(a.bytes/1024/1024) AS decimal(8,2)) AS "MB Xfer ", -
    CAST(sum(a.bytes/1024/1024/1024) AS decimal(8,2)) AS "GB Xfer " -
    FROM summary a, nodes b WHERE a.entity=b.node_name and a.activity='BACKUP' AND -
    a.start_time> current_timestamp - $1 hours GROUP BY a.entity

    Somehow when I run this on tsm v6 the results are rounded up and there are zeros after the decimal point
    Node name MB Xfer GB Xfer
    ---------- ----------- -----------
    AUSORAFIN 50160.00 47.00
    CHR7Z035 2365.00 2.00
    CHR7Z036 1332.00 1.00

    While similar report on the V5 does produce the fractions
    Node name MB Xfer GB Xfer
    --------- ---------- ----------
    USCP3005 917.69 0.89
    USCP3006 883.84 0.86
    USUS3001 1411.19 1.37

    Is there a way to get the fraction work in V6?

    Thank you ,
    Alex

  2. #2
    Member
    Join Date
    Jun 2012
    Posts
    65
    Thanks
    4
    Thanked 10 Times in 9 Posts

    Default

    SELECT cast(entity AS varchar(9)) AS "Node name", -
    CAST(DEC(sum(bytes))/1024/1024 AS decimal(8,2)) AS "MB Xfer ", -
    CAST(DEC(sum(bytes))/1024/1024/1024 AS decimal(8,2)) AS "GB Xfer " -
    FROM summary WHERE activity='BACKUP' AND -
    start_time> current_timestamp - $1 hours GROUP BY entity

Similar Threads

  1. Replies: 2
    Last Post: 10-18-2012, 12:45 PM
  2. SQL2025N An I/O error "155" occurred on media "TSM"
    By rchoudarapu in forum Backup / Archive Discussion
    Replies: 3
    Last Post: 06-13-2008, 12:55 PM
  3. SQL2025N An I/O error "12" occurred on media "TSM".
    By ajmense in forum Administrative Client
    Replies: 1
    Last Post: 11-13-2007, 02:00 PM
  4. SQL2025N An I/O error "12" occurred on media "TSM"
    By bprrajeev in forum TDP/Application Layer Backup
    Replies: 2
    Last Post: 05-02-2007, 02:13 AM
  5. TDP for SQL: Backups changing DB recovery mode from "normal" to "simple"?
    By c.j.hund in forum TDP/Application Layer Backup
    Replies: 1
    Last Post: 09-12-2006, 04:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •