Script Error after migration

treds

ADSM.ORG Member
Joined
Jul 26, 2007
Messages
199
Reaction score
0
Points
0
PREDATAR Control23

Hi
I have migrated from redhat TSM 6.4 to red hat TSM 7.1
I have a script that i run to check backups. Since migration i can not longer run
as it returns a error.
any help appreciated
thanks
Treds

Script

SELECT cast(entity as char(22)) AS "Node name",
CAST(sum(bytes/1024/1024) AS decimal(8,2)) AS "MB
xfer", SUBSTR (CAST(min (start_time) AS char(29)),1,10) AS
"start date", SUBSTR (CAST(min (start_time) AS
char(29)),12,8) AS "start time", SUBSTR (CAST(max
(end_time) AS char(29)),1,10) AS "end date", SUBSTR
(CAST(max (end_time) AS char(29)),12,8) AS "end time" FROM
summary WHERE activity='BACKUP' AND start_time>
current_timestamp - 24 hours GROUP BY entity


Error

ANR0162W Supplemental database diagnostic information: -1:42601:-104 ([IBM][CLI Driver][DB2/LINUXX8664] SQL0104N An unexpected token "'Node
name'" was found following "as char ( 22 ) ) AS". Expected tokens may include: ",". SQLSTATE=42601
).
ANR0516E SQL processing for statement SELECT cast ( entity as char ( 22 ) ) AS 'Node name' CAST ( sum ( bytes/1024/1024 ) AS decimal ( 8 , 2 ) ) AS
'MB xfer' , timestampdiff ( 8 , char ( end_time-start_time ) ) as Duration , SUBSTR ( CAST ( min ( start_time ) AS char ( 29 ) ) , 1 , 10 ) AS
'start date' , SUBSTR ( CAST ( min ( start_time ) AS char ( 29 ) ) , 12 , 8 ) AS '(start time)' , SUBSTR ( CAST ( max ( end_time ) AS char ( 29 ) )
, 1 , 10 ) AS 'enddate' , SUBSTR ( CAST ( max ( end_time ) AS char ( 29 ) ) , 12 , 8 ) AS '(end time)' FROM summary WHERE activity = 'BACKUP' AND
start_time > current_timestamp - 24 hours GROUP BY entity , start_time , end_time failed.
ANR1463E RUN: Command script LAST_NIGHT_MB completed in error.
ANS8001I Return code 3.
 
Top