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."
DB2 connectivty problem
-
- Premium Member
- Posts: 87
- Joined: Mon Feb 18, 2008 3:58 pm
- Location: Sacramento, CA
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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
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.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Premium Member
- Posts: 87
- Joined: Mon Feb 18, 2008 3:58 pm
- Location: Sacramento, CA