Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What if there are Chinese garbled codes in oracle in linux system?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

What if there are Chinese garbled codes in oracle in linux system? This article summarizes the solutions to Chinese garbled code in oracle in linux system. Through this article, I hope you can solve this problem.

The root of the garbled problem is the modification of the character set. Let's take a look at the solution to Chinese garbled in oracle in linux.

View the language encoding settings for the client:

Configuration in the configuration file: cat ~ / .bash_profile

Note that the configuration information is modified:

Export PATH

Export ORACLE_HOME=/usr/lib/oracle/11.2/client64/

Export LD_LIBRARY_PATH=:$ORACLE_HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH:.

Export TNS_ADMIN=$ORACLE_HOME

Export PATH=$PATH:$ORACLE_HOME/bin:

Export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

After the configuration is completed, check whether the configuration is successful. Sql statement: select userenv ('language') from dual

View the encoding used by the database: modify the default language of the linux oracle database

The default language for linux installation oracle is:

AMERICAN_AMERICA.WE8MSWIN1252

The Chinese display bits of this language are garbled.

After logging in to the linux system through oracle, do the following:

Modify the method (take UTF8 as an example)

Log in to sqlplus with system DBA privileges

$sqlplus / as sysdba;select userenv ('language') from dual

For example: AMERICAN_AMERICA.WE8MSWIN1252

Modify:

SQL > shutdown immediate;SQL > startup mount;SQL > alter system enable restricted session;SQL > alter system set job_queue_processes=0;SQL > alter database open;SQL > alter database character set internal_use AL32UTF8; or ALTER DATABASE character set INTERNAL_USE ZHS16GBK;SQL > shutdown immediate;SQL > startupSQL > alter system disable restricted session

The solution to the Chinese garbled code in oracle in the linux system is shared here, and the solution is not only analyzed in the article and everyone, but the accuracy of the method analyzed in this article is indisputable. If you like this article, you might as well share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report