Solved

explain plan

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

828 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