Determine the server-processing locale

The database server uses the server-processing locale to obtain locale information for its own internal sessions and for any connections.

When the database server begins execution, it initializes the server-processing locale to the default locale. When a client application requests a connection, the database server must redetermine the server-processing locale to include the client and database locales. The database server uses the server-processing locale to obtain locale information that it needs when it transfers data between the client system and the database.

After the HCL OneDB™ database server verifies the database locale, it uses a precedence of environment variables from the client and database locales to set the server-processing locale.

The database server obtains the following information from the server-processing locale:
  • Locale information for the database

    This database information includes the localized order and code set for data in columns with the locale-sensitive data types (NCHAR and NVARCHAR). The database server obtains this information from the name of the database locale that it has verified.

  • Locale information for client-application data

    This client-application information provides the display formats for date, time, numeric, and monetary data. The database server obtains this information from the client application when the client requests a connection.

The following figure shows the relationship between the client locale, database locale, server locale, and server-processing locale.
Figure 1: The server-processing locale

begin figure description - This figure is described in the surrounding text. - end figure description

Tip: The database server uses the server locale, as specified by the SERVER_LOCALE environment variable, for read and write operations on its own operating-system files. For information about operating-system files, see GLS support by HCL OneDB database servers.