Language-Dependent Behavior Specification


To specify how the database will act and react to language-dependent actions, it is important to have a method of control over the way the database will behave under given conditions. These behaviors are wide and varied but are controlled in three simple ways: initialization parameters, environment variables, and the ALTER SESSION command.

Initialization Parameters

There are two primary initialization parameters (each with its own subparameters) that you can use to assist you with different ways that your database will deal with different aspects of multilingual actions. These are NLS_LANGUAGE and NLS_TERRITORY.

NLS_LANGUAGE

The NLS_LANGUAGE parameter provides you with the ability to specify the way that language will be handled in messages, day and month names, month abbreviations, and symbols that are date and time related (for example, A.D., B.C., a.m., and p.m.). It also controls the default sorting mechanism for character data. If not specified otherwise, NLS_LANGUAGE defaults to AMERICAN. NLS_LANGUAGE has two subparameters:

  • NLS_DATE_LANGUAGE explicitly changes the language used for day and month names and their abbreviations and for the spelled-out values for other date format elements. This parameter defaults to AMERICAN.

  • NLS_SORT gives you the ability to change the linguistic sort sequence that Oracle uses to sort character data values. The valid values for this parameter must be the name of a linguistic sort sequence. NLS_SORT defaults to BINARY.

NLS_LANGUAGE determines the default values for NLS_DATE_LANGUAGE and NLS_SORT.

NLS_TERRITORY

The NLS_TERRITORY parameter allows you to control day and week numbering, the default date format, the decimal character, group separator, and the default ISO and local currency symbols for your database.

NLS_TERRITORY has the following subparameters:

  • NLS_CURRENCY allows you to explicitly specify a new local currency symbol. NLS_CURRENCY defaults to "$".

  • NLS_ISO_CURRENCY allows you to explicitly specify the territory whose ISO currency symbol should be used. NLS_ISO_CURRENCY defaults to AMERICA.

  • NLS_DATE_FORMAT allows you to explicitly specify the new default date format, and the value must be a date format model. NLS_DATE_FORMAT defaults to DD-MON-RR.

  • NLS_NUMERIC_CHARACTERS allows you to explicitly specify a new decimal character and group separator character. NLS_NUMERIC_CHARACTERS defaults to "." for the decimal indicator and "," for the group separator.

  • NLS_DUAL_CURRENCY supports the euro. In January 1999, the new currency for the European union, known as the euro, made its world debut. To extend support for this new currency, Oracle added dual currency support. The new initialization parameter associated to this new support is the NLS_DUAL_CURRENCY. NLS_DUAL_CURRENCY sets an alternative currency symbol for the user session.

The following territories have the euro symbol added for dual currency support: Austria, Italy, Belgium, Luxembourg, Denmark, Netherlands, Finland, Portugal, France, Spain, Germany, Sweden, Greece, United Kingdom, and Ireland.

The ISO character sets have specified code points for the euro symbol. These settings are all enabled at the session level (meaning that they are dynamic initialization parameters) and, therefore, provide you the flexibility to allow for the storage of information from France at the same time as you are allowing data to be accessed and stored from Greece, Germany, Spain, and the United States.

Okay, but how do we set these parameters with environment variables?



    Oracle 9i Fundamentals I Exam Cram 2
    Oracle 9i Fundamentals I Exam Cram 2
    ISBN: 0789732653
    EAN: 2147483647
    Year: 2004
    Pages: 244
    Authors: April Wells

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net