Skip Headers
Oracle® Database Lite Administration and Deployment Guide
10g (10.0.0)
Part No. B12262-01
  Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

J The Consolidator Client API (OCAPI)

This document provides a reference to the Consolidator Client API parameters, enabling you, the Administrator, to modify the settings of each parameter. Topics include:

J.1 Overview

The Consolidator Client API (OCAPI) is a set of functions that allows programs on client devices to set synchronization parameters and start a synchronization session. You can also use this API to monitor the progress of the synchronization session. OCAPI is the interface to the client side synchronization engine.

As the Administrator, you can set the OCAPI parameters to change the default behavior of OCAPI. The parameters are in the file polite.ini under the [SYNC] section on Windows 32. On Windows CE and EPOC, the file name is polite.txt. This feature is not supported on Palm.

When you set the OCAPI parameters in the file polite.ini or in the file polite.txt (or in both files), the parameter settings will be implemented for the client, based on the client platforms where the parameter settings need to apply.

An OCAPI function communicates with the Mobile Server through the selected transport means and synchronizes the local database with the remote Mobile Server. When the client application starts a synchronization session, the OCAPI parameters will be implemented.

J.2 Sync Client Parameters

The following sections list the OCAPI parameters with their corresponding description and example. OCAPI provides you with the following support functions:


Note:

OCAPI is only supported on the Windows 32, Windows CE, and EPOC platforms. On the Palm platform, the developer must set all options in the structure ocEnv. For more information, see the Oracle Database Lite Developer’s Guide.

J.2.1 TIME_LOG

This parameter enables the Administrator to record the start and end time of a synchronization operation. If this parameter is set, OCAPI creates a table called C$SYNC_TIME in the conscli.odb file. This file logs the duration of every synchronization process. OCAPI inserts a record in the C$SYNC_TIME table which stores the start and end time of every synchronization operation. Setting this parameter enables the Administrator to maintain a log history of synchronization times.

Example

TIME_LOG=1

The above value creates a table called C$SYNC_TIME and inserts one row containing the start and end time of the synchronization process.

Default Value

0

The above value indicates that the timelog feature is off.

J.2.2 UPDATE_LOG

This parameter enables the Administrator to set the update log file. If this parameter is set, OCAPI creates a table called C$UPDATE_LOG in the conscli.odb file. For every DML operation received from the server, OCAPI records each operation in the C$UPDATE_LOG table. Each record contains three entries namely Table Name, Client Side Row ID, and the Log Action Type. The Table Name refers to the table that the operation is performed on. The Client Side Row ID (C$UID) is a record pointer that points to the record's Row ID. Type refers to the type of DML operation such as update, insert, and delete.

Example

UPDATE_LOG=1

The above value creates and inserts rows in the C$UPDATE_LOG file.

Default Value

0

J.2.3 COMPRESSION

This parameter enables the administrator to set compression limits for data transmissions. The client dictates if the transmitted data is compressed or not. If the data transmitted by the client to the server is compressed, the client receives compressed data from the server.

Example

COMPRESSION=1

This parameter invokes the compression feature.

Default Value

1

The above value indicates that the compression feature is on.

J.2.4 DEBUG

This parameter enables the Administrator to view debugging messages that are sent to the file debug.txt. This file includes the database name, table names, and the DML operation. When this parameter is set to 1, the debug information regarding the database name, table names, and the DML operation goes into the file debug.txt. This enables OCAPI to invoke debugging messages.

Default Value

0

J.2.5 AUTO_COMMIT_COUNT

This parameter enables the Administrator to invoke the automatic commit count feature. If this parameter is set to 0, OCAPI calls a commit count at the end of processing for each publication. If this parameter is set to 1000, OCAPI calls commits for every 1000 inserts. This parameter must be used only during the complete refresh process of the system.

Default Value

0 for Win32

250 for WinCE

J.2.6 TEMP_DIR

This parameter enables the Administrator to set a directory for temporary file creation. OCAPI creates a temporary file for saving retrieved data. The Administrator can also specify the directory for the temporary file. When a large volume of data is being synchronized, the data received in the temporary file can be written to a flash card to save the system's memory. This feature is beneficial for WinCE developers.

Example

TEMP_DIR=\Storage Card

OCAPI creates a temporary file on the storage card of the Windows CE application. It saves the main memory allocated for the application.

J.2.7 RESUME_CLIENT_TIMEOUT

This parameter enables the Administrator to set the total number of seconds that the client should use to resume network timeout operations.

Default Value

60 seconds

Example

RESUME_CLIENT_TIMEOUT=120

J.2.8 RESUME_CLIENT_MAXSEND

This parameter enables the Administrator to set the maximum data size in kilo bytes sent by a client in a single POST request. Some proxies maintain fixed limits on data size in one request.

Default Value

1MB (1024KB)

Example

RESUME_CLIENT_MAXSEND=2048

J.2.9 ERROR_REPORT

This parameter enables the Administrator to set client synchronization report results for the server.

If set to 0, reports errors to the server during the next synchronization process.

If set to 1, reports errors and creates an extra connection to the server.

If set to 2, reports synchronization success or error cases and creates an extra connection to the server.

Default Value

0

Example

ERROR_REPORT=2

J.2.10 DB_ENCODING

This parameter enables the Administrator to specify client DB character encoding. This parameter value is the same as values used in Java character encoding. For more information about Java encoding, refer the following URL.

http://java.sun.com/j2se/1.3/docs/guide/intl/encoding.doc.html

This character encoding affects CHAR and VARCHAR datatypes inside client snapshot tables only.

Default Value

NULL

The default value indicates a native character set.

J.2.11 MEM_THRESHOLD

This parameter enables the Administrator to set the memory threshold value in bytes during synchronization. OCAPI stops synchronization operations when the available memory is less than the specified value. Under low memory conditions, applications can be unstable on a Windows CE device. By using this parameter's settings, OCAPI prevents low memory conditions. If the available memory is lower than this value, OCAPI displays an error message.

Default Value

524288 (512 KB)

J.2.12 VALIDATEDB

This parameter enables the Administrator to validate the Oracle Lite database, using the validatedb.exe after the synchronization process. When an error is reported by the validatedb.exe, OCAPI reports the error to the server. You can set this parameter value from 0 to 100. If set to 100, OCAPI runs the validatedb.exe for every synchronization process. If set to 50, OCAPI runs the validatedb.exe for every alternate synchronization process. If set to 1, OCAPI runs the validatedb.exe, once for every 100 synchronization processes.

Default Value

0

J.2.13 ENCRYPDB

This parameter enables the Administrator to encrypt the Oracle database, using the encrypdb.exe after synchronization. If set to 2, the encrypdb.exe runs after every synchronization process. If set to 1, the encrypdb.exe runs only when a new Oracle Lite database (ODB) file is created.

Default Value

0