DB2 connectivty problem

This forum contains ProfileStage posts and now focuses at newer versions Infosphere Information Analyzer.

Moderators: chulett, rschirm

Post Reply
BradMiller
Premium Member
Premium Member
Posts: 87
Joined: Mon Feb 18, 2008 3:58 pm
Location: Sacramento, CA

DB2 connectivty problem

Post by BradMiller »

I am trying to connect to DB2 database table using DB2 Enterprise stage,we have set the env variables in dsenv and able to read from some of the DB2 database tables but for others though we are able to import view the table data at import by plug-in metadata,we are not able to view the data when we try to write a query selecting single column.It throws the following error "DB2_Configure..DB2_UDB_API_6: [IBM][CLI Driver][DB2] SQL0206N "DSN8710.DEPT.DEPTNO" is not valid in the context where it is used. SQLSTATE=42703

DSTAGE-DB2CLI-0027`:`SQLExecDirect: Error executing statement 'SELECT DSN8710.DEPT.DEPTNO FROM PDB2.DSN8710.DEPT '. See following DB2 message for details.
DB2_Configure..DB2_UDB_API_6.DSLink1: DSP.Open GCI $DSP.Open error -100."
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is the schema name truly PDB2? Is the owner name truly DSN8710? Is the table name really DEPT? Is there really a column named DEPTNO in the DEPT table?

What happens if you do not qualify the column name? For example

Code: Select all

SELECT DEPTNO FROM PDB2.DSN8710.DEPT ;
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
BradMiller
Premium Member
Premium Member
Posts: 87
Joined: Mon Feb 18, 2008 3:58 pm
Location: Sacramento, CA

Post by BradMiller »

Thanks Ray for your input.Its the problem with the code generated by SQL Builder in DB2 API stage.When you write a user defined sql it works.
Post Reply