LANG and NLS_LANG are the most common in setting Linux environment variables. What is the difference between LANG and NLS_LANG? Here's an example to give you a difference and compare them together.
LANG is set for language, region, character set of Linux systems, applications under linux effective, such as date; NLS_LANG is for Oracle language, region, set the character set of oracle Valid in
For example:
The code is as follows:
export LANG=zh_CN.GB2312
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
$export LANG=zh_CN.GB2312
$date
Tuesday, November 27th, 2012 16:20:35 CST
The display is in Chinese.
The code is as follows:
$export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
$sqlplus /as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Nov 27 16:19:03 2012
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL select sysdate from Dual;
SYSDATE
------------
27-NOV-12
shows the English environment, But only for the ORACLE program.
The LANG system for environment variables has the following main items:
The code is as follows:
[root@blliu tmp]# locale
LANG =zh_CN.gb2312
LC_CTYPE=“zh_CN.gb2312”
LC_NUMERIC=“zh_CN.gb2312”
LC_TIME=“zh_CN.gb2312”
LC_COLLATE=“zh_CN.gb2312”
LC_MONETARY=“zh_CN.gb2312”
LC_MESSAGES=“zh_CN.gb2312”
LC_PAPER=“zh_CN. Gb2312”
LC_NAME=“zh_CN.gb2312”
LC_ADDRESS=“zh_CN.gb2312”
LC_TELEPHONE=“zh_CN.gb2312”
LC_MEASUREMENT=“zh_CN.gb2312”
LC_IDENTIFICATION=“zh_CN.gb2312”
LC_ALL=
LC_ALL is not set here, if it is set, all settings above If it is invalid, the system will read LC_ALL.
locale -a View local character set
locale -m View all supported character sets
Check NLS_LANG settings in Oracle database:
Code below :
SQL SELECT *
2 FROM DATABASE_PROPERTIES
3 WHERE PROPERTY_NAME IN
4 (‘NLS_LANGUAGE’, ‘NLS_TERRITORY’, ‘ NLS_CHARACTERSET’);
PROPERTY_NAME PROPERTY_VALUE DESCRIPTION
------------------------------ ----------------------------- --------------------< Br>
NLS_LANGUAGE AMERICAN Language
NLS_TERRITORY AMERICA Territory
The above is the difference between the Linux environment variables LANG and NLS_LANG. The LANG mainly affects the Linux system, and the NLS_LANG is valid for the oracle. For non-English character sets, the setting of NLS_LANG is very important.
Linux rdate command is mainly used to display the date and time of other hosts, to achieve time sync
When the Ubuntu system reads the USB flash drive, it finds that the files in the USB flash drive can
There are many usages of the lsof command in Linux system. Recovery of accidentally
Many users find that it is not convenient to install Ubuntu through VirtualBox. For example, you nee
How does Ubuntu replace the login window background
How to share files between Ubuntu and Windows
Ubuntu can't connect to Windows Phone solution
What should I do if Ubuntu prompts the list error when opening the software center?
What should I do if I want to enter a password every time git is submitted in Ubuntu?
How to change the jenkins port number on Ubuntu
How to use vim to set up network on CentOS
How to view Linux mounted disk
Linux version of the command to install BleachBit Daquan
How Linux can quickly modify the sql file in the specified ID
Overview of International Program Implementation Steps
How does the Win10 system enlarge the mouse pointer?
Experience windows 7 "sometimes silent and sound" Cheats
Quick Entry Manage Win7 System Application Jump List
How does the Win10 system copy the error message in the pop-up window?
I would like to ask how this laptop configuration
Linux vsftp prompt 530 Permission denied how to do?
Win8 touch keyboard does not prompt Lenovo vocabulary solution