A simple method to handle Oracle Character Set errors

Source: Internet
Author: User

Scenario 1:
[Oracle @ www.bkjia.com ~] $ Sqlplus/as sysdba
SQL * Plus: Release 11.2.0.1.0 Production on Tue Jun 26 20:52:47 2012
Copyright (c) 1982,200 9, Oracle. All rights reserved.

Connected:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
And Real Application Testing options
SQL> alter database open;
Alter database open
*
ERROR at line 1:
ORA-01157 :???? /?????? 4 -??? DBWR ????
ORA-01110 :???? 4: '+ DGASM/ora11/datafile/users.261.785186921'

SQL> exit
English display ?????
Case 2: Chinese characters are garbled during database queries
In the preceding two cases, you can first query the character set of the database in the database.
SQL> select * from nls_database_parameters where parameter in ('nls _ CHARACTERSET ', 'nls _ NCHAR_CHARACTERSET ');
PARAMETER VALUE
----------------------------------------------------------------------
NLS_CHARACTERSET ZHS16GBK
NLS_NCHAR_CHARACTERS AL16UTF16
ET
The character set of the current database is ZHS16GBK and the national character set is AL16UTF16;
Modify the character set defined in the user environment variables to be consistent with the database character set.
Add the following variable to. bash_profile.
Export NLS_LANG = AMERICAN_AMERICA.ZHS16GBK

Related Article

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.