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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Defining the ROWID<br />

Modifying a schema holder<br />

When you create or update a schema holder, the <strong>Data</strong><strong>Server</strong> uses the following guidelines to<br />

select a column in a data source table to support the ROWID function:<br />

• If the data source table has a PROGRESS_RECID column, the <strong>Data</strong><strong>Server</strong> selects that column.<br />

A column of this type provides optimal support <strong>for</strong> the ROWID function; you cannot select<br />

an alternative to it. To create a PROGRESS_RECID column, see the “Using triggers to enable<br />

PROGRESS_RECID support of the ROWID function” section on page 7–37.<br />

• If the data source table does not have a PROGRESS_RECID column, the <strong>Data</strong><strong>Server</strong> evaluates<br />

the available indexes and selects one according to the following criteria:<br />

– The index must be defined as unique.<br />

– The index must be defined as mandatory, or at least treated as such by your<br />

application.<br />

The index selection process proceeds, according to the following order:<br />

1. If you select an index, then you must select a qualified index.<br />

2. If you do not select an index, the MS <strong>SQL</strong> <strong>Server</strong> <strong>Data</strong><strong>Server</strong> selects a qualified index<br />

based on a single-component integer.<br />

However, if the <strong>Data</strong><strong>Server</strong> determines that more than one qualified index meets the<br />

additional criterion as a single-component integer, the <strong>Data</strong><strong>Server</strong> selects the first index<br />

that fulfills the complete criteria.<br />

3. If the MS <strong>SQL</strong> <strong>Server</strong> <strong>Data</strong><strong>Server</strong> cannot find a qualified index based on a<br />

single-component integer, it seeks a qualified index that is multi-component and/or<br />

non-integer.<br />

However, if the <strong>Data</strong><strong>Server</strong> determines that more than one qualified index meets the<br />

additional criterion as multi-component and/or non-integer, the <strong>Data</strong><strong>Server</strong> selects the first<br />

index that fulfills the complete criteria.<br />

4. If the MS <strong>SQL</strong> <strong>Server</strong> <strong>Data</strong><strong>Server</strong> cannot find a qualified index that is a multi-component<br />

and/or non-integer, the task cannot be completed and ROWID support is not provided. The<br />

table will not be able to uniquely identify any records. As a result, implementing FIND<br />

statements and per<strong>for</strong>ming queries could lead to inaccuracies in locating records.<br />

Note that the indexes in this class are not mandatory; there<strong>for</strong>e, it is essential that you en<strong>for</strong>ce<br />

the column supporting ROWID as mandatory at least through code if not through definitions.<br />

The <strong>Data</strong><strong>Server</strong> allocates a buffer to hold the key in<strong>for</strong>mation <strong>for</strong> the selected RECID index. The<br />

buffer is 245 bytes by default. If the index you select <strong>for</strong> the RECID is a multi-component index,<br />

this may be inadequate. The size of the buffer can be modified with the -Dsrv<br />

ZPRGRS_RECID_BUF_SIZE,n option. See the “RECID Buffer size—the<br />

ZPRGRS_RECID_BUF_SIZE,nnn Option” section on page 8–10 <strong>for</strong> more in<strong>for</strong>mation on<br />

setting this option.<br />

Note: An index that you select as a ROWID must be defined as a unique index. It must also be<br />

mandatory, if not by definition, then by means of the application code.<br />

7–35

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

Saved successfully!

Ooh no, something went wrong!