Solved

explain plan

Posted on 2007-11-14
6
2,596 Views
Last Modified: 2008-09-17
i use aqua data studio 4.7.2 to see explain plan, but i get below error:

 Describe Error: Failed to execute EXPLAIN plan: DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704, SQLERRMC: USER.DUAL

0
Comment
Question by:aaaaaa
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 37

Accepted Solution

by:
momi_sabag earned 25 total points
ID: 20287351
that means that your query raised a -204 sqlcode which means that you use a table that does not exists, in this case, the table name is USER.DUAL

if your sql does not reference table USER.DUAL but reference table DUAL, than you are probably running with the user USER.
if you have the DUAL table in some other schema, for example, test, you can refer to it in the sql as TEST.DUAL and that should fix your problem
0
 
LVL 5

Expert Comment

by:ocgstyles
ID: 20288291
Hi,

In case you are trying to select from dual, like you can do in Oracle, DB2 has a special table for for that purpose too.  That table is SYSIBM.SYSDUMMY1.

Keith
0
 
LVL 45

Assisted Solution

by:Kent Olsen
Kent Olsen earned 25 total points
ID: 20288767
Hi aaaaaa,

One more thing -- the Explain Plan portion of Aqua Data Studios can be a bit of a nuisance.

If you set the tool to use a schema other than the default, the Explain Plan process often fails due to DB2 not creating/writing the explain tables in the chosen schema.  If you experience this, rerun the query from the default schema, modifying the SQL to reference the correct schema, if necessary.


Good Luck,
Kent
0
 
LVL 4

Author Comment

by:aaaaaa
ID: 20289398
kdo,

correct i am using another schema.
is there meaning cannot use other schema except then the default?
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
AS400 DAYOFWEEK(GENERAL DATE) 12 427
Guide to DB2 SQL pl programming 3 229
Connect SQL Developer to zO/S DB2 database 6 356
find age for two dates 5 79
November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question