473,785 Members | 2,272 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

explain - invalid token

Hi,
I'm new in db2, I'm trying to execute EXPLAIN command on some queries
but i have error like: [Error Code: -104, SQL State: 42601]
[SQL0104]
And message similar to: Token EXPLAIN is not valid, valid tokens ( END
GET SET CALL DROP FREE HOLD LOCK OPEN WITH ALTER.
I've created tables explain_*
How can I start to find solution? Is it possible that my db2 doesn't
support explain?

greetings

Mar 31 '07 #1
5 8108
ka******@gmail. com wrote:
Hi,
I'm new in db2, I'm trying to execute EXPLAIN command on some queries
but i have error like: [Error Code: -104, SQL State: 42601]
[SQL0104]
And message similar to: Token EXPLAIN is not valid, valid tokens ( END
GET SET CALL DROP FREE HOLD LOCK OPEN WITH ALTER.
I've created tables explain_*
How can I start to find solution? Is it possible that my db2 doesn't
support explain?

greetings
Not sure what you mean by EXPLAIN. You could either use an explain
utility from the control center (dont know where that might be though).
If I remember correctlt you mark a query and rightclick with the mouse
and choose explain. Or you could run explain as in:

db2 "explain plan for select ...."

and then format the output with

db2exfmt -d <db....

Which version of explaing are you having problems with?

Mar 31 '07 #2
On 31 Mar, 12:46, Lennart <erik.lennart.j ons...@gmail.co mwrote:
kabot...@gmail. com wrote:
I'm new in db2, I'm trying to execute EXPLAIN command on some queries
but i have error like: [Error Code: -104, SQL State: 42601]
[SQL0104]
And message similar to: Token EXPLAIN is not valid, valid tokens ( END
GET SET CALL DROP FREE HOLD LOCK OPEN WITH ALTER.
I've created tables explain_*

Not sure what you mean by EXPLAIN. You could either use an explain
utility from the control center (dont know where that might be though).
If I remember correctlt you mark a query and rightclick with the mouse
and choose explain. Or you could run explain as in:

db2 "explain plan for select ...."

and then format the output with

db2exfmt -d <db....

Which version of explaing are you having problems with?
I'm executing following query: "explain plan for select * from
tabname" from DbVisualizer precisely (db client on winxp), and all i
got is mentioned error.
btw. thanks for interest, i spent many hours trying to optimize one
query and i hope that created plan would be helpful

Mar 31 '07 #3
ka******@gmail. com wrote:
[...]
I'm executing following query: "explain plan for select * from
tabname" from DbVisualizer precisely (db client on winxp), and all i
got is mentioned error.
btw. thanks for interest, i spent many hours trying to optimize one
query and i hope that created plan would be helpful
I see, well I have no knowledge on DbVisualizer but should you really
put "explain pln for " in your query? I would have guessed that you
execute the query: select * from T, and then open "explain part" of the
DbVisualizer.

Judging from what drivers suggested at DbVisualizer homepage, they talk
jdbc with the database and as far as I know, explain plan is not part of
what can be sent through jdbc.
/Lennart

Mar 31 '07 #4
On 31 Mar, 13:16, Lennart <erik.lennart.j ons...@gmail.co mwrote:
kabot...@gmail. com wrote:

[...]
I'm executing following query: "explain plan for select * from
tabname" from DbVisualizer precisely (db client on winxp), and all i
got is mentioned error.

Judging from what drivers suggested at DbVisualizer homepage, they talk
jdbc with the database and as far as I know, explain plan is not part of
what can be sent through jdbc.
Maybe you're right but i didn't find any article about explain in
http://publib.boulder.ibm.com/infoce...v5r3/index.jsp so
maybe i have to solve my problem without plan.
btw. join with 2 tables on about 1mln and 2mln records on indexed cols
shouldn't take 20 secs right? i 'm start thinking i do this better in
mysql :) (my everyday db)
greetz and thanks

Mar 31 '07 #5
ka******@gmail. com wrote:
[...]
Maybe you're right but i didn't find any article about explain in
http://publib.boulder.ibm.com/infoce...v5r3/index.jsp so
maybe i have to solve my problem without plan.
Are you using the free version of DbVisualizer? I got the impression
that you have to pay a licence fee to get access to the explain facility
in DbVisualizer. Dont you have a db2 control center to use instead (I
dont know anything about v5r3 either)
btw. join with 2 tables on about 1mln and 2mln records on indexed cols
shouldn't take 20 secs right? i 'm start thinking i do this better in
mysql :) (my everyday db)
Perhaps mysql have improved in later versions. Earlier, one of the most
common question on usenet regarding mysql was: how do I do this in
mysql, and one of the most common answers: you cant :-)
greetz and thanks
Mar 31 '07 #6

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

Similar topics

14
20396
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 EXPLAIN_STATEMENT and EXPLAIN_INSTANCE exist. With VESAMPL.DDL, I loaded the predefined execution plans. In the next step, I'ld like to display the loaded access plans. So, I right clicked on "Show Explained Statements History" and got the result:
6
3155
by: Affan Syed | last post by:
I am not able to figure out exactly what this macro is doing. Can one of the gurus around here decipher this? #define sei() __asm__ __volatile__ ("sei" ::) PS: It is from the avr-libc interrupt.h and it should set a partilcular interrrupt. Thanks.
3
2723
by: Twanger | last post by:
I'm getting a compiler error on my ASP.NET page and I can't see the cause. I have a simple C# class compiled into a DLL and placed in my bin directory which has a public property QuestionText. When I try and set the property the compiler throws up Compiler Error Message: CS1519: Invalid token '=' in class, struct, or interface member declaration If I don't try and set the property it prints out the default value of the property fine.
0
5700
by: Ben Holness | last post by:
Hi all, I have a system which allows users to enter a message on a (PHP) website. This message is then put into a (MySQL) Database. A perl script then picks up the message and creates an XML document. The webpages, database and XML are all UTF-8, however every now and then I get an error in the XML parser that tells me I have an invalid token. This occurs when the message contains particular characters, although I don't
3
1543
by: Andy Sutorius via DotNetMonster.com | last post by:
With this line (asp.net/c#): colNameVal = System.Configuration.ConfigurationSettings.AppSettings; I get "invalid token '=' in declaration". I also get it for "invalid token ';' in declaration". I don't understand what the compiler is trying to say. Can you clarify/solve? -- Message posted via DotNetMonster.com http://www.dotnetmonster.com/Uwe/Forums.aspx/asp-net/200601/1
9
2703
by: Nelmr1 | last post by:
I'm using 2002.Net, 1.0 framwork. I am basically learning C# so I wrote this and get invalid token errors. Does anyone see why? using System; namespace ConsoleApplication2 {
4
7341
by: jvictor118 | last post by:
I've been using the xml.sax.handler module to do event-driven parsing of XML files in this python application I'm working on. However, I keep having really pesky invalid token exceptions. Initially, I was only getting them on control characters, and a little "sed -e 's/ ]/ /g' $1;" took care of that just fine. But recently, I've been getting these invalid token excpetions with n-tildes (like the n in España), smart/fancy/curly quotes and...
9
2164
by: Sebouh | last post by:
I'm very close of shooting myself in the head right now. Why in hell does free(xx) give me an error: *** glibc detected *** free(): invalid pointer: 0x08ce6158 *** // The function returns something like the argv parameter in main. char** parser (char* ch) { char** xx = NULL; char* temp; // contains the input which will be modified when using strtok int length = strlen (ch); // length of the string char* token;
3
4680
by: brad | last post by:
This works: This does not (one the end, 09 is used instead of 9) File "<stdin>", line 1 area_group = {001:06, 002:04, 003:04, 006:09} SyntaxError: invalid token Why does 09 cause an invalid token while 9 does not?
0
10356
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10098
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9958
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8986
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7506
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6743
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5390
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4058
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 we have to send another system
2
3662
muto222
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.