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.

Tuning your environment with the –Dsrv startup parameter<br />

Query Result Order—the PRGRS_ALWAYS_INDEX option<br />

Some queries can gain a per<strong>for</strong>mance advantage when the result set from the query does not use<br />

an index to order the results. In older versions of the <strong>Data</strong><strong>Server</strong> <strong>for</strong> <strong>Microsoft</strong> <strong>SQL</strong> <strong>Server</strong>,<br />

results sets were always indexed because queries and their results were gathered in segments<br />

with new cursors being generated <strong>for</strong> each query segment. However, most advanced drivers and<br />

data sources now allow a single cursor to be retained <strong>for</strong> the life of a given query, even across<br />

a transaction boundary. Drivers that can preserve cursors are allowed to execute unindexed<br />

queries if the PRGRS_ALWAYS_INDEX option is set to 0 (off). When this option is off and the user<br />

does not specify an index or BY clause <strong>for</strong> the results of their ABL statement and the particular<br />

ABL being executed does not require scrolling capability in the <strong>OpenEdge</strong> client, the query<br />

result will remain unindexed by the <strong>Data</strong><strong>Server</strong>.<br />

Note: In an unindexed query, the <strong>Data</strong><strong>Server</strong> will not send an ORDER BY clause to the data<br />

source. However, the <strong>Data</strong><strong>Server</strong> has no control over whether or not the actual data<br />

source utilizes an index in order to generate a result set.<br />

Concurrent query execution—the PRGRS_CACHE_CONN option<br />

It is possible to run read-only queries in separate connections through the driver to the MS <strong>SQL</strong><br />

<strong>Server</strong>. Opening a separate connection to run a query or stored procedure can provide better<br />

per<strong>for</strong>mance, although this is not guaranteed. Having too many open connections can degrade<br />

per<strong>for</strong>mance. The PRGRS_CACHE_CONN option allows you to set a limit <strong>for</strong> the maximum number<br />

of server connections available in the <strong>Data</strong><strong>Server</strong> session. If the session attempts to exceed the<br />

maximum threshold, the session will need to wait <strong>for</strong> an existing connection to complete be<strong>for</strong>e<br />

an additional connection can be made.<br />

Connection problems—the PRGRS_CONNECT option<br />

The PRGRS_CONNECT option allows you to pass ODBC-specific in<strong>for</strong>mation to the ODBC driver.<br />

This option has the following syntax:<br />

Syntax<br />

-Dsrv PRGRS_CONNECT,connection-string;<br />

The connection string is separated from the option by a comma (,) and ends with a semicolon (;).<br />

Use the PRGRS_CONNECT option in the following cases:<br />

• To connect to a data source whose name is not allowed by <strong>OpenEdge</strong>; <strong>for</strong> example, a name<br />

that includes blank spaces, ampersands (&), commas (,), and/or carets (^). In the<br />

connection string, pass the following characters rather than the unallowed characters. The<br />

driver resolves the passed characters to the unallowed character:<br />

– Pass the ampersand (&) character as two ampersand (&&) characters<br />

– Pass the caret (^) character as two caret (^^) characters<br />

– Pass the blank space character as an ampersand and a caret (&^)<br />

– Pass the comma (,) character as a caret and ampersand (^&)<br />

• To establish complex connections that require more than the Physical <strong>Data</strong>base Name<br />

(-db), User ID (-U), and Password (-P) parameters. In all cases, the values must not be<br />

space delimited and must be passed in a single connection string.<br />

8–7

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

Saved successfully!

Ooh no, something went wrong!