What to do if linux sqlplus is garbled

藏色散人
Release: 2020-05-30 10:53:13
Original
3349 people have browsed it

What to do if linux sqlplus is garbled

What should I do if linux sqlplus is garbled? SQLPlus Chinese garbled processing under Linux

1. First query the database character set

SQL> select userenv('language') from dual; USERENV('LANGUAGE') ---------------------------------------------------- AMERICAN_AMERICA.AL32UTF8 SQL> exit
Copy after login

It is known from the above that the database character set is AMERICAN_AMERICA.AL32UTF8

2. Configure the environment Variable

Set to automatically load after booting and restart and put it in

/home/oracle/.bash_profile
Copy after login

or /etc/profile

echo 'export NLS_LANG="AMERICAN_AMERICA.UTF8"'>>/etc/profile source /etc/profile
Copy after login

3. Query again to recognize Chinese

Cause analysis:

sqlplus garbled characters are related to the NLS_LANG variable of the operating system. When the database character set is inconsistent with the NLS_LANG variable, garbled characters will be generated.

Recommended study: "linux tutorial"

The above is the detailed content of What to do if linux sqlplus is garbled. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!