|
Tracing Facilities
Minisoft support personnel may ask for tracing of unanticipated
conditions. This document details what features are available
for recording and how they are used. These features are
available in version 2.2.6.2 or later.
Driver (Client) Side
Tracing
Windows
There are four items on the Options Tab of the Data Source
Configuration dialog that control client tracing on Windows
based systems.
- Trace System Level
- Trace Log Level
- Trace Flush Writes
- Trace Log File Name

These items are detailed in the next section.
Unix and Java
Four values control the event recording features of the
driver. They may be set in the DSN or from the current shell.
- TraceSysLevel
- TraceLogLevel
- TraceLogFlush
- TraceFileName
TraceSysLevel (Trace System Level)
Controls the priority level of messages that are
reported to the Windows Application Event Log or Unix
syslogd. The syslogd messages are recorded to
"LOCAL6". Only messages of this value or lower, as shown
below, will be logged. The value defaults to three (3)
allowing serious errors to be recorded. (A value of
−1 will disable tracing for release versions of the
driver.)
TraceLogLevel (Trace Log Level)
Controls the priority level of messages that are
record to a log file (TraceFileName). Only messages
of this value or lower, as shown below, will be logged.
The default value is five (5). Logging will not occur
if TraceFileName is not provided. (A value of −1 will
disable tracing for release versions of the driver.)
TraceLogFlush (Trace Flush Writes)
The default value is zero (0 or not checked). Setting
this variable to one (1 or checked) will force each
message to disc before processing continues. This will
impact performance.
TraceFileName (Trace Log File Name)
Operating system dependant file name to which logging
record will be appended. You must have write access
to the file and directory. Be sure to use a fully qualified
location to write the file.
When a %p character sequence is found in the
provided file name string, the process id for the
application instance executing the driver/provider
is substituted. This permits creating a new file for
each "run".
Examples
Unix sample from the command line:
setenv TraceLogLevel 7
setenv TraceFileName /home/user/odbcfile.log
Unix sample of modified DSN (in odbc.ini):
[MSCARD]
driver = 3kodbc
Account = MINISOFT
DSN = MSCARD
Server = 192.168.23.70
Server Port = 30006
User = MGR
ImageDatabase0 = FXIJYO'OD&JXG'D'>
TraceLogLevel = 6
TraceFileName = /home/user/odbcfile.log
Modify the DSN in the Windows registry adding the two
values:
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\MSCARD]
"TraceLogLevel"="7"
"TraceFileName"="C:\ODBCLOG.LOG"
Added as connection parameters:
url = "jdbc:MSJDBC:///?"
+ "Server=192.168.23.70&"
+ "Server Port=30007&"
+ "User=MGR&"
+ "User Password=PASSWORD&"
+ "Account=MINISOFT&"
+ "TraceFileName=/opt/minisoft/SQL_jdbc0.%p.txt&"
+ "TraceLogLevel=7&"
+ "TraceLogFlush=1&"
+ "Database0=MSCARD.PUB,DOALL,1,1";
TraceFileName
When the trace file name includes the characters %p,
these two characters are replaced with the current process
ID. Use this to create separate trace files for each process
using the driver.
Logging Levels
|
Name |
Value |
Description |
| EMERG |
0 |
(not currently
used) |
| ALERT |
1 |
(not currently
used) |
| CRIT |
2 |
(not currently
used) |
| ERR |
3 |
Indicates some
failed SQL calls and communications problems. |
| WARNING |
4 |
Triggered by any
SQL error that generates a diagnostic record. |
| NOTICE |
5 |
(not currently
used) |
| INFO |
6 |
Provides details
of the which calls are made and some other important
markers. |
| DEBUG |
7 |
Shows the detailed
contents of many calls. |
Server (Host)
Side Tracing
HP3000
MSJOB supports a number of options for tracing. Using
the basic MSTRACE variable enables most processes for tracing
to the job $STDLIST file. You can limit which application
is traced by including the basic name for the application
in the MSTRACE variable:
!SETVAR MSTRACEODBCSRVR 7
This will also work for an ODBCSRVR that has been renamed.
Tracing of renamed files is based upon the original name.
MSTRACEODBC2262 will not work for an ODBCSRVR that was renamed
to ODBC2262. The output from an instance of a server
(individual connection) may be redirected. You would commonly
add the STDLIST= option to the run line for a server.
!FILE LP;DEV=LP,1
!SETVAR MSTRACEODBCSRVR 7
You can use an indirect file to start multiple instances
or versions of ODBC. The indirect file would have the following
format.
Click here for more info.
30006 0 ODBCSRVR.EXE.MINISOFT;PRI=CS S W
2260 0 ODBC2260.EXE.MINISOFT;PRI=CS;INFO=' S W'
2262 0 ODBC2260.EXE.MINISOFT;PRI=CS;STDLIST=*LP;INFO=' S
W'
In the sample above, the ODBCSRVR named ODBC2260 will
run on port 2262 and each connection will use the file equation
LP to create a spool file with output. The other ODBCSRVR
processes will trace into the job $STDLIST.
Tracing in MSJOB is documented in (MSJOB
- Configuration).
Unix
The default file name will be /opt/minisoft/odbcjdbc.%p.log,
where %p is replaced by the PIN number of the server.
In inetd.conf (HPUX)
Add a /T parameter to the end of the odbcsrvr line in
the /etc/inetd.conf file. You will have to restart inetd
to re-read the configuration file.
odbcsrvr stream tcp nowait root /opt/minisoft/odbcsrvr.exe
odbcsrvr.exe /S /T:7
As root, restart inetd using the command:
inetd -c
In /etc/xinetd.d/odbcsrvr (Linux)
Add a /T parameter to the end of the odbcsrvr line in
the /etc/inetd.conf file. You will have to restart inetd
to re-read the configuration file.
service odbcsrvr
{
port = 30006
socket_type = stream
wait = no
user = root
server = /opt/minisoft/odbcsrvr.exe
server_args = /S /W /T:7
log_on_success += DURATION USERID
log_on_failure += USERID
disable = no
}
As root, restart inetd using the command:
service xinetd reload
Using an environment file in inetd.conf
(HPUX)
Add a /E:filename parameter to the end of the odbcsrvr
line in the /etc/inetd.conf file. You will have to restart
inetd to re-read the configuration file.
odbcsrvr stream tcp nowait root /opt/minisoft/odbcsrvr.exe
odbcsrvr.exe /S /E:/opt/minisoft/odbc.cfg
/opt/minisoft/odbc.cfg
TraceLogLevel=7
TraceLogFlush=1
TraceFileName=/opt/minisoft/odbc_trace.%p.logAs root,
restart inetd using the command:
inetd -c
Using the command line
Set the environment variables as if you where configuring
for the client (see above).
- TraceSysLevel
- TraceLogLevel
- TraceLogFlush
- TraceFileName
cd /opt/minisoft
export TraceLogLevel=7
export TraceLogFlush=1
export TraceFileName=/opt/minisoft/odbcfile.%p.log
/opt/minisoft/odbcsrvr.exe /T:15 /P:30016
|