Solved

explain plan

Posted on 2007-11-14
6
2,544 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
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:Kdo
Kdo 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

914 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now