ADSM-L

Re: [ADSM-L] Tsm 6.22 server script problem.

2011-02-09 15:34:57
Subject: Re: [ADSM-L] Tsm 6.22 server script problem.
From: Andrew Raibeck <storman AT US.IBM DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Wed, 9 Feb 2011 15:29:14 -0500
Gary,

The ANR0162W message does include an SQL message, so you can use the DB2
SQL reference info to look it up for a detailed explanation. Here is a link
to this message:
http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.messages.sql.doc/doc/msql00419n.html

I suspect it occurs due differences between the "legacy" TSM server
database engine and the DB2 database engine.

At any rate, I'm not sure I understand why you are casting the number of
seconds as decimal(18,13). Why would you want all those digits to the right
of the decimal point? You could probably get away with using something like
decimal(18,1).

With the DB2 engine, it looks like it automatically casts the end and start
time difference to seconds, so you could do something like:

examined / (end_time-start_time) * 3600

Best regards,

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

IBM Tivoli Storage Manager support web page:
http://www.ibm.com/support/entry/portal/Overview/Software/Tivoli/Tivoli_Storage_Manager

"ADSM: Dist Stor Manager" <ADSM-L AT vm.marist DOT edu> wrote on 2011-02-09
14:12:14:

> From: "Lee, Gary D." <GLEE AT BSU DOT EDU>
> To: ADSM-L AT vm.marist DOT edu
> Date: 2011-02-09 14:13
> Subject: Tsm 6.22 server script problem.
> Sent by: "ADSM: Dist Stor Manager" <ADSM-L AT vm.marist DOT edu>
>
> I ported the following script from my tsm server v5.5.4  to the 6.2.2
server.
> Wanted to compare expiration performance between the two servers.
> However, script errors out with the following message.
>
> ANR0162W Supplemental database diagnostic information: -1:42911:-419
> ([IBM][CLI Driver][DB2/LINUXX8664] SQL0419N A decimal divide operation is
not
> valid because the result would have a negative scale. SQLSTATE=42911
> ).
>
>
> ------------ script follows ----------------
>
>
> select activity, cast ((end_time) as date) as "Date", -
> (examined/cast ((end_time-start_time) seconds as decimal (18,13)) *3600)
-
> "Objects Examined Up/Hr" from summary where -
> activity='EXPIRATION' and days (end_time) -days (start_time)=0
>
>
> Thanks for any help.
>
>
>
> Gary Lee
> Senior System Programmer
> Ball State University
> phone: 765-285-1310
>
>
<Prev in Thread] Current Thread [Next in Thread>