Skip Headers

Oracle® Database Lite Oracle Lite Client Guide Release 10.3 Part Number E12548-02 |
Home | Book List | Contents | Index | Contact Us

Previous | Next
| View PDF

# A POLITE.INI Parameters for the Oracle Lite Database

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 `$ORACLE_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:

- Section A.1, "POLITE.INI File Overview"

- Section A.2, "All Databases Section"

- Section A.3, "Sample POLITE.INI File"

## A.1 POLITE.INI File Overview

The `POLITE.INI` file centralizes database volume ID assignments and defines parameters for all databases on a system. When you install Oracle Database Lite, the installation creates the `POLITE.INI` file in your Windows 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.

## A.2 All Databases Section

The `All Databases` section describes the behavior of your Oracle Lite database. The following describes these parameters:

- Section A.2.1, "CACHE_SIZE"

- Section A.2.2, "DATA_DIRECTORY"

- Section A.2.3, "DATABASE_ID"

- Section A.2.4, "DB_CHAR_ENCODING"

- Section A.2.5, "EXTERNAL_ENCRYPTION_DLL"

- Section A.2.6, "FLUSH_AFTER_WRITE"

- Section A.2.7, "MAX_INDEX_COLUMNS"

- Section A.2.8, "MAX_ROWS"

- Section A.2.9, "MESSAGE_FILE"

- Section A.2.10, "NLS_DATE_FORMAT"

- Section A.2.11, "NLS_LOCALE"

- Section A.2.12, "NLS_SORT"

- Section A.2.13, "OLITE_SERVER_LOG"

- Section A.2.14, "OLITE_SERVER_TRACE"

- Section A.2.15, "OLITE_SQL_TRACE"

- Section A.2.16, "OLITE_WRITE_VERIFY"

- Section A.2.17, "OLITE_READ_VERIFY"

- Section A.2.18, "SQLCOMPATIBILITY"

- Section A.2.19, "TEMP_DB"

- Section A.2.20, "TEMP_DIR"

- Section A.2.21, "SERVICE_PORT"

- Section A.2.22, "SERVICE_WDIR"

- Section A.2.23, "PAGE_FILL_FACTOR"

### A.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).

### A.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

### A.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.

### A.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 A-1 lists the supported code pages and their corresponding values of `DB_CHAR_ENCODING` for all supported languages.

Table A-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))

### A.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 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 Section 14.3, "Providing Your Own Encryption Module for the Client Oracle Lite Database".

### A.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.

### A.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.

### A.2.8 MAX_ROWS

This parameter only applies for WinCE only.

The number of rows displayed in the `msql` GUI tool in the tables tab. By default, this value is 20. If you want more than 20 rows displayed at a time, modify this value.

### A.2.9 MESSAGE_FILE

Use the `MESSAGE_FILE` parameter to specify the location of the message file used for the 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

### A.2.10 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.

#### A.2.10.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 A-2 lists date formats and their corresponding description.

Table A-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.

#### A.2.10.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.`

### A.2.11 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 A-3 describes the supported locale and corresponding values of the `NLS_LOCALE` setting.

Table A-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`

### A.2.12 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. Collation sequences currently supported are `BINARY` (default), `FRENCH`, `GERMAN`, `CZECH`, and `XCZECH`. You can only perform a linguistic sort on Oracle Lite databases that have the collation sequence of FRENCH, GERMAN, CZECH, OR XCZECH. You cannot do a linguistic sort on a BINARY collation sequence, which is used with all languages, except the three previously listed.

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 Section C.2, "CREATEDB" and Section 7.4, "Support for Linguistic Sort".

### A.2.13 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>

### A.2.14 OLITE_SERVER_TRACE

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

    OLITE_SERVER_TRACE = TRUE

### A.2.15 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.

To modify the working directory, see Section A.2.22, "SERVICE_WDIR".

### A.2.16 OLITE_WRITE_VERIFY

You can perform diagnostics if you experience database corruption due to file system write errors, I/O errors, or a media device problem. Setting `OLITE_WRITE_VERIFY` to `TRUE` generates error reporting if a checksum error occurs on the device for the client.

If you receive a `POL-3207` error, then you may wish to execute the `validatedb` tool to see if the error message came about because of a checksum error. The `validatedb` tool deciphers if a checksum error has occurred. To further diagnose the checksum error, you can set `OLITE_WRITE_VERIFY` to perform further diagnostics to see if it is a filesystem, I/O, or media problem. After you set this to true on the client, then all write operations are verified that the checksum is valid. If not, then an error is written to a log file named `<odb_file>.odb_fserr.log` in the same directory as the Oracle Lite database (ODB). At this point, only metadata is written to this log file. However, if the file has a size greater than zero, then you know that a checksum error has occurred and there is a problem on your client device.

Note:

Be careful in setting this parameter to `TRUE`, that you only use it while performing your diagnostic tests and that you change it back to `FALSE` when the problem is found. The error checking performed for this diagnostic effects your performance.

For example:

    OLITE_WRITE_VERIFY = TRUE

### A.2.17 OLITE_READ_VERIFY

This parameter specifies whether the checksum calculation is enabled or disabled during reading the database into the internal memory. This can be set to either TRUE or FALSE. The performance of the database improves notably if the checksum calculation is disabled.

Syntax:

    OLITE_READ_VERIFY=TRUE | FALSE

Default Value

`FALSE`

### A.2.18 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.

### A.2.19 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 with the `TEMP_DB` parameter, 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, ...

### A.2.20 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 A.2.19, "TEMP_DB" for more information.

### A.2.21 SERVICE_PORT

Syntax

    SERVICE_PORT=<port_number>

Default Value

The default port number is 1160.

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

### A.2.22 SERVICE_WDIR

Syntax

    SERVICE_WDIR=C:\WINDOWS\SYSTEM32

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

### A.2.23 PAGE_FILL_FACTOR

The page fill factor for the database can be configured with this parameter. The higher the page fill factor, the smaller is the size of the database. The optimum value for this parameter is 80. The page fill factor determines the size of the database file, the performance of the database for a full table scan and how quickly an existing table can be updated.

Syntax:

    PAGE_FILL_FACTOR=<page_fill_factor>

Default value: 80

## A.3 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