Oracle's SqlPlus console appears to solve the Chinese garbled

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/u014746838/article/details/90699289

1. Enter the following code in cmd command line to log database:

sqlplus username / password @ service name

sqlplus scott/[email protected]:1521/orcl

2. After you log in, you will find prompt is not Chinese, or contains garbled

3. Execute the following statement in sqlplus, view the current character set of the database

select userenv('language') from dual;

SIMPLIFIED CHINESE_CHINA.ZHS16GBK 

We just need to set the client character set to top this on the line

Find an environment variable named "NLS_LANG" 4. The editing system environment variable, if not, then the new one, the value assigned to the variable: "SIMPLIFIED CHINESE_CHINA.ZHS16GBK" (needs to be assigned according to the actual database server character set) restart the console to solve the problem

NLS_LANG:
AMERICAN_AMERICA.AL32UTF8
AMERICAN_AMERICA.ZHS16GBK

Guess you like

Origin blog.csdn.net/u014746838/article/details/90699289