dbTalk Databases Forums  

iq log probs (that come from ASA)

sybase.public.sqlanywhere.general sybase.public.sqlanywhere.general


Discuss iq log probs (that come from ASA) in the sybase.public.sqlanywhere.general forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
_alan
 
Posts: n/a

Default iq log probs (that come from ASA) - 12-09-2003 , 12:00 PM






all (sybase engineers),

SQL LOG file:

1. the beginning of each line has a month and day (mm/dd)
but no year

2. in a line such as this:

03/11 15:01:27.973 ** REQUEST conn: 3395308656 STMT_PREPARE
[large string unavailable]

what is the point of "[large string unavailable]" for large
SQL statements when the large string appears on the next
line?

3. in a line such as this:

03/11 15:03:17.042 ** REQUEST conn: 3394897520 STMT_EXECUTE
Stmt=-1

what is mean by "Stmt=-1"? if this means an error occurred
then how come error messages don't *always* appear after
this line? it is very unclear which actual "Stmt" this line
is associated with

4. in a line such as this:

03/11 15:03:17.042 ** WARNING conn: -900069776 code: 111
"Statement cannot be executed"

why is the "conn:" ID negative and completely different from
the "conn:" ID used for the associated connection? there is
no "Stmt=####" on this line so it makes it really hard to
find out which statement failed this line is associated with

5. on any line that contains "STMT_EXECUTE_ANY_IMM" there is
no closing double quote for the SQL statement

6. it is really hard to figure out precisely how long a SQL
statement took to execute because STMT_DROP lines only
happen when the user initiates the next action (e.g. commit,
disconnect, execute next query, etc...)




IQMSG file:

1. when a user connects, a message like this one appears:

2003-03-11 15:04:30 0000000754 Connection handle is :
296270459. SA connID: 3. User Name is : jsmith.

what does the "SA connID" represent?




thx,

_alan

Reply With Quote
  #2  
Old   
Reg Domaratzki
 
Posts: n/a

Default Re: iq log probs (that come from ASA) - 12-10-2003 , 12:11 PM






I can't answer all your questions, but I'll answer a few.

--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup

iAnywhere Developer Community : http://www.ianywhere.com/developer
ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set "Platform Preview" and "Time Frame" to ALL

<_alan> wrote

Quote:
all (sybase engineers),

SQL LOG file:

1. the beginning of each line has a month and day (mm/dd)
but no year
That's correct. The chance of the year changing while logging was small
enough that we deicded to omit it and save some disk space.

Quote:
2. in a line such as this:

03/11 15:01:27.973 ** REQUEST conn: 3395308656 STMT_PREPARE
[large string unavailable]

what is the point of "[large string unavailable]" for large
SQL statements when the large string appears on the next
line?
The point is that the engine had to do make two calls to execute this single
command. The engine knew a statement was being prepared and prepared the
memory, but had to make a seperate read from the client to get the actually
statement text. If the SQL being prepared was under a certain threshold, it
would have been prepared in a single step.

Quote:
3. in a line such as this:

03/11 15:03:17.042 ** REQUEST conn: 3394897520 STMT_EXECUTE
Stmt=-1

what is mean by "Stmt=-1"? if this means an error occurred
then how come error messages don't *always* appear after
this line? it is very unclear which actual "Stmt" this line
is associated with
I *THINK* that stmt=-1 indicates an internal connection from within the
engine. It might be an event executing for example.

Quote:
4. in a line such as this:

03/11 15:03:17.042 ** WARNING conn: -900069776 code: 111
"Statement cannot be executed"

why is the "conn:" ID negative and completely different from
the "conn:" ID used for the associated connection? there is
no "Stmt=####" on this line so it makes it really hard to
find out which statement failed this line is associated with

5. on any line that contains "STMT_EXECUTE_ANY_IMM" there is
no closing double quote for the SQL statement

6. it is really hard to figure out precisely how long a SQL
statement took to execute because STMT_DROP lines only
happen when the user initiates the next action (e.g. commit,
disconnect, execute next query, etc...)




IQMSG file:

1. when a user connects, a message like this one appears:

2003-03-11 15:04:30 0000000754 Connection handle is :
296270459. SA connID: 3. User Name is : jsmith.

what does the "SA connID" represent?




thx,

_alan



Reply With Quote
  #3  
Old   
_alan
 
Posts: n/a

Default Re: iq log probs (that come from ASA) - 12-11-2003 , 09:37 AM



reg,

thx for ur responses but there is no hope of the sql log
improving is there? this is the only source for doing query
statistics and it (the sql log) is not robust enough to do
proper statistics

things like not putting the year in because the chances of
it not being needed were small? i think thats a very poor
assumption ... even if the logs are cleared every week what
if the new year happens in the middle of a week? and i've
also seen a log file (one file) that contains 5 years worth
of sql log, i've never seen a log file (for any program)
where the year was missing, if taking up unnecessary disk
space is an issue then removing those unnecessay astericks
"**" on every line would be a better choice

there's so many holes that it's really hard to parse this
log file

thx

_alan



Quote:
I can't answer all your questions, but I'll answer a few.

--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer
Version 8 Please reply only to the newsgroup

iAnywhere Developer Community :
http://www.ianywhere.com/developer ASA Patches and EBFs :
http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set "Platform Preview" and "Time Frame" to ALL

_alan> wrote in message
news:3fd60db7.9d0.846930886 (AT) sybase (DOT) com... all (sybase
engineers),
SQL LOG file:

1. the beginning of each line has a month and day
(mm/dd) but no year

That's correct. The chance of the year changing while
logging was small enough that we deicded to omit it and
save some disk space.

2. in a line such as this:

03/11 15:01:27.973 ** REQUEST conn: 3395308656
STMT_PREPARE [large string unavailable]

what is the point of "[large string unavailable]" for
large SQL statements when the large string appears on
the next line?

The point is that the engine had to do make two calls to
execute this single command. The engine knew a statement
was being prepared and prepared the memory, but had to
make a seperate read from the client to get the actually
statement text. If the SQL being prepared was under a
certain threshold, it would have been prepared in a single
step.

3. in a line such as this:

03/11 15:03:17.042 ** REQUEST conn: 3394897520
STMT_EXECUTE Stmt=-1

what is mean by "Stmt=-1"? if this means an error
occurred then how come error messages don't *always*
appear after this line? it is very unclear which actual
"Stmt" this line is associated with

I *THINK* that stmt=-1 indicates an internal connection
from within the engine. It might be an event executing
for example.

4. in a line such as this:

03/11 15:03:17.042 ** WARNING conn: -900069776 code: 111
"Statement cannot be executed"

why is the "conn:" ID negative and completely different
from the "conn:" ID used for the associated connection?
there is no "Stmt=####" on this line so it makes it
really hard to find out which statement failed this line
is associated with
5. on any line that contains "STMT_EXECUTE_ANY_IMM"
there is no closing double quote for the SQL statement

6. it is really hard to figure out precisely how long a
SQL statement took to execute because STMT_DROP lines
only happen when the user initiates the next action
(e.g. commit, disconnect, execute next query, etc...)




IQMSG file:

1. when a user connects, a message like this one
appears:
2003-03-11 15:04:30 0000000754 Connection handle is :
296270459. SA connID: 3. User Name is : jsmith.

what does the "SA connID" represent?




thx,

_alan



Reply With Quote
  #4  
Old   
Reg Domaratzki
 
Posts: n/a

Default Re: iq log probs (that come from ASA) - 12-11-2003 , 10:08 AM



Enhancements to the product can always be made at
sybase.public.sqlanywhere.product_futures_discussi on. To say that there's
no hope of the log ever getting better is absolutely ridiculous.

--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup

iAnywhere Developer Community : http://www.ianywhere.com/developer
ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set "Platform Preview" and "Time Frame" to ALL

<_alan> wrote

Quote:
reg,

thx for ur responses but there is no hope of the sql log
improving is there? this is the only source for doing query
statistics and it (the sql log) is not robust enough to do
proper statistics

things like not putting the year in because the chances of
it not being needed were small? i think thats a very poor
assumption ... even if the logs are cleared every week what
if the new year happens in the middle of a week? and i've
also seen a log file (one file) that contains 5 years worth
of sql log, i've never seen a log file (for any program)
where the year was missing, if taking up unnecessary disk
space is an issue then removing those unnecessay astericks
"**" on every line would be a better choice

there's so many holes that it's really hard to parse this
log file

thx

_alan



I can't answer all your questions, but I'll answer a few.

--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer
Version 8 Please reply only to the newsgroup

iAnywhere Developer Community :
http://www.ianywhere.com/developer ASA Patches and EBFs :
http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set "Platform Preview" and "Time Frame" to ALL

_alan> wrote in message
news:3fd60db7.9d0.846930886 (AT) sybase (DOT) com... all (sybase
engineers),
SQL LOG file:

1. the beginning of each line has a month and day
(mm/dd) but no year

That's correct. The chance of the year changing while
logging was small enough that we deicded to omit it and
save some disk space.

2. in a line such as this:

03/11 15:01:27.973 ** REQUEST conn: 3395308656
STMT_PREPARE [large string unavailable]

what is the point of "[large string unavailable]" for
large SQL statements when the large string appears on
the next line?

The point is that the engine had to do make two calls to
execute this single command. The engine knew a statement
was being prepared and prepared the memory, but had to
make a seperate read from the client to get the actually
statement text. If the SQL being prepared was under a
certain threshold, it would have been prepared in a single
step.

3. in a line such as this:

03/11 15:03:17.042 ** REQUEST conn: 3394897520
STMT_EXECUTE Stmt=-1

what is mean by "Stmt=-1"? if this means an error
occurred then how come error messages don't *always*
appear after this line? it is very unclear which actual
"Stmt" this line is associated with

I *THINK* that stmt=-1 indicates an internal connection
from within the engine. It might be an event executing
for example.

4. in a line such as this:

03/11 15:03:17.042 ** WARNING conn: -900069776 code: 111
"Statement cannot be executed"

why is the "conn:" ID negative and completely different
from the "conn:" ID used for the associated connection?
there is no "Stmt=####" on this line so it makes it
really hard to find out which statement failed this line
is associated with
5. on any line that contains "STMT_EXECUTE_ANY_IMM"
there is no closing double quote for the SQL statement

6. it is really hard to figure out precisely how long a
SQL statement took to execute because STMT_DROP lines
only happen when the user initiates the next action
(e.g. commit, disconnect, execute next query, etc...)




IQMSG file:

1. when a user connects, a message like this one
appears:
2003-03-11 15:04:30 0000000754 Connection handle is :
296270459. SA connID: 3. User Name is : jsmith.

what does the "SA connID" represent?




thx,

_alan





Reply With Quote
  #5  
Old   
Graeme Perrow
 
Posts: n/a

Default Re: iq log probs (that come from ASA) - 12-11-2003 , 12:34 PM





Reg Domaratzki wrote:
Quote:
3. in a line such as this:

03/11 15:03:17.042 ** REQUEST conn: 3394897520 STMT_EXECUTE
Stmt=-1

what is mean by "Stmt=-1"? if this means an error occurred
then how come error messages don't *always* appear after
this line? it is very unclear which actual "Stmt" this line
is associated with

I *THINK* that stmt=-1 indicates an internal connection from within
the engine. It might be an event executing for example.
No, what this means is that the client sent the prepare AND the execute
statements in a single packet. The "normal" way to do things would be
for the client to send the prepare statement, receive a statement handle
from the engine, then send an execute statement with the statement
handle. In some cases, we can optimize this by sending the prepare
statement, and at the same time, sending the execute statement with a
handle of -1, meaning "the statement just prepared on this connection".

--
Graeme Perrow
Senior Software Developer
gperrow (AT) ianywhere (DOT) com
iAnywhere Solutions Inc.
A Sybase company

Whitepapers, TechDocs, bug fixes are all available through the iAnywhere
Developer Community at http://www.ianywhere.com/developer/



Reply With Quote
  #6  
Old   
Graeme Perrow
 
Posts: n/a

Default Re: iq log probs (that come from ASA) - 12-11-2003 , 12:39 PM




Just clarifying what I wrote in my previous post - there are lots of
"statements" in there.

The "normal" way to do things would be for the client to send the
prepare command, received a statement handle from the engine, then send
an execute command with the statement handle. In some cases, we can
optimize this by sending the prepare command, and at the same time,
sending the execute command with a handle of -1, meaning "the statement
just prepared on this connection".

--
Graeme Perrow
Senior Software Developer
gperrow (AT) ianywhere (DOT) com
iAnywhere Solutions Inc.
A Sybase company

Whitepapers, TechDocs, bug fixes are all available through the iAnywhere
Developer Community at http://www.ianywhere.com/developer/


Reply With Quote
  #7  
Old   
_alan
 
Posts: n/a

Default Re: iq log probs (that come from ASA) - 12-17-2003 , 03:17 PM



yeah but what if there are multiple statements on this
connection? how would u know which "statement" that line
applies to? Stmt=-1 completely hides WHICH "statement" it is
associated with

-alan




Quote:
Just clarifying what I wrote in my previous post - there
are lots of "statements" in there.

The "normal" way to do things would be for the client to
send the prepare command, received a statement handle
from the engine, then send an execute command with the
statement handle. In some cases, we can optimize this by
sending the prepare command, and at the same time,
sending the execute command with a handle of -1, meaning
"the statement just prepared on this connection".

--
Graeme Perrow
Senior Software Developer
gperrow (AT) ianywhere (DOT) com
iAnywhere Solutions Inc.
A Sybase company

Whitepapers, TechDocs, bug fixes are all available through
the iAnywhere Developer Community at
http://www.ianywhere.com/developer/


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.