Page 1 of 1
Web service generation for DB2 table

Posted:
April 15th, 2010, 12:14 pm
by donald_abbot
I am trying to create a webservice that will retrieve data from a table on DB2Express on the same Windows machine. The table is one from the sample WORLD database. When I select the table and click on the "Import" button I get a message saying:
Webservice 'CITY_SYSTEM' not created due to: Thu Apr 15 12:44:58.00210822, pid 00000300, tid 00000800, ERROR: in file ..\v001\src\adaptorImpl.cpp, at line 7031. adaptorImpl::workerProcessOdbcDiagnostics() returned -11000, indicating ODBC API "SQLExecDirect"
I cannot tell from this what is the error.
Donald
Re: Web service generation for DB2 table

Posted:
April 15th, 2010, 2:08 pm
by BrianReynolds
Donald,
Is that the entire error message? It looks like it has been truncated in some way?
In the meantime, I'll check our DB2 installation and see what other information I can get.
Re: Web service generation for DB2 table

Posted:
April 15th, 2010, 2:41 pm
by BrianReynolds
As this is an ODBC error, can you turn on ODBC tracing ? You can do this using the "Data Source (ODBC)" dialog.
See screenshot
Re: Web service generation for DB2 table

Posted:
April 16th, 2010, 9:24 am
by donald_abbot
Hello Brian
Yes, that is the entire error message. I followed your suggestion about switching ODBC tracing on and found the following in the log file:
SQLGetDiagRecW( pszSqlState="42501", pfNativeError=-551, pszErrorMsg="[IBM][CLI Driver][DB2/NT] SQL0551N "SYSTEM" does not have the required authorization or privilege to perform operation "SELECT" on object "SYSTEM.CITY". SQLSTATE=42501
", pcbErrorMsg=171 )
<--- SQL_SUCCESS
At least I now know what the problem is.
Donald
Re: Web service generation for DB2 table

Posted:
April 16th, 2010, 10:59 am
by BrianReynolds
I know John had some issues with the DB2 credentials, but I can't remember what he did to turn this off. In a demo environment, it is probably best just to switch off security credentials

You can access and modify the current authorities by right-clicking your DB in the DB2 Control Centre, and selecting "Authorities"
E.g.
Re: Web service generation for DB2 table

Posted:
April 16th, 2010, 12:43 pm
by donald_abbot
Thank you, Brian. That solves that problem. All we need is an easier way of seeing the error message.
Re: Web service generation for DB2 table

Posted:
April 16th, 2010, 12:46 pm
by BrianReynolds
Yeah - normally ODBC should report these, but we don't interpret them, we just bump that error message back up to the user. But it seems in this case the DB2 ODBC layer is being an ass. It could be a consequence of the DB2 Express version unfortunately.