473,473 Members | 2,219 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

CTE is not supported by db2advis

I am using a query into db2advis for index recommendation. this query
is having a CTE (with clause). when I run db2advis it returned some
error like

Database is reporting the following error:
excluding statement [0] from the workload.

Error. No valid statements were found in this input file or in the
workload table.

I am using following statement to run it.

db2advis -d dbname -l 1000 -n schemaname -m I -i inputfile

while this syntax is working fine for other sql statement without CTE.

please help

Thanks
Sandy
Oct 17 '08 #1
3 3212
On 17 Okt, 23:55, "sandeep.i...@gmail.com" <sandeep.i...@gmail.com>
wrote:
I am using a query into db2advis for index recommendation. this query
is having a CTE (with clause). when I run db2advis it returned some
error like

Database is reporting the following error:
excluding statement [0] from the workload.

Error. *No valid statements were found in this input file or in the
workload table.

I am using following statement to run it.

db2advis -d dbname -l 1000 -n schemaname *-m I -i inputfile

while this syntax is working fine for other sql statement without CTE.

please help
You don't mention db2 version and platform, but AFAIK it should work.
There is likely some other error in your inputfile such as a line
break, or a missing stmt terminator. If you can't find out what it is,
try posting the content of the inputfile.
/Lennart

Oct 18 '08 #2
Hi Lennart,
I will again check my query. as ialready told you it is having a
CTE expression. so it is a rather big query . which is not coming in a
single line so i am writing it in multiple lines. Is there any line
break symbol in db2. if yes please guide me. FYI i am using stmt
completion terminator. I am on db2 v8.2 on AIX.
Certainly line break is there in input file. may be that is the
reason of problem.

Thanks
Sandy
Oct 19 '08 #3
On 19 Okt, 17:30, "sandeep.i...@gmail.com" <sandeep.i...@gmail.com>
wrote:
Hi Lennart,
* * I will again check my query. as *ialready told you it is havinga
CTE expression. so it is a rather big query . which is not coming in
single line so i am writing it in multiple lines.
That is fine as long as you don't break a line in the middle of say a
table name. FWIW nothing prevents one from creating a very long
line :-)
>Is there any line
break symbol in db2. if yes please guide me. FYI i am using stmt
completion terminator. I am on db2 v8.2 on AIX.
* *Certainly line break is there in input file. may be that is the
reason of problem.
The default terminator is ; so as long as you are using that in your
file you should be fine.

Try creating a simple CTE to see whether you can get that to work
first

/Lennart

Oct 20 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: norab | last post by:
Hi, In the help here (http://publib.boulder.ibm.com/infocenter/db2help/topic/com.ibm.db2.udb.doc/admin/t0011424.htm?resultof=%22%77%6f%72%6b%6c%6f%61%64%22%20) is described that you can run the...
5
by: dotyet | last post by:
I have been given the daunting task of sql query tuning. I am looking for ways to get started with that. I am on DB2 UDB 8.2 (8.1 with Fixpak 8) on Windows. One point which I could think about...
1
by: Anurag | last post by:
Hi All, Server = DB2 ESE 8.2 on Linux, Client = DB2 Admin Client 8.2 on Windows Question = Can I execute "db2advis" from this Windows Client? Kindly see the error I receive and the setup below....
1
by: mandible | last post by:
Hello I was wondering if I"m doing something wrong with using db2advis I have 2 stored procedures are are massive, I created an input file to call both of these stored procedures and I dont' seem...
5
by: lennart | last post by:
Here's the scenario. Take backup on production machine Restore backup on development machine OS and fixpak identical, but - and I suspect this has something to do with it - the dbadm user...
2
by: hello_db2 | last post by:
hello, db2advis gave me error like execution started at timestamp 2006-11-15-09.51.37.046473 Using the default table space name USERSPACE1 Recommending indexes... Recommending MQTs......
0
by: sancho | last post by:
Hi folks: My environment: db2level: "DB2 v8.1.0.48", "s040212", "MI00069", FixPak "5". db2licm -l: DB2 Enterprise Server Edition uname -a: Linux 2.6.17-1.2187_FC5smp My question:
0
by: db2dbdba | last post by:
Hi all, I am getting the following problem when i run the db2advis. ]$ db2advis -d sample -i name3.sql -n db2inst1 -o db2advise.out 0 solutions were evaluated by the advisor exiting with...
0
by: suniltcs | last post by:
When I run DB2advis , i get below error message. ). db2advis -d aqwrwist -l -1 -s "select * from wis.cond with ur;" Using user id as default schema name. Use -n option to specify schema ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.