SQL> select name
SQL> alter database character set zhs
alter database character set zhs
*
ERROR at line
ORA
SQL> ALTER DATABASE character set INTERNAL_USE zhs
SQL> select value from nls_database_parameters where parameter=
oracle數據庫在導入不同字符集的數據時經常會出現以下類似問題:
IMP
IMP
ORA
IMP
IMP
ORA
解決辦法:修改數據庫字符集
SQL> connect sys/test
Connected to an idle instance
SQL> startup
ORACLE instance started
Total System Global Area
Fixed Size
Variable Size
Database Buffers
Redo Buffers
Database mounted
Database opened
SQL> select name
NAME
VALUE$
NLS_LANGUAGE
AMERICAN
NLS_TERRITORY
AMERICA
NLS_CURRENCY
$
NAME
VALUE$
NLS_ISO_CURRENCY
AMERICA
NLS_NUMERIC_CHARACTERS
NLS_CHARACTERSET
WE
NAME
VALUE$
NLS_CALENDAR
GREGORIAN
NLS_DATE_FORMAT
DD
NLS_DATE_LANGUAGE
AMERICAN
NAME
VALUE$
NLS_SORT
BINARY
NLS_TIME_FORMAT
HH
NLS_TIMESTAMP_FORMAT
DD
NAME
VALUE$
NLS_TIME_TZ_FORMAT
HH
NLS_TIMESTAMP_TZ_FORMAT
DD
NLS_DUAL_CURRENCY
$
NAME
VALUE$
NLS_COMP
BINARY
NLS_LENGTH_SEMANTICS
BYTE
NLS_NCHAR_CONV_EXCP
FALSE
NAME
VALUE$
NLS_NCHAR_CHARACTERSET
AL
NLS_RDBMS_VERSION
SQL> shutdown immediate;
Database closed
Database dismounted
ORACLE instance shut down
SQL> startup mount
ORACLE instance started
Total System Global Area
Fixed Size
Variable Size
Database Buffers
Redo Buffers
Database mounted
SQL> alter session set sql_trace=true;
Session altered
SQL> alter system enable restricted session;
System altered
SQL> alter system set job_queue_processes=
System altered
SQL> alter system set aq_tm_processes=
System altered
SQL> alter database open;
Database altered
SQL> set linesize
SQL> alter database character set zhs
alter database character set zhs
*
ERROR at line
ORA
SQL> ALTER DATABASE character set INTERNAL_USE zhs
Database altered
SQL> shutdown immediate;
Database closed
Database dismounted
ORACLE instance shut down
SQL> STARTUP
ORACLE instance started
Total System Global Area
Fixed Size
Variable Size
Database Buffers
Redo Buffers
Database mounted
Database opened
SQL>
SQL> select name
NAME
VALUE$
NLS_LANGUAGE
AMERICAN
NLS_TERRITORY
AMERICA
NLS_CURRENCY
$
NAME
VALUE$
NLS_ISO_CURRENCY
AMERICA
NLS_NUMERIC_CHARACTERS
NLS_CHARACTERSET
ZHS
NAME
VALUE$
NLS_CALENDAR
GREGORIAN
NLS_DATE_FORMAT
DD
NLS_DATE_LANGUAGE
AMERICAN
NAME
VALUE$
NLS_SORT
BINARY
NLS_TIME_FORMAT
HH
NLS_TIMESTAMP_FORMAT
DD
NAME
VALUE$
NLS_TIME_TZ_FORMAT
HH
NLS_TIMESTAMP_TZ_FORMAT
DD
NLS_DUAL_CURRENCY
$
NAME
VALUE$
NLS_COMP
BINARY
NLS_LENGTH_SEMANTICS
BYTE
NLS_NCHAR_CONV_EXCP
FALSE
NAME
VALUE$
NLS_NCHAR_CHARACTERSET
AL
NLS_RDBMS_VERSION
SQL>
參考: %
From:http://tw.wingwit.com/Article/program/Oracle/201311/18844.html