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