In sqlplus ??? Garbled Problem Solution

Source: Internet
Author: User
After I installed Oracle11grac, why ??? Garbled characters: [oracle @ db ~] $ SqlplusassysdbaSQL * Plus: Release11.2.0.1.0P

After I installed Oracle 11g rac, why ??? Garbled characters: [oracle @ db ~] $ Sqlplus/as sysdbaSQL * Plus: Release 11.2.0.1.0 P

After I installed Oracle 11g rac, why ??? Garbled characters are as follows:
[Oracle @ db ~] $ Sqlplus/as sysdba

SQL * Plus: Release 11.2.0.1.0 Production on Thu Dec 20 13:40:46 2012

Copyright (c) 1982,200 9, Oracle. All rights reserved.


??? :
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> exit
? Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options ??

I have encountered this problem before, but now I don't know how to solve it.
This is actually a very elementary problem, because I try to streamline the rac installation process, and oracle users have fewer environment variables. To solve this problem, you can simply add the character set used by the database to the oracle environment variables, as shown below:
[Oracle @ db ~] $ Vi. bash_profile

#. Bash_profile

# Get the aliases and functions
If [-f ~ /. Bashrc]; then
.~ /. Bashrc
Fi

# User specific environment and startup programs

PATH = $ PATH: $ HOME/bin

Export PATH

Export ORACLE_BASE =/u01/oracle
Export ORACLE_HOME = $ ORACLE_BASE/db
Export ORACLE_SID = orcl
Export PATH = $ PATH: $ ORACLE_HOME/bin
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib
Export NLS_LANG = AMERICAN_AMERICA.UTF8

# Export NLS_LANG = AMERICAN_AMERICA.UTF8 is the newly added content. Here, my library uses the UTF8 character set.

After saving, restart to load the environment variable:
[Oracle @ db ~] $ Source. bash_profile

Log on to sqlplus again. No more ??? Garbled:
[Oracle @ db ~] $ Sqlplus/as sysdba

SQL * Plus: Release 11.2.0.1.0 Production on Thu Dec 20 13:51:33 2012

Copyright (c) 1982,200 9, Oracle. All rights reserved.


Connected:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


If you do not know the character set used in your database or do not remember clearly, you can use the following SQL statement to find out:

SQL> select value from v $ nls_parameters where parameter = 'nls _ LANGUAGE ';

VALUE
----------------------------------------------------------------
AMERICAN

SQL> select value from v $ nls_parameters where parameter = 'nls _ TERRITORY ';

VALUE
----------------------------------------------------------------
AMERICA

SQL> select value from v $ nls_parameters where parameter = 'nls _ CHARACTERSET ';

VALUE
----------------------------------------------------------------
UTF8

In addition, some people found CHINESE character sets, such as simplified chinese, CHINA, ZHS16GBK,

Try: NLS_LANG = 'simplified CHINESE_CHINA.ZHS16GBK 'or NLS_LANG = "SIMPLIFIED CHINESE_CHINA.ZHS16GBK"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.