Consultor Eletrônico



Kbase P16430: What steps occur during a schema check?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   6/4/2009
Status: Verified

GOAL:

What is a schema check in dataserver?

GOAL:

What steps occur during a schema check in dataserver?

GOAL:

What is -Dsrv skip_schema_check option?

GOAL:

What does "-Dsrv skip_schema_check" do?

FACT(s) (Environment):

DataServer
All Supported Operating Systems

FIX:

When r-code is run against a table, view, or buffer, the DataServer checks the data definitions of the foreign database to make sure they match the schema definitions in the schema holder.

A schema check is performed upon connecting to the foreign data source.

1. The r-code is loaded

2. The following SELECT is written to dataserv.lg;

SELECT * FROM table WHERE PROGRESS_RECID = :rid

or

SELECT * FROM table WHERE rowid = :rid

Here the DataServer will only parse the select statement to Oracle. The select will not be executed by foreing database. The bind variable in the WHERE clause is used to make the SQL more re-useable

3. The server will then ask ORACLE to describe the result list (odsc in V8,9, OCIStmtExecute-DescribeOnly in V10). The server will retrieve column-name, data-type and column maximum size. This list will be held on the server.

4. The server then sends only the column-name and data-type back to the client

5. The client, then, compares this information to the information within the schema holder

Please note that ORACLE sys. objects also go through a schema check, however the check is more lenient against these objects. For example, if a newer version of ORACLE may have additional columns within the sys. objects, and the schema holder was created against an older version which does not have the newer column, the DataServer will not complain about this descrepency.

The odefin () is called when the DataServer defines the values of its attributes to ORACLE. These calls are not part of the schema check. They are done if/when the SQL is about to be executed.

When ?Dsrv skip_schema_check is turned on, the order of the steps (outlined above) are reversed. In this case, the client sends column-name, data-type and column maximum size from the schema holder to the server. The server will then use this information instead, odsc() is not called in this case.