Solved

explain plan

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 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

21 Experts available now in Live!

Get 1:1 Help Now