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.

Using MS <strong>SQL</strong> <strong>Server</strong> and <strong>Data</strong><strong>Server</strong> options<br />

ODBC options<br />

This section provides in<strong>for</strong>mation on using various ODBC and <strong>Data</strong><strong>Server</strong> options.<br />

Transaction <strong>Management</strong>: the AUTOCOMMIT option<br />

To avoid using the MS <strong>SQL</strong> <strong>Server</strong> transaction manager, specify -Dsrv AUTOCOMMIT,1.<br />

This option exercises the <strong>OpenEdge</strong> client’s local be<strong>for</strong>e-image mechanism to manage<br />

transactions. This creates a transaction from each <strong>SQL</strong> statement that the <strong>Data</strong><strong>Server</strong><br />

issues. <strong>OpenEdge</strong> emulates the logical transaction on behalf of the application using<br />

the local be<strong>for</strong>e-image mechanism. This connection technique is useful in<br />

multi-database applications.<br />

Note: <strong>OpenEdge</strong> does not guarantee crash recovery when it uses the local<br />

be<strong>for</strong>e-image mechanism to emulate transactions.<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<br />

does not use an index to order the results. In older versions of the <strong>Data</strong><strong>Server</strong> <strong>for</strong><br />

<strong>Microsoft</strong> <strong>SQL</strong> <strong>Server</strong>, results sets were always indexed because queries and their<br />

results were gathered in segments with new cursors being generated <strong>for</strong> each query<br />

segment. However, most advanced drivers and data sources now allow a single cursor<br />

to be retained <strong>for</strong> the life of a given query, even across a transaction boundary. Drivers<br />

that can preserve cursors are allowed to execute unindexed queries if the<br />

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

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

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

client, the query 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<br />

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

actual data 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<br />

MS <strong>SQL</strong> <strong>Server</strong>. Opening a separate connection to run a query or stored procedure<br />

can provide better per<strong>for</strong>mance, although this is not guaranteed. Having too many<br />

open connections can degrade per<strong>for</strong>mance. The PRGRS_CACHE_CONN option allows<br />

you to set a limit <strong>for</strong> the maximum number of server connections available in the<br />

<strong>Data</strong><strong>Server</strong> session. If the session attempts to exceed the maximum threshold, the<br />

session will need to wait <strong>for</strong> an existing connection to complete be<strong>for</strong>e an additional<br />

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<br />

driver. This option has the following syntax:<br />

Syntax<br />

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

<strong>OpenEdge</strong> <strong>Data</strong> <strong>Management</strong>: <strong>Data</strong><strong>Server</strong> <strong>for</strong> <strong>Microsoft</strong> <strong>SQL</strong> <strong>Server</strong> 325

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

Saved successfully!

Ooh no, something went wrong!