Wednesday, December 7, 2011

SQLSTATE=42501

If you get below mentioned error for DB2

42501(-551)[IBM][CLI Driver][DB2/SUN64] SQL0551N  "USER" does not have the privilege to perform operation "SELECT" on object "SCHEMA.TABLE_NAME".  SQLSTATE=42501 (0.48 secs)

As the error suggest your SQL administrator has not given privilege to perform SELECT operation on the particular table / View. Contact your SQL administrator and ask to grant privilege to perform operations on the table.