Home

Getting Started

Utilities

Indexing

Omnidex

Development

Tutorials

Quick Links

 

Development

Debugging

Environment Variable

SET Command Option

Debugging Options

Examples

 

Development

 

OMNIDEX_DEBUG

Debugging can be turned on in two ways:

 

Environment Variable

The OMNIDEX_DEBUG option environment variable can be set on the server to aid in debugging an application.

  • Server-only applications should set turn on debugging prior to starting the application.
  • Client-server applications should set this variable prior to starting the Omnidex Network Server listener that will be used by the client application.

By default, the debugging information is output to a text file, odxdebug.log, located in the current working directory. The current working directory is the same location that the connected Omnidex environment file is located.

The output file name and location can be overridden in one of two ways: Using the FILE=filename option with the OMNIDEX_DEBUG setting, or setting the OMNIDEX_DEBUG_FILE="filename" environment variable at the same time as the OMNIDEX_DEBUG environment variable. The alternate location in either case must be on the server.

Several options, also known as profiles, are provided for use with the OMNIDEX_DEBUG environment variable, to limit debugging information to where the problem lies. For example, if the application connects to an Oracle database and the error is an Oracle error, use the DATABASE profile to return only database debugging information.

Multiple profiles can be passed in a single, comma separated setting.

See Options (below) for a complete list of valid debugging options or Examples (below) for examples showing how to turn on debugging using an environment variable.

 

SET Command Option

Omnidex supports the SQL SET OMNIDEX_DEBUG option to turn on debugging from within an Omnidex application. This option can be passed anywhere that a SQL SELECT statement can also be passed including a client ODBC or JDBC application, a server or client OmniAccess API application through oaexecsql, and the Omnidex utility ODXSQL.

The SET command does not return any data. The debugging information is output to a text file on the server in the current working directory. This is the same location that the connected Omnidex Environment file is located.

The option FILE=filename can be used to override the output file name and location. However, the alternate location must be on the server.

Several options, also known as profiles, are provided for use with the OMNIDEX_DEBUG environment variable, to limit debugging information to where the problem lies. For example, if the application connects to an Oracle database and the error is an Oracle error, use the DATABASE profile to return only database debugging information.

Multiple profiles can be passed in a single, comma separated setting.

See Options (below) for a complete list of valid debugging options or Examples (below) for examples showing how to turn on debugging using the SET command.

 

Options

All of the following options are valid for turning on debugging using an environment variable or through a SQL SET command.

ON | OFF - Off by default. Enables general debugging for oa routines. It is not necessary to set debugging ON if using any of the other options below (FILE excepted). See Examples (below) for details on using these settings.

DATABASE - Provides additional debugging information pertaining to the database interaction.

FILESYSTEM - Provides additional debugging information pertaining to issues with files or the file system.

OPTIMIZER - Provides additional debugging information pertaining to the optimizer.

QUALIFY - Provides additional debugging information pertaining to oaqualify and the QUALIFY command.

SELECT - Provides additional debugging information pertaining to oaselect and the SELECT command.

UPDATE - Provides additional debugging information pertaining to oaupdate and the UPDATE command.

CONNECT - Provides additional debugging information pertaining to oaconnect and the CONNECT command.

KERNEL - Provides additional debugging information pertaining problems with the Omnidex Kernel.

FILE=filename - Writes the debug output to the specified filename. Default output goes to odxdebug.log. Can also override the output destination with the OMNIDEX_DEBUG_FILE environment variable.

EXCEPTIONS - Locate an error in a long complex sequence of steps. Outputs the exception and the sequence of steps leading up to the exception.

ALL - Output ALL debug information for ALL of the above profiles. CAUTION: The output will be very large. Use this option ONLY if you really need it!

 

Examples

Environment Variables

Unix

export OMNIDEX_DEBUG="SELECT"
export OMNIDEX_DEBUG_FILE="../logs/salesdebug.log"

Windows

set OMNIDEX_DEBUG="DATABASE,FILE="c:\omnidextest\logs\salesdebug.log"

 

SQL SET Option

SET OMNIDEX_DEBUG ON

 

 

 

 

Top