Select statement not working

harley1955

Active Newcomer
Joined
Jan 22, 2009
Messages
7
Reaction score
0
Points
0
PREDATAR Control23

Use to use this under 5.5 but now have a new 7.1 server up and it doesn't work, not an sql guru so can anyone help with what is wrong with this query?

select process_num as Number,substr(process,1,16) as process,SUBSTR(CAST((current_timestamp-start_time) AS char(29)),0,11) AS Runnig_time ,Integer(cast(bytes_processed as decimal(18,0))/cast((current_timestamp-start_time)seconds as decimal(18,0))/1024/1024)as MB_per_sec,CAST(cast(bytes_processed as decimal(18,0))/cast((current_timestamp-start_time)seconds as decimal(18,0))/1024/1024/1024/1024*3600*24 as decimal(4,1)) as TB_per_day from processes
 
PREDATAR Control23

Might be more helpful if you provide the full error message, that may give an indication as to what is wrong.
 
PREDATAR Control23

There has to be more, that's just a generic code for any failed TSM command, nothing specific to SQL.
 
PREDATAR Control23

That's all it's showing, here's the output of the query under 5.5, shows process number, process name, running time, etc.

NUMBER PROCESS RUNNIG_TIME MB_PER_SEC TB_PER_DAY
----------- ------------------ ------------------ ----------- ----------
227 Space Reclamatio 0 15:17:06 4 0.3
228 Backup Storage P 0 00:22:44 0 0.0
 
PREDATAR Control23

There has to be more. Run the query again, and right after run this command:
query actlog begintime=-00:01

Copy/paste the results of the query actlog here.
 
PREDATAR Control23

02/08/2016 08:08:44 ANR2017I Administrator issued command: select
process_num as Number,substr(process,1,16) as
process,SUBSTR(CAST((current_timestamp-start_time) AS
char(29)),0,11) AS Runnig_time,Integer(cast(bytes_proces-
sed as decimal(18,0))/cast((current_timestamp-start_time-
)seconds as decimal(18,0))/1024/1024)as
MB_per_sec,CAST(cast(bytes_processed as
decimal(18,0))/cast((current_timestamp-start_time)seconds
as decimal(18,0))/1024/1024/1024/1024*3600*24 as
decimal(4,1)) as TB_per_day from processes (SESSION:
211513)
02/08/2016 08:08:44 ANR9999D_3831306406 ReportSQLDiagInfo(dbieval.c:1572)
Thread<4442803>: Missing sqlState=22011, sqlCode=-138
from table. Returning rc = 9994. (SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> issued message 9999 from:
(SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x00000000eca353 OutDiagToCons
(SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x00000000ecd341 outDiagfExt
(SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x00000000b96df6
DbiEvalSQLOutcomeX (SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x00000000c0433b
tbSQLExecuteSelect (SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x000000005d3e7d
NewAdmSQLExecute (SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x000000005d62a3 AdmSQLExecute
(SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x000000004fa41f AdmCommandLocal
(SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x000000004fbd0c admCommand
(SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x00000000c2ecfa
SmAdminCommandThread (SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x00000000f6d8bf StartThread
(SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x007f7495472df5 *UNKNOWN*
(SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x007f7491c841ad *UNKNOWN*
(SESSION: 211513)
02/08/2016 08:08:44 ANR9999D_0737318079 NewAdmSQLExecute(admsql.c:2596)
Thread<4442803>: Unexpected rc 9994 from
tbSQLExecuteSelect. (SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> issued message 9999 from:
(SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x00000000eca353 OutDiagToCons
(SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x00000000ecd341 outDiagfExt
(SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x000000005d41ca
NewAdmSQLExecute (SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x000000005d62a3 AdmSQLExecute
(SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x000000004fa41f AdmCommandLocal
(SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x000000004fbd0c admCommand
(SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x00000000c2ecfa
SmAdminCommandThread (SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x00000000f6d8bf StartThread
(SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x007f7495472df5 *UNKNOWN*
(SESSION: 211513)
02/08/2016 08:08:44 ANR9999D Thread<4442803> 0x007f7491c841ad *UNKNOWN*
(SESSION: 211513)
02/08/2016 08:08:44 ANR0516E SQL processing for statement select process_num
as Number , substr ( process , 1 , 16 ) as process ,
SUBSTR ( CAST ( ( current_timestamp-start_time ) AS char
( 29 ) ) , 0 , 11 ) AS Runnig_time , Integer ( cast (
bytes_processed as decimal ( 18 , 0 ) ) /cast ( SECOND (
current_timestamp-start_time) as decimal ( 18 , 0 ) )
/1024/1024 ) as MB_per_sec , CAST ( cast (
bytes_processed as decimal ( 18 , 0 ) ) /cast ( SECOND (
current_timestamp-start_time) as decimal ( 18 , 0 ) )
/1024/1024/1024/1024*3600*24 as decimal ( 4 , 1 ) ) as
TB_per_day from processes failed. (SESSION: 211513)
 
Top