Search This Blog

Sunday, February 4, 2007

Overview

Setting NLS Parameters
NLS parameters determine the locale-specific behavior on both the client and the server.
As initialization parameters on the server
You can include parameters in the initialization parameter file to specify a default session NLS environment. These settings have no effect on the client side; they control only the server's behavior. For example:

As environment variables on the client

With the ALTER SESSION statement
Choosing a Locale with the NLS_LANG Environment Variable
It sets the language and territory used by the client application. It also sets the client's character set, which is the character set for data entered or displayed by a client program.
NLS_LANG = language_territory.charset
Should the NLS_LANG Setting Match the Database Character Set?
NLS_LANG is set as a local environment variable on UNIX platforms.

NLS_LANG is set in the registry on Windows platforms.

NLS Database Parameters
You can find the values for NLS parameters by using:

NLS Data Dictionary Views --->NLS_DATABASE_PARAMETERS
NLS Dynamic Performance Views--->V$NLS_VALID_VALUES,V$NLS_PARAMETERS
OCINlsGetInfo() Function

NLS_LANGUAGE
The default value of NLS_LANGUAGE may be specific to the operating system. You can alter the NLS_LANGUAGE parameter by changing its value in the initialization parameter file and then restarting the instance.

NLS_TERRITORY
NLS_TERRITORY specifies the conventions for the following default date and numeric formatting characteristics:

Date format
Decimal character and group separator
Local currency symbol
ISO currency symbol
Dual currency symbol
First day of the week
Credit and debit symbols
ISO week flag
List separator

NLS_DATE_FORMAT
The NLS_DATE_FORMAT parameter defines the default date format to use with the TO_CHAR and TO_DATE functions.
The NLS_TERRITORY parameter determines the default value of NLS_DATE_FORMAT.

NLS_DATE_LANGUAGE
The NLS_DATE_LANGUAGE parameter specifies the language for the day and month names produced by the TO_CHAR and TO_DATE functions. NLS_DATE_LANGUAGE overrides the language that is specified implicitly by NLS_LANGUAGE.

Unicode Support
You can create a Unicode database that enables you to store UTF-8 encoded characters as SQL CHAR datatypes
You can support multilingual data in specific columns by using Unicode datatypes. You can store Unicode characters into columns of the SQL NCHAR datatypes regardless of how the database character set has been defined. The NCHAR datatype is an exclusively Unicode datatype.

Consider the following questions when you choose an Oracle character set for the database:
What languages does the database need to support now?

What languages does the database need to support in the future?

Is the character set available on the operating system?

What character sets are used on clients?

How well does the application handle the character set?

What are the performance implications of the character set?

What are the restrictions associated with the character set?

No comments: