![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
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 |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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 |
#5
| |||
| |||
|
|
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. |
#6
| |||
| |||
|
#7
| |||
| |||
|
|
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/ |
![]() |
| Thread Tools | |
| Display Modes | |
| |