13.01.2013 Views

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

OpenEdge Data Management: DataServer for Microsoft SQL Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Connecting the <strong>Data</strong><strong>Server</strong><br />

6–18<br />

The following example shows how to use the query-tuning options to enhance per<strong>for</strong>mance.<br />

The <strong>Data</strong><strong>Server</strong> opens a separate connection to MSS (<strong>Microsoft</strong> <strong>SQL</strong> <strong>Server</strong>) <strong>for</strong> each cursor<br />

and writes an extended report on the <strong>SQL</strong> statements it executes, as shown:<br />

CONNECT holder -db infdb -dt MSS -ld demo -U user -P password -Dsrv<br />

qt_separate_connection,qt_debug,EXTENDED.<br />

<strong>OpenEdge</strong> provides a startup parameter called <strong>Server</strong> Join (-nojoinbysqldb) that controls the<br />

default JOIN–BY–<strong>SQL</strong>DB behavior. You specify this parameter in the startup command <strong>for</strong> your<br />

<strong>OpenEdge</strong> session. It overrides the JOIN–BY–<strong>SQL</strong>DB default so that the client evaluates and<br />

per<strong>for</strong>ms joins. Using this parameter might slow per<strong>for</strong>mance, but it provides results that are<br />

consistent with queries run against an <strong>OpenEdge</strong> database. See Chapter 2, “Initial Programming<br />

Considerations,” <strong>for</strong> more in<strong>for</strong>mation.<br />

Analyzing per<strong>for</strong>mance with the Enhanced Logger<br />

The Enhanced Logger infrastructure provides a means <strong>for</strong> either standard reporting of run-time<br />

activity or logging diagnostic data <strong>for</strong> troubleshooting problems based on a set of logging<br />

characteristics. The <strong>Data</strong><strong>Server</strong> can be enabled to write in<strong>for</strong>mation to a log file. You control<br />

the type and amount of in<strong>for</strong>mation logged using a combination of log entry types and logging<br />

levels. Log entry types are categories of in<strong>for</strong>mation written to the log file. Logging levels<br />

control the amount of logging in<strong>for</strong>mation <strong>for</strong> any given log entry type.<br />

The legacy qt_debug logging infrastructure only logged server in<strong>for</strong>mation but the Enhanced<br />

Logger framework <strong>for</strong> <strong>Data</strong><strong>Server</strong>s offers two logging contexts:<br />

• <strong>Server</strong> context <strong>for</strong> <strong>Server</strong>-specific log entries<br />

• Client context, which shares logging in<strong>for</strong>mation with <strong>OpenEdge</strong> clients and App<strong>Server</strong><br />

agents.<br />

LOG-MANAGER system handle attributes and methods<br />

The LOG-MANAGER system handle controls logging settings <strong>for</strong> the <strong>OpenEdge</strong> client and<br />

<strong>Data</strong><strong>Server</strong> client contexts. The LOG-MANAGER attributes and methods allow you to<br />

programmatically control the logging levels and log entry types during the execution of your<br />

program.<br />

Table 6–4 lists the function of each LOG-MANAGER system handle attribute.<br />

Table 6–4: LOG-MANAGER system handle attributes (1 of 2)<br />

Attribute Access Function<br />

ENTRY-TYPES-LIST Readable Returns a list of all valid entry types.<br />

LOG-ENTRY-TYPES Readable/Writable Returns a list of one or more types of log<br />

entries.<br />

LOGFILE-NAME Readable/Writable Returns the name of the log file.<br />

LOGGING-LEVEL Readable/Writable Returns the level at which log entries are<br />

written.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!