471,089 Members | 1,115 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,089 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 1501

Post your reply

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

Similar topics

14 posts views Thread by Ina Schmitz | last post: by
2 posts views Thread by Buck Nuggets | last post: by
2 posts views Thread by shsandeep | last post: by
1 post views Thread by vkalvakota | last post: by
2 posts views Thread by p175 | last post: by
1 post views Thread by Justin | last post: by

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.