Set a nondefault locale

By default, HCL OneDB™ products use the U.S. English locale, but HCL OneDB products support many other locales.

To use a nondefault locale, you must set the following environment variables:
  • Set the CLIENT_LOCALE environment variable to specify the appropriate client locale.

    If you do not set CLIENT_LOCALE, the client locale is the default locale, U.S. English.

  • Set DB_LOCALE on each client computer to specify the database locale for a client application to use when it connects to a database.

    If you do not set DB_LOCALE on the client system, the client application sets DB_LOCALE to the client locale. This default value avoids the need for the client application to perform code-set conversion.

    You might also want to set DB_LOCALE on the server computer so that the database server can perform operations such as the creation of databases (when the client does not specify its own DB_LOCALE).

  • Set the SERVER_LOCALE environment variable to specify the appropriate server locale.

    If you do not set SERVER_LOCALE, the server locale is the default locale, U.S. English.

To access a database that has a nondefault locale, the CLIENT_LOCALE and DB_LOCALE settings on the client system must support this nondefault locale. Both locales must be the same, or their code sets must be convertible, as described in Perform code-set conversion.

For example, to access a database with a Japanese SJIS locale, set both DB_LOCALE and CLIENT_LOCALE to ja_jp.sjis on the client system. (If you set DB_LOCALE but not CLIENT_LOCALE, the client application returns an error, because it cannot set up code-set conversion between the SJIS database code set and the code set of the default locale on the client system.)

When a client application requests a connection, the database server uses information in the client, database, and server locales to create the server-processing locale. For more information, see Establish a database connection.