Kedar1442 Kedar1442 - 1 year ago 111
Java Question

IBM DB2 select query not getting executed

Whenever I try to execute bellow query :

Select * from VEHICLE_INFO

I'm getting bellow exception

... Physical database connection acquired for: STAGBIG
07:19:11 [SELECT - 0 rows, 0.002 secs] 1) [Code: -551, SQL State: 42501] DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, SQLERRMC=HYUSER;SELECT;FNI.VEHICLE_INFO, DRIVER=4.19.49. 2) [Code: -727, SQL State: 56098] DB2 SQL Error: SQLCODE=-727, SQLSTATE=56098, SQLERRMC=2;-551;42501;HYUSER|SELECT|FNI.VEHICLE_INFO, DRIVER=4.19.49
... 1 statement(s) executed, 0 rows affected, exec/fetch time: 0.002/0.000 sec [0 successful, 1 errors]

Can anyone help me please?

Answer Source

The current user wan't having sufficient privileges. That is why facing the error.

Got required privilege and access now no more error.