H POLITE.INI Parameters

You can customize Oracle Database Lite by modifying the parameter values defined in your POLITE.INI file, which is available in Windows under %WINDIR%\POLITE.INI and in Linux under $OLITE_HOME/bin. You must have write permissions on the directory where this file is located to be able to modify the POLITE.INI file.


Note:

On the WinCE and EPOC platforms, this file is named POLITE.TXT, so that you can double-click on it to open the file.

The following discusses the parameters in the different sections in the POLITE.INI file:

H.1 POLITE.INI File Overview

The POLITE.INI file centralizes database volume ID assignments, defines parameters for all databases on a system, and defines synchronization parameters. When you install Oracle Database Lite, the installation creates the POLITE.INI file in your Windows 98, NT, 2000, or XP home directory. On Windows CE and EPOC, the file name is POLITE.TXT.

The installation automatically sets the parameters in your POLITE.INI file, but you can modify them to customize the product behavior. To modify the POLITE.INI file, use an ASCII text editor.

H.2 All Databases Section

The following describes the parameters in the [All Databases] section of the POLITE.INI file.

H.2.1 CACHE_SIZE

Specifies the size of the object cache in kilobytes. The minimum is 128. If not set, the default is 4096 (4 megabytes).

H.2.2 DATA_DIRECTORY

On the WinCE platform, you may wish to define where the Oracle Lite database is installed. By default, the storage card is used—to preserve memory—and the storage card with the maximum free space is used. At least 32 MB of free space must be available. If there is not enough memory on the storage card, then the directory defaults to \Orace. If you want to specify the directory where the database is created, specify the directory in the DATA_DIRECTORY parameter, as follows:

DATA_DIRECTORY=\Orace

To synchronize, run msync.exe.

H.2.3 DATABASE_ID

Defines the next Database Volume ID number to be assigned the CREATE DATABASE SQL command. DATABASE_ID numbers must be unique for each database file on the system.

H.2.4 DB_CHAR_ENCODING

Specifies the Oracle Database Lite character set. If set to NATIVE, the default is the system default character set.

Table H-1 lists the supported code pages and their corresponding values of DB_CHAR_ENCODING for all supported languages.

Table H-1 Supported Code Pages and Values

Code Page DB_CHAR_ENCODING Language
N/A UTF8 All languages
(1250) ee8mswin1250 (Croatian, Czech, Hungarian, Polish, Romanian, Slovak, and Slovenian)
(1251) c18mswin1251 (Bulgarian, Russian, and Ukranian)
(1252) we8mswin1252 (English (United States), Catalan, Danish, Dutch (Netherlands), English (United Kingdom), Finish, French (France), German (Germany), Icelandic, Italian (Italy), Malay (Malaysia), Norwegian (Bokmal), Portuguese (Brazil), Portuguese (Portugal), Spanish (Mexico), Spanish (Spain), and Swedish)
(1253) el8mswin1253 (Greek)
(1254) tr8mswin1254 (Turkish)
(1255) iw8mswin1255 (Hebrew)
(1256) ar8mswin1256 (Arabic (Egypt), and Arabic (UAE))
(1257) blt8mswin1257 (Estonian and Lithuanian)
(932) ja16sjis (Japanese)
(936) zhs16gbk (Chinese (PRC) and Chinese (Singapore))
(949) ko16mswin949 (Korean)
(950) zht16mswin950 (Chinese (Taiwan) and Chinese (Hong Kong))

H.2.5 EXTERNAL_ENCRYPTION_DLL

You can plug-in a custom encryption module for the Oracle Lite database by adding the EXTERNAL_ENCRYPTION_DLL parameter to the POLITE.INI configuration file. Use this if you do not want to use the default AES encryption provided for the Mobile client database.

You must either implement your encryption module into a DLL for the Windows environment or into a Shared Object (.SO) for the UNIX environment.

For example, if you created the encryption module as a DLL called my_enc.dll, which is located in the C:\my_dir directory, then you would add this module as the default encryption module in the POLITE.INI configuration file, as follows:

[All Databases]
EXTERNAL_ENCRYPTION_DLL=C:\my_dir\my_enc.dll

For more information, see the "Encryption Module" section in the Security chapter of the Oracle Database Lite Developer's Guide.

H.2.6 FLUSH_AFTER_WRITE

Syntax

FLUSH_AFTER_WRITE=TRUE|FALSE

Default Value

FALSE

By default, the parameter FLUSH_AFTER_WRITE is disabled. Hence, writes to a database are not flushed. The last write operation during a COMMIT operation always flushes file buffers, thereby eliminating the danger of losing data. For devices that are unreliable, users can enable this flag and set the parameter to TRUE. When enabled, every write action flushes file buffers. However, this setting degrades the database COMMIT performance.


Note:

This parameter applies to the WinCE platform only.

H.2.7 MAX_INDEX_COLUMNS

Defines the number of columns used in the index creation statement. For more information, see Index Creation Options, in the Oracle Database Lite SQL Reference.

H.2.8 MESSAGE_FILE

Use the MESSAGE_FILE parameter to specify the location of the message file used for the Mobile client Oracle Lite database. The default is where the binaries are installed. You may want to modify where the message file is located if you want to test another language. Modifying the MESSAGE_FILE parameter means that you do not have to move files around to test other languages.

Configure the path and the name of the message file, as follows:

MESSAGE_FILE=C:\Olite\Mobile\Sdk\BIN\OLITE40.MSB

H.2.9 NLS_DATE_FORMAT

Allows you to use a date format other than the Oracle Database Lite default. When a literal character string appears where a date value is expected, the Oracle Database Lite tests the string to see if it matches the formats of Oracle, SQL-92, or the value specified for this parameter in the POLITE.INI file. Setting this parameter also defines the default format used in the TO_CHAR or TO_DATE functions when no other format string is supplied.

For Oracle, the default is dd-mon-yy or dd-mon-yyyy. For SQL-92, the default is yy-mm-dd or yyyy-mm-dd.

Using RR in the format forces two digit years less than or equal to 49 to be interpreted as years in the 21st century (2000–2049), and years 50 and over, as years in the 20th century (1950–1999). Setting the RR format as the default for all two digit year entries allows you to become year-2000 compliant. For example,

NLS_DATE_FORMAT='RR-MM-DD'

You can also modify the date format using the ALTER SESSION command. For more information, see the Oracle Database Lite SQL Reference.

H.2.9.1 Date Format

A date format includes one or more of the elements listed in the following table. Elements that represent similar information cannot be combined, for example, you cannot use SYYYY and BC in the same format string. Table H-2 lists date formats and their corresponding description.

Table H-2 Date Formats

Format Description
AM or P.M. Meridian indicator, periods are optional.
PM or P.M. Meridian indicator, periods are optional.
CC or SCC Century, "S" prefixes BC dates with "-".
D Day of week.
DAY Name of day, padded with blanks to length of 9 characters.
DD Day of month (1-31).
DDD Day of year (1-366).
DY Abbreviate name of day.
IW Week of year (1-52 or 1-53) based on the ISO standard.
IYY, IY, or I Last 3, 2, or 1 digit(s) of the ISO year, respectively.
IYYY 4-digit year, based on the ISO standard.
HH or HH12 Hour of the day (1-12).
HH24 Hour of the day (0-23).
MI Minute (0-59).
MM Month (01-12, for example, JAN=01).
MONTH Name of the month, padded with blanks to length of 9 characters.
MON Abbreviated name of the month.
Q Quarter of the year, (1,2,3,4, for example, JAN-MAR=1).
RR Last 2 digits of the year, for years in other countries. This forces two-digit years less than or equal to 49 to be interpreted as years in the 21st century (2000-2049), and years 50 and over, as years in the 20th century (1950-1959).
WW Week of the year (1-53), where 1 starts on the first day of the year and continues to the seventh day of the year.
SS Second (0-59).
SSSSS Seconds past midnight (0-86399).
Y or YYY Year with comma in this position.
YEAR or SYEAR Year, spelled out. "S" prefixes BC dates with "-".
YYYY or SYYYY 4-digit year. "S" prefixes BC dates with "-".
YYY, YY, or Y Last 3, 2, or 1 digit(s) of the year.

H.2.9.2 Date Format Examples

Listed below are sample variations of the NLS_DATE_FORMAT parameter.

  1. YYYY-MONTH-DAY:HH24:MI:P.M.

  2. YYYY/MONTH/DD, HH24:MI A.M.

  3. YYYY-MONTH-DAY:HH24:MI:PM

  4. MM D, YYY, HH:MI A.M.

  5. MM, WW, RR, HH:MI A.M.

  6. MM, IW, RR, HH:M1 A.M.

  7. MM, DY, RR, HH:MI A.M.

  8. MM; DY; IYY, HH:MI A.M.

  9. MON WW, RR, HH:MI A.M.

  10. MONTH.DD, SYYYY, HH:MI A.M.

  11. MONTH/DD, YYYY, HH:MI A.M.

  12. MONTH|DD, YYYY, HH:MI A.M.

  13. MONTH DD, YYYY, HH:SSSSS:MI A.M.

  14. MONTH DD, HH:SS::MI CC

  15. MONTH DD, HH:SS:MI SCC

  16. MONTH W, YYYY, HH:MI A.M.

  17. MONTH WW, YYYY, HH:MI A.M.

  18. MONTH WW, RR, HH:MI A.M.

  19. MONTH WW, Q, HH:MI A.M.

  20. MONTH WW, RR, HH:MI A.M.

H.2.10 NLS_LOCALE

Defines the NLS_LOCALE parameter in the POLITE.INI file to specify the locale data of Oracle Database Lite. Oracle Database Lite locale data includes the following items:

  • Decimal character and group separator

  • Locale currency symbol and ISO currency symbol

  • Day, week, month names, and their abbreviations

For example, NLS_LOCALE=FRENCH_FRANCE specifies the locale data of FRENCH_FRANCE in Oracle Database Lite. Table H-3 describes the supported locale and corresponding values of the NLS_LOCALE setting.

Table H-3 Supported Locales and Values

Locale NLS_LOCALE
English (United States) AMERICAN_AMERICA
Arabic (Egypt) ARABIC_EGYPT
Arabic (UAE) ARABIC_UNITED ARAB EMIRATES
Bulgarian BULGARIAN_BULGARIA
Catalan CATALAN_CATALONIA
Chinese (PRC) SIMPLIFIED CHINESE_CHINA
Chinese (Singapore) SIMPLIFIED CHINESE_SINGAPORE
Chinese (Taiwan) TRADITIONAL CHINESE_TAIWAN
Chinese (Hong Kong) TRADITIONAL CHINESE_HONG KONG
Croatian CROATIAN_CROATIA
Czech CZECH_CZECH REPUBLIC
Danish DANISH_DENMARK
Dutch (Netherlands) DUTCH_THE NETHERLANDS
English (United Kingdom) ENGLISH_UNITED KINGDOM
Estonian ESTONIAN_ESTONIA
Finnish FINNISH_FINLAND
French (France) FRENCH_FRANCE
German (Germany) GERMAN_GERMANY
Greek GREEK_GREECE
Hebrew HEBREW_ISRAEL
Hungarian HUNGARIAN_HUNGARY
Icelandic ICELANDIC_ICELAND
Italian (Italy) ITALIAN_ITALY
Japanese JAPANESE_JAPAN
Korean KOREAN_KOREA
Lithuanian LITHUANIAN_LITHUANIA
Malay (Malaysia) MALAY_MALAYSIA
Norwegian (Bokmal) NORWEGIAN_NORWAY
Polish POLISH_POLAND
Portuguese (Brazil) BRAZILIAN PORTUGUESE_BRAZIL
Portuguese (Portugal) PORTUGUESE_PORTUGAL
Romanian ROMANIAN_ROMANIA
Russian RUSSIAN_CIS
Slovak SLOVAK_SLOVAKIA
Slovenian SLOVENIAN_SLOVENIA
Spanish (Mexico) MEXICAN SPANISH_MEXICO
Spanish (Spain) SPANISH_SPAIN
Swedish SWEDISH_SWEDEN
Turkish TURKISH_TURKEY
Ukrainian UKRANIAN_UKRAINE

H.2.11 NLS_SORT

This parameter can be used to define the collation sequence for databases created on the Oracle Database Lite instance. Collation is referred as ordering strings into a culturally acceptable sequence. A collation sequence is a sequence of all collation elements from an alphabet from the smallest collation order to the largest.

NLS_SORT=[collation sequence]

When this parameter is used, all databases created with the CREATEDB command line utility or those that are replicated from the Mobile Server are enabled for the collation sequence unless a different collation sequence is specified when using the utility. Languages currently supported are BINARY (default), FRENCH, GERMAN, CZECH, and XCZECH.


Note:

Unless you require your databases to have linguistic sort enabled for a supported collation sequence, it is recommended that you use the CREATEDB utility with the NLS_SORT <collation sequence> parameter, which overrides this POLITE.INI parameter. Setting the NLS_SORT using the POLITE.INI file means that your databases have the specified collation sequence enabled. There is currently no way to convert a database from one collation sequence to another.

For a complete description of this feature, see the CREATEDB Section in the "Database Tools and Utilities For Win32 and WinCE Platforms" Appendix and the "Support for Linguistic Sort" Section in the "Oracle Lite RDBMS" Chapter in the Oracle Database Lite Developer's Guide.

H.2.12 OLITE_SERVER_LOG

The server log file contains the status of oldaemon processes including start, launch time, abort time, and executed processes. If any errors occurred, then the exception information is included. To forward all log information for a Multi-User Service on a LINUX machine, designate the filename of the logfile, as follows:

OLITE_SERVER_LOG = <path_and_filename>

H.2.13 OLITE_SERVER_TRACE

To debug the multi-user service, set this parameter to true, as follows:

OLITE_SERVER_TRACE = TRUE

See the "Debugging the Multi-User Service" section in the Oracle Database Lite Getting Started Guide for more information.

H.2.14 OLITE_SQL_TRACE

Generates the SQL statement text, compilation time, execution plan, and the bind value.

For example:

OLITE_SQL_TRACE = TRUE

SQL trace output is dumped to a trace file named oldb_trc.txt in the current working directory of the database process. For a database service on Windows, Windows NT or the Oracle Database Lite daemon for a Linux platform, the current working directory is specified by the wdir parameter during the database startup service or daemon. Applications that use an embedded connection to connect to the database contain a working directory. This working directory is the application working directory. To implement the tracing feature, the database process must contain permissions to create the trace file in the current working directory. The trace output is always included in the trace file. If the trace file does not exist, it is created automatically.

H.2.15 SQLCOMPATIBILITY

Oracle Database Lite supports both Oracle SQL and SQL-92 features. For more information on Oracle SQL and SQL-92, see the Oracle Database Lite SQL Reference.

If there is a conflict between Oracle SQL and SQL-92, the SQLCOMPATIBILITY flag is referenced. If you specify ORACLE for the parameter, Oracle SQL is favored, and if you specify SQL92, SQL-92 is favored. If you do not include this parameter in the POLITE.INI, Oracle SQL is favored, by default.

H.2.16 TEMP_DB

The temporary database is created by default in virtual memory. This improves the performance of some queries that require the use of temporary tables. Unless you explicitly choose to create the temporary database in the file system, the poltempx.odb files are not created. The *.slx files that are sometimes used to store savepoint information are also not created. If you plan to create a large result set, you must either have enough swap space to hold the result, or choose the file option for the temporary database.

You can specify that the temporary database files are written to the file system either with the TEMP_DB or TEMP_DIR parameters. The TEMP_DB parameter enables you to define the name of the database files; the TEMP_DIR parameter allows you only to specify the directory to which the temporary database files are written.

To include this option, use the following syntax in the POLITE.INI file.

TEMP_DB=<path_and_temporary_database_name>

For example,

TEMP_DB=c:\temp\olite_

As a result of the example setting, Oracle Database Lite creates temporary databases as given below.

c:\temp\olite_0.odb, c:\temp\olite_1.odb, ...

H.2.17 TEMP_DIR

Specifies the directory where the temporary database poltemp.odb is created. If not set, the default is any TEMP, TMP or WINDIR setting defined in your environment. See Section H.2.16, "TEMP_DB" for more information.

H.2.18 SERVICE_PORT

Syntax

SERVICE_PORT=<port_number>

Default Value

1531

Modify the default port of the multi-user service with this parameter.

H.3 Sync Client Parameters—SYNC Section

Modify the SYNC section in the POLITE.INI file to control certain synchronization (OCAPI) functions. The following sections list the OCAPI parameters with their corresponding description and an example. OCAPI provides you with the following support functions:

  • Enable the caller to start the synchronization process from the client side.

  • Set flags for the synchronization session.

  • Save user information locally.


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.

H.3.1 Overview of OCAPI—msync Client API

The msync 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. When you set the OCAPI parameters in the POLITE.INI file, then the parameter settings are implemented for the client on the first synchronization—based on the client platforms where the parameter settings need to apply.

An OCAPI function communicates with the Mobile Server through the selected transport and synchronizes the local database with the remote Mobile Server.

H.3.2 Synchronization Parameters

The following are synchronization parameters that you can modify:

H.3.2.1 TIME_LOG

Record the start and end time of a synchronization operation. 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. The administrator can 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.

H.3.2.2 UPDATE_LOG

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

H.3.2.3 COMPRESSION

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.

H.3.2.4 DEBUG

View debugging messages that are sent to the debug.txt file, which 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 debug.txt file. This enables OCAPI to invoke debugging messages.

Default Value

0

H.3.2.5 AUTO_COMMIT_COUNT

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

H.3.2.6 TEMP_DIR

Specify a directory for temporary files. OCAPI creates a temporary file for saving retrieved data. 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 system 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.

H.3.2.7 RESUME_CLIENT_TIMEOUT

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

H.3.2.8 RESUME_CLIENT_MAXSEND

Set the maximum data size in KiloBytes 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

H.3.2.9 ERROR_REPORT

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

H.3.2.10 DB_ENCODING

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.

H.3.2.11 MEM_THRESHOLD

Set memory threshold value in bytes for 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. OCAPI can prevent low memory conditions if you define the threshold correctly. If the available memory is lower than this value, OCAPI displays an error message.

Default Value

524288 (512 KB)

H.3.2.12 VALIDATEDB

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

H.3.2.13 ENCRYPT_DB

By default, the Oracle Lite database used by the Mobile client is not encrypted. However, you can ask for it to be encrypted through the ENCRYPT_DB parameter.


Note:

This parameter encrypts the database using the synchronization parameter.

  • If set ENCRYPT_DB to 0, encryption is not executed. The database is left in whatever current state it is in.

  • If set ENCRYPT_DB to 1, encryption of the database is executed only when a new Oracle Lite database (ODB) file is created. This is the preferred method if you want an encrypted database. Thus, the database is only encrypted when it is created.

  • If set ENCRYPT_DB to 2, encryption of the database runs after every synchronization process. If you already have a database that is not encrypted, then you would want to set ENCRYPT_DB to 2, perform a synchronization—after which, the database is encrypted—and then set ENCRYPT_DB back to 1. This way, the database is encrypted, but is not encrypted after every synchronization, which would be a performance hit.

To encrypt an Oracle Lite database used by an embedded application, use the encrypb executable that is described in the "Oracle Lite Database Utilities" Appendix in the Oracle Database Lite Developer's Guide.

Default Value

0

H.4 Device Parameters—DMC Section

Do not modify any of the parameters in the DMC section. The only way to effect the values in this section is to modify an INF file for your device, as described in Chapter 8, "Manage Your Devices".

H.5 Sample POLITE.INI File

The following content is displayed from a sample POLITE.INI file.

[All Databases]
DATABASE_ID=128
DB_CHAR_ENCODING=NATIVE
CACHE_SIZE=4096
MAX_INDEX_COLUMNS=5
SQLCOMPATIBILITY=SQL92
NLS_DATE_FORMAT=RR/MM/DD H24,MI,SS
NLS_LOCALE=ENGLISH
TEMP_DB=c:\temp\olite_
TEMP_DIR=D:\TMP

[SYNC]
TIME_LOG=1
UPDATE_LOG=0