473,396 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Visual Explain Error (SQL0104N) on Query Rewrite

Hi,
I am using DB2 V9.1.300.257 on Windows. When I try to get the visual explain plan for a query from the command editor, it gives the following error:

[IBM][CLI Driver][DB2/NT] SQL0104N An unexpected token "WITH SNAPSHOT" was found following "LAIN PLAN SELECTION ". Expected tokens may include: "FOR". SQLSTATE=42601


After some struggle, I figured out that this seems to happen when the optimizer is re-writing the base query to use an MQT. I confirmed this by checking the plan from db2exfmt. If I drop the MQT (and make NO other changes), the visual plan is generated without any problems. Is this a known bug or is there a workaround?

In any case, I thought it is worth posting here in case someone else faces the same error.

Regards,
Ramakrishna
Oct 9 '07 #1
0 1595

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Greg Stark | last post by:
This query is odd, it seems to be taking over a second according to my log_duration logs and according to psql's \timing numbers. However explain analyze says it's running in about a third of a...
14
by: Ina Schmitz | last post by:
Hello all, I don't succeed in displaying the explain plan. I use IBM DB2 Universal Database 8.2. I tried to do the example given in the online help for "Visual Explain". The tables...
2
by: Buck Nuggets | last post by:
Since upgrading to db2 8.2.1 I've been having odd problems with visual explain: 1. tables appear to require schema prefixes: SQL0204N "BUCK.DIM_SENSOR" is an undefined name. SQLSTATE=42704...
2
by: shsandeep | last post by:
CREATE FUNCTION MYSCHEMA.FUNCTION1(SEQNAME VARCHAR(100)) RETURNS CHAR(100) LANGUAGE SQL MODIFIES SQL DATA ------------------------------------------------------------------------ -- SQL UDF...
1
by: vkalvakota | last post by:
Hi, I am getting the following error when i am trying to create a view. But if i run the select statement independently it is working fine. Please help me it is very urgent. ...
2
by: p175 | last post by:
Every time I try to run visual explain in v9 Express C I am getting the following error: SQL0104N An unexpected token "WITH SNAPSHOT" was found following "LAIN PLAN SELECTION ". Expected...
0
by: ALLYWEIR | last post by:
Hi, I am trying to create a partitoned table using the following:- CREATE TABLE ORDERS(ID INT, SHIPDATE DATE) PARTITION BY RANGE(SHIPDATE) ( STARTING '1/1/2006' ENDING...
1
by: Justin | last post by:
We had a load that failed. Now we have a pending load. When executing load terminate, we receive the following error: db2 load terminate SQL0104N An unexpected token "terminate" was found...
2
by: kya2 | last post by:
I am not able to create following store procedure. CREATE PROCEDURE DBSAMBA.InsertDeleteBatch(OUT norows INT ) RESULT SETS 1 LANGUAGE SQL BEGIN part1 DECLARE TOTAL_LEFT INT DEFAULT 0; ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.