Oracle 参数 NLS_ISO_CURRENCY 官方解释,作用,如何配置最优化建议

本站中文解释

1、NLS_ISO_CURRENCY参数:

NLS_ISO_CURRENCY参数可以用来指定在NLS会话中使用的ISO国际货币码,它将在某些函数,比如:TO_CHAR,TO_DATE,以及货币格式中被设置和使用。NLS_ISO_CURRENCY的值必须是符合ISO 3166国家/地区代码的货币码,该货币码用来在两个字母间放置下划线(例如:US_DOLLAR)。

2、如何正确设置NLS_ISO_CURRENCY参数:

a. 查询当前NLS_ISO_CURRENCY值

可以使用 show parameter nls_iso_currency 命令查询当前NLS_ISO_CURRENCY参数的值:
SQL> show parameter nls_iso_currency

NAME TYPE VALUE
—————————— —— ——–
nls_iso_currency string USD

b. 修改NLS_ISO_CURRENCY值

可以使用 alter session set nls_iso_currency 命令修改NLS_ISO_CURRENCY参数的值::

SQL> alter session set nls_iso_currency = ‘US_DOLLAR’;

修改后可以再次查询确认其值,若为所需的值则表示修改成功:

SQL> show parameter nls_iso_currency

NAME TYPE VALUE
—————————— —— ——–
nls_iso_currency string US_DOLLAR

官方英文解释

NLS_ISO_CURRENCY determines the string to use as the international currency symbol corresponding to the C number format element in a call to the TO_CHAR function.

Property Description

Parameter type

String

Syntax

NLS_ISO_CURRENCY = territory

Default value

Derived from NLS_TERRITORY

Modifiable

ALTER SESSION

Modifiable in a PDB

Yes

Range of values

Any valid NLS_TERRITORY value

Basic

No

Local currency symbols can be ambiguous. For example, a dollar sign ($) can refer to U.S. dollars or Australian dollars. ISO Specification 4217 defines unique “international” currency symbols for the currencies of specific territories or countries. The value of the NLS_ISO_CURRENCY parameter is the Oracle name of the territory whose ISO currency symbol is returned in place of the C number format element. For example, if NLS_ISO_CURRENCY is set to AMERICA, the string ‘USD’ is returned by TO_CHAR where the C element is specified in the format.

Note:

The value of this initialization parameter NLS_ISO_CURRENCY is used to initialize the session value of this parameter, which is the actual value referenced by the SQL query processing. This initial value is overridden by a client-side value if the client uses the Oracle JDBC driver or if the client is OCI-based and the NLS_LANG client setting (environment variable) is defined. The initialization parameter value is, therefore, usually ignored.

See Also:

  • Oracle Database
    Globalization Support Guide
    for more information about this parameter

  • Oracle Database SQL
    Language Reference
    for information on number format elements


数据运维技术 » Oracle 参数 NLS_ISO_CURRENCY 官方解释,作用,如何配置最优化建议