In the Connection tab under the Options section enable Show Detailed Error Messages to show more details about any errors generated by the DB2 database/driver. If it is enabled and an error occurs, DB2 will then call a stored procedure to get the full error message.
Pay attention to DB2 LUW, DB2 z/OS: DbVisualizer may hang when executing erroneous SQL.