Solved

explain plan

Posted on 2007-11-14
6
2,650 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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

623 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